Spell Board¶
-
class
nh_eobs_adt_gui.spell_management.nh_clinical_spellboard(pool, cr)[source]¶ Provides patient spell information and operations for the GUI.
-
activity_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.
Button called by view_spellboard_form view to call form to cancel the admission of a patient.
-
cancel_discharge(*args, **kwargs)[source]¶ Cancels the discharge of one or more patients.
Parameters: ids (list) – spell ids Returns: Trueif successful. OtherwiseFalseReturn type: bool
-
code¶ Basic string field, can be length-limited, usually displayed as a single-line string in clients
Parameters:
-
con_doctor_ids¶ Many2many field; the value of such a field is the recordset.
Parameters: comodel_name – name of the target model (string) The attribute comodel_name is mandatory except in the case of related fields or field extensions.
Parameters: - relation – optional name of the table that stores the relation in the database (string)
- column1 – optional name of the column referring to “these” records in the table relation (string)
- column2 – optional name of the column referring to “those” records in the table relation (string)
The attributes relation, column1 and column2 are optional. If not given, names are automatically generated from model names, provided model_name and comodel_name are different!
Parameters: - 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)
- limit – optional limit to use upon read (integer)
-
create(*args, **kwargs)[source]¶ Admits a patients or raises an exception.
Parameters: vals (dict) – must contain keys patient_id,location_id,code,start_date,ref_doctor_idsandcon_doctor_idsRaises: osv.except_osvReturns: id of new record Return type: int
Button called by view_spellboard_form view to call form to discharge patient.
-
fetch_patient_id(*args, **kwargs)[source]¶ Fetch the patient_id from the provided Hospital Number or NHS Number.
-
format_data(data)[source]¶ Removes any non alphanumeric symbols from hospital number and NHS number fields.
-
hospital_number¶ Basic string field, can be length-limited, usually displayed as a single-line string in clients
Parameters:
-
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.
-
move_date¶
-
nhs_number¶ Basic string field, can be length-limited, usually displayed as a single-line string in clients
Parameters:
-
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.
-
ref_doctor_ids¶ Many2many field; the value of such a field is the recordset.
Parameters: comodel_name – name of the target model (string) The attribute comodel_name is mandatory except in the case of related fields or field extensions.
Parameters: - relation – optional name of the table that stores the relation in the database (string)
- column1 – optional name of the column referring to “these” records in the table relation (string)
- column2 – optional name of the column referring to “those” records in the table relation (string)
The attributes relation, column1 and column2 are optional. If not given, names are automatically generated from model names, provided model_name and comodel_name are different!
Parameters: - 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)
- limit – optional limit to use upon read (integer)
-
start_date¶
Button called by view_spellboard_form view to call form to transfer patient.
-
ward_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.
-