Query check previous location vs service inconsistent: Difference between revisions
Ttenbergen (talk | contribs) mNo edit summary |
Ttenbergen (talk | contribs) mNo edit summary |
||
| (12 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Data Integrity Check | {{Data Integrity Check | ||
| DIC_summary = patients with [[Previous Location field]] in medicine must have [[Previous Service field]] medicine; ICU (except [[STB ACCU]], [[STB CICU]]/ICCS) must have previous service "critical care". | | DIC_summary = patients with [[Previous Location field]] in medicine must have [[Previous Service field]] medicine; ICU (except [[STB ACCU]], [[STB CICU]]/ICCS) must have previous service "critical care". | ||
| DIC_related_concepts = | | DIC_related_concepts = Previous Location field; Previous Service field | ||
| DIC_firmness = hard check | | DIC_firmness = hard check | ||
| DIC_app = CCMDB. | | DIC_timing = | ||
| DIC_coding = function ''previous_location_vs_service_inconsistent'', query '' | | DIC_app = CCMDB.accdb | ||
| DIC_status = | | DIC_coding = function ''previous_location_vs_service_inconsistent'', query ''check_previous_location_vs_service_inconsistent'' | ||
| DIC_implementation_date = | | DIC_status = retired | ||
| DIC_implementation_date = 2018-09 | |||
}} | }} | ||
== Additional Information == | |||
Error in function ''previous_location_vs_service_inconsistent'' is: | |||
:: "Previous Service and Previous Location must correspond, ie from: medicine, prevServ: medicine; from ICU, prevServ: critical care; from CCU/ACCU, prevServ: Cardology; from ICCS, prevServ Cardiac Surgery. " | |||
Query ''check_previous_location_vs_service_inconsistent'' will show the following as errors: | |||
:: SELECT L_Log.Pat_ID, s_dispo_previous.location_name AS previous_location_name, s_dispo_previous.Hospital, s_dispo_previous.Ward AS [previous ward], s_previous_service.previous_service, s_dispo_previous.loc_type, s_dispo_previous.s_location, [s_previous_service].[previous_service]="Cardiac Sciences" AS test | |||
:: FROM (L_Log INNER JOIN s_dispo AS s_dispo_previous ON L_Log.Previous_Location = s_dispo_previous.dispo_ID) INNER JOIN s_previous_service ON L_Log.Previous_Service = s_previous_service.previous_service_ID | |||
:: WHERE (((s_dispo_previous.Hospital)<>"HSC") AND ((s_previous_service.previous_service)<>"Medicine" And (s_previous_service.previous_service)<>"Family Medicine") AND ((s_dispo_previous.loc_type)="Ward") AND ((s_dispo_previous.s_location)=True)) OR (((s_dispo_previous.Ward)<>"CICU" And (s_dispo_previous.Ward)<>"ACCU" And (s_dispo_previous.Ward)<>"ICCS") AND ((s_previous_service.previous_service)<>"Critical Care") AND ((s_dispo_previous.loc_type)="ICU") AND ((s_dispo_previous.s_location)=True)) OR (((s_dispo_previous.Hospital)="HSC") AND ((s_previous_service.previous_service)<>"Medicine" And (s_previous_service.previous_service)<>"Nephrology") AND ((s_dispo_previous.loc_type)="Ward") AND ((s_dispo_previous.s_location)=True)) OR (((s_dispo_previous.Ward)="ACCU") AND ((s_previous_service.previous_service)<>"Critical Care" And (s_previous_service.previous_service)<>"Cardiology")) OR (((s_dispo_previous.Ward)="ICCS") AND ((s_previous_service.previous_service)<>"Cardiac surgery" And (s_previous_service.previous_service)<>"Cardiac Sciences" And (s_previous_service.previous_service)<>"Critical Care")) OR (((s_dispo_previous.Ward)="CICU") AND ((s_previous_service.previous_service)<>"Cardiac surgery" And (s_previous_service.previous_service)<>"Cardiac Sciences" And (s_previous_service.previous_service)<>"Critical Care")); | |||
== Log == | |||
*2022-09-07 - deleted as part of retiring [[Previous_Service field]] | |||
*2021-01-12 - update to STB ICU possibilities | |||
*2021-01-05 - expect CICU to use newly added option "Cardiac Sciences" | |||
== Related articles == | == Related articles == | ||
{{Related Articles}} | {{Related Articles}} | ||
[[Category:Legacy Registry check]] | |||