Previous Service field: Difference between revisions

m {{CCMDB Data Integrity Checks}}: should be fixed, please put back if still a problem
m m
Line 35: Line 35:


* 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 CCU) 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 ==