Placement¶
-
class
operations.NhClinicalPatientPlacement(pool, cr)[source]¶ Represents the action of assigning a bed usage
locationto an admitted patient.-
complete(*args, **kwargs)[source]¶ Calls
completeand then creates and completes amovementto the selected bed usage location.This operation will kick off a policy trigger as Hospitals usually start observations or measurements on patients after this action is taken.
Returns: TrueReturn type: bool
-
create(*args, **kwargs)[source]¶ Override of Odoo’s built-in method to ensure that only one placement is ever open. It does this by cancelling any open placements before returning the new one.
Parameters: vals – See openerp.models.BaseModel.create. Returns:
-
get_activity_location_id(*args, **kwargs)[source]¶ Returns the
locationwhere the patient is waiting to be placed, usually of ward usage.Returns: locationidReturn type: int
-
get_form_description(*args, **kwargs)[source]¶ Returns a description in dictionary format of the input fields that would be required in the user gui when completing this action.
Parameters: patient_id (int) – patientidReturns: a list of dictionaries Return type: list
-
location_id¶ The value of such a field is a recordset of size 0 (no record) or 1 (a single record).
Parameters: - comodel_name – name of the target model (string)
- domain – an optional domain to set on candidate values on the client side (domain or string)
- context – an optional context to use on the client side when handling that field (dictionary)
- ondelete – what to do when the referred record is deleted;
possible values are:
'set null','restrict','cascade' - auto_join – whether JOINs are generated upon search through that
field (boolean, by default
False) - delegate – set it to
Trueto make fields of the target model accessible from the current model (corresponds to_inherits)
The attribute comodel_name is mandatory except in the case of related fields or field extensions.
-
patient_id¶ The value of such a field is a recordset of size 0 (no record) or 1 (a single record).
Parameters: - comodel_name – name of the target model (string)
- domain – an optional domain to set on candidate values on the client side (domain or string)
- context – an optional context to use on the client side when handling that field (dictionary)
- ondelete – what to do when the referred record is deleted;
possible values are:
'set null','restrict','cascade' - auto_join – whether JOINs are generated upon search through that
field (boolean, by default
False) - delegate – set it to
Trueto make fields of the target model accessible from the current model (corresponds to_inherits)
The attribute comodel_name is mandatory except in the case of related fields or field extensions.
-
pos_id¶ The value of such a field is a recordset of size 0 (no record) or 1 (a single record).
Parameters: - comodel_name – name of the target model (string)
- domain – an optional domain to set on candidate values on the client side (domain or string)
- context – an optional context to use on the client side when handling that field (dictionary)
- ondelete – what to do when the referred record is deleted;
possible values are:
'set null','restrict','cascade' - auto_join – whether JOINs are generated upon search through that
field (boolean, by default
False) - delegate – set it to
Trueto make fields of the target model accessible from the current model (corresponds to_inherits)
The attribute comodel_name is mandatory except in the case of related fields or field extensions.
-
reason¶ Very similar to
Charbut used for longer contents, does not have a size and usually displayed as a multiline text box.Parameters: translate – whether the value of this field can be translated
-
submit(*args, **kwargs)[source]¶ Checks the submitted data is correct and then calls
submit.Returns: TrueReturn type: bool
-
suggested_location_id¶ The value of such a field is a recordset of size 0 (no record) or 1 (a single record).
Parameters: - comodel_name – name of the target model (string)
- domain – an optional domain to set on candidate values on the client side (domain or string)
- context – an optional context to use on the client side when handling that field (dictionary)
- ondelete – what to do when the referred record is deleted;
possible values are:
'set null','restrict','cascade' - auto_join – whether JOINs are generated upon search through that
field (boolean, by default
False) - delegate – set it to
Trueto make fields of the target model accessible from the current model (corresponds to_inherits)
The attribute comodel_name is mandatory except in the case of related fields or field extensions.
-