- PXVSC ;SLC/PKR - APIs for Clinical Reminder indexes. ;08/11/2017
- ;;1.0;PCE PATIENT CARE ENCOUNTER;**211**;Aug 12, 1996;Build 454
- ;
- Q
- ;=============================================
- KVSC(X,DA) ;Delete indexes for the V Standard Codes file.
- ;X(1)=CODING SYSTEM, X(2)=CODE,X(3)=DFN, X(4)=VISIT IEN,
- ;X(5)=EVENT DATE AND TIME.
- N DATE,VISIT
- S VISIT=$G(^AUPNVSIT(X(4),0))
- I VISIT="" Q
- ;If it is available, use the Event Date/Time for the date.
- S DATE=$G(X(5))
- I DATE="" S DATE=$P(VISIT,U,1)
- K ^PXRMINDX(9000010.71,"IP",X(1),X(2),X(3),DATE,DA)
- K ^PXRMINDX(9000010.71,"PI",X(3),X(1),X(2),DATE,DA)
- Q
- ;
- ;=============================================
- SVSC(X,DA) ;Set indexes for the V Standard Codes file.
- ;X(1)=CODING SYSTEM, X(2)=CODE,X(3)=DFN, X(4)=VISIT IEN,
- ;X(5)=EVENT DATE AND TIME
- N DATE,VISIT
- S VISIT=$G(^AUPNVSIT(X(4),0))
- I VISIT="" Q
- ;If it is available, use the Event Date/Time for the date.
- S DATE=$G(X(5))
- I DATE="" S DATE=$P(VISIT,U,1)
- S ^PXRMINDX(9000010.71,"IP",X(1),X(2),X(3),DATE,DA)=""
- S ^PXRMINDX(9000010.71,"PI",X(3),X(1),X(2),DATE,DA)=""
- Q
- ;
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXVSC 1114 printed Feb 18, 2025@23:58:25 Page 2
- PXVSC ;SLC/PKR - APIs for Clinical Reminder indexes. ;08/11/2017
- +1 ;;1.0;PCE PATIENT CARE ENCOUNTER;**211**;Aug 12, 1996;Build 454
- +2 ;
- +3 QUIT
- +4 ;=============================================
- KVSC(X,DA) ;Delete indexes for the V Standard Codes file.
- +1 ;X(1)=CODING SYSTEM, X(2)=CODE,X(3)=DFN, X(4)=VISIT IEN,
- +2 ;X(5)=EVENT DATE AND TIME.
- +3 NEW DATE,VISIT
- +4 SET VISIT=$GET(^AUPNVSIT(X(4),0))
- +5 IF VISIT=""
- QUIT
- +6 ;If it is available, use the Event Date/Time for the date.
- +7 SET DATE=$GET(X(5))
- +8 IF DATE=""
- SET DATE=$PIECE(VISIT,U,1)
- +9 KILL ^PXRMINDX(9000010.71,"IP",X(1),X(2),X(3),DATE,DA)
- +10 KILL ^PXRMINDX(9000010.71,"PI",X(3),X(1),X(2),DATE,DA)
- +11 QUIT
- +12 ;
- +13 ;=============================================
- SVSC(X,DA) ;Set indexes for the V Standard Codes file.
- +1 ;X(1)=CODING SYSTEM, X(2)=CODE,X(3)=DFN, X(4)=VISIT IEN,
- +2 ;X(5)=EVENT DATE AND TIME
- +3 NEW DATE,VISIT
- +4 SET VISIT=$GET(^AUPNVSIT(X(4),0))
- +5 IF VISIT=""
- QUIT
- +6 ;If it is available, use the Event Date/Time for the date.
- +7 SET DATE=$GET(X(5))
- +8 IF DATE=""
- SET DATE=$PIECE(VISIT,U,1)
- +9 SET ^PXRMINDX(9000010.71,"IP",X(1),X(2),X(3),DATE,DA)=""
- +10 SET ^PXRMINDX(9000010.71,"PI",X(3),X(1),X(2),DATE,DA)=""
- +11 QUIT
- +12 ;