Previous Service field: Difference between revisions

JMojica (talk | contribs)
JMojica (talk | contribs)
Line 56: Line 56:
* Can't be empty.
* Can't be empty.


* query check_previous_location_vs_service_inconsistent: patients with [[Previous Location field]] in medicine must have [[Previous Service field]] medicine; patients from ICU (except CCU) must have previous service "critical care".
* query check_previous_location_vs_service_inconsistent: patients with [[Previous Location field]] in medicine must have [[Previous Service field]] medicine; patients from ICU (except ACCU, ICCS) must have previous service "critical care".
 
Not sure if the following makes sense in new context, but moved here from the tmp article: {{discussion}}
* Query ''s_tmp_Service_Sending_to_ICU'' - Error if:
** not admitted from inpatient location (([[S AdmitDischarge table|S AdmitDischarge]].inpatient = true)) but has "Srv to ICU" entry
** admitted from inpatient location and one of
*** no "Srv to ICU" entry
*** has "Srv to ICU" = "z_not applicable" and no comment
Right now our consistency check would not allow someone from other hosp via ER. We won't be able to do this check until we have [[Pre-admit Inpatient Institution field]]. I will take that check out for now. Ttenbergen 11:50, 2015 June 24 (CDT) {{discussion}}
 


== Implementation ==
== Implementation ==