- BTIULINK ; IHS/ITSC/LJF - UPDATE TIU DOC UPON VISIT MERGE ;
- ;;1.0;TEXT INTEGRATION UTILITIES;;NOV 04, 2004
- ;
- ;This routine is called by the PCC Visit Merge Utility.
- ;The input variables are: APCDVMF - Merge from visit ifn
- ; APCDVMT - Merge to visit ifn
- ;
- ;This routine finds the patient involved, scans for this merged visit
- ;among the occurrences for this patient, and updates the visit.
- ;
- MRG ;PEP >> PRIVATE ENTRY POINT between TIU and PCC
- N DIE,DA,DR,TIUN,X,Y
- Q:'$D(APCDVMF) Q:'$D(APCDVMT)
- S TIUN=0
- F S TIUN=$O(^TIU(8925,"V",APCDVMF,TIUN)) Q:TIUN="" D
- .S DR=".03////"_APCDVMT,DA=TIUN,DIE="^TIU(8925," D ^DIE
- ;
- EXIT Q
- BTIULINK ; IHS/ITSC/LJF - UPDATE TIU DOC UPON VISIT MERGE ;
- +1 ;;1.0;TEXT INTEGRATION UTILITIES;;NOV 04, 2004
- +2 ;
- +3 ;This routine is called by the PCC Visit Merge Utility.
- +4 ;The input variables are: APCDVMF - Merge from visit ifn
- +5 ; APCDVMT - Merge to visit ifn
- +6 ;
- +7 ;This routine finds the patient involved, scans for this merged visit
- +8 ;among the occurrences for this patient, and updates the visit.
- +9 ;
- MRG ;PEP >> PRIVATE ENTRY POINT between TIU and PCC
- +1 NEW DIE,DA,DR,TIUN,X,Y
- +2 IF '$DATA(APCDVMF)
- QUIT
- IF '$DATA(APCDVMT)
- QUIT
- +3 SET TIUN=0
- +4 FOR
- SET TIUN=$ORDER(^TIU(8925,"V",APCDVMF,TIUN))
- IF TIUN=""
- QUIT
- Begin DoDot:1
- +5 SET DR=".03////"_APCDVMT
- SET DA=TIUN
- SET DIE="^TIU(8925,"
- DO ^DIE
- End DoDot:1
- +6 ;
- EXIT QUIT