Clinical Assessment Unit: Difference between revisions

Surbanski (talk | contribs)
Line 37: Line 37:
== Inconsistencies between [[Previous Location]] and [[Previous Service]] ==
== Inconsistencies between [[Previous Location]] and [[Previous Service]] ==
Julie requested that, when a pt has a CAU as [[Previous Location]] or [[Pre-admit Inpatient Institution]], profiles that have "Medicine" as [[Previous Service]] should have this changed to "Family Medicine".  
Julie requested that, when a pt has a CAU as [[Previous Location]] or [[Pre-admit Inpatient Institution]], profiles that have "Medicine" as [[Previous Service]] should have this changed to "Family Medicine".  
{{Discuss|
* was part of another discussion, broke it out here.
** <site> CAU has [[S dispo.loc type]] WARD in [[s_dispo table]] which implies included when reporting <site> ward. your question on inconsistencies - we can correct but not priority. Still fine as is when reporting. However the Previous service entries which is Medicine have to be changed to Family Medicine. if you have made it inactive 2021 then no more onwards, correct?  --[[User:JMojica|JMojica]] 17:13, 2022 January 26 (CST) 
*** If I understand this right, then the records that have a CAU as [[Previous Location]] or [[Pre-admit Inpatient Institution]], and have [[Previous Service]] equal to "Medicine", should have that previous service changed to "Family Medicine". I made a query to find these, and realized that there are "previous service" other than FM and Med - are those a concern? See below. Do we want to change thes other non-family-medicine values to Family Medicine as well? [[User:Ttenbergen|Ttenbergen]] 11:43, 2022 February 11 (CST)
*** Flagging this for GRA - could you confirm that changing these actually makes sense? No sense making things consistent if it makes them wrong. [[User:Ttenbergen|Ttenbergen]] 11:59, 2022 February 11 (CST)
**** I don't remember exactly when but we haven't been using CAU as a location for quite some time, and for those coming to medicine from CAU we've been using Family Medicine as their Previous Service. That's not to say human error can't occur, but I can speak for both Mindy and myself and say that anyone coming to medicine from CAU is entered as Family Medicine for Previous Service, and "GH-Ward" for previous location. If there's any errors let us know and we'll correct them, otherwise I'm fairly certain that this is how we've been doing CAU entries for some time now. [[User:Surbanski|Surbanski]] 13:54, 2022 February 11 (CST)
}}


{{Collapsable
{{Todo
| always= Query to find profiles with Previous Loc CAU and Previous Service not Family Medicine
| who = Pagasa 
| full=
| question =  
SELECT L_Log.D_ID, s_dispo.location_name AS pre_admit, s_dispo_1.location_name AS previous, s_previous_service.previous_service
The following query shows profiles that have inconsistent previous service and previous location for CAUs.
  SELECT L_Log.D_ID, s_dispo.location_name AS pre_admit, s_dispo_1.location_name AS previous, s_previous_service.previous_service
FROM ((L_Log LEFT JOIN s_dispo ON L_Log.Pre_admit_Inpatient_Institution = s_dispo.dispo_ID) LEFT JOIN s_dispo AS s_dispo_1 ON L_Log.Previous_Location = s_dispo_1.dispo_ID) INNER JOIN s_previous_service ON L_Log.Previous_Service = s_previous_service.previous_service_ID
FROM ((L_Log LEFT JOIN s_dispo ON L_Log.Pre_admit_Inpatient_Institution = s_dispo.dispo_ID) LEFT JOIN s_dispo AS s_dispo_1 ON L_Log.Previous_Location = s_dispo_1.dispo_ID) INNER JOIN s_previous_service ON L_Log.Previous_Service = s_previous_service.previous_service_ID
WHERE (((s_dispo.location_name) Like "*CAU") AND ((s_previous_service.previous_service)<>"Family Medicine")) OR (((s_dispo_1.location_name) Like "*CAU") AND ((s_previous_service.previous_service)<>"Family Medicine"))
WHERE (((s_dispo.location_name) Like "*CAU") AND ((s_previous_service.previous_service)<>"Family Medicine")) OR (((s_dispo_1.location_name) Like "*CAU") AND ((s_previous_service.previous_service)<>"Family Medicine"))
ORDER BY s_previous_service.previous_service;
ORDER BY s_previous_service.previous_service;
}}
 
The following query will update these to "Family Medicine" as they should be:
UPDATE ((L_Log LEFT JOIN s_dispo ON L_Log.Pre_admit_Inpatient_Institution = s_dispo.dispo_ID) LEFT JOIN s_dispo AS s_dispo_1 ON L_Log.Previous_Location = s_dispo_1.dispo_ID) INNER JOIN s_previous_service ON L_Log.Previous_Service = s_previous_service.previous_service_ID SET s_previous_service.previous_service = "Family Medicine"
WHERE (((s_dispo.location_name) Like "*CAU") AND ((s_previous_service.previous_service)<>"Family Medicine")) OR (((s_dispo_1.location_name) Like "*CAU") AND ((s_previous_service.previous_service)<>"Family Medicine"));
 
Could you please run the first query, which should list 60-some records, then the second query to fix them, and then the first again to make sure they are gone? Thanks!
| todo_added = 2022-02-17
| todo_action =
}}


== Related articles ==
== Related articles ==