Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: YSCLTST2

YSCLTST2.m

Go to the documentation of this file.
YSCLTST2 ;DALOI/LB/RLM-TRANSMIT RX AND lAB DATA FOR CLOZAPINE ; 11/28/18 3:34am
 ;;5.01;MENTAL HEALTH;**18,22,26,47,61,69,74,90,92,122,166**;Dec 30, 1994;Build 19
 ; Reference to ^LAB(60 supported by IA #333
 ; Reference to ^PSDRUG supported by IA #25
 ; Reference to ^PS(55 supported by IA #787
 ; Reference to ^XMD supported by IA #10070
 ; Reference to ^LR7OR1 supported by IA #2503
 ; Reference to ^DIC supported by DBIA #2051
 ; Reference to ^DIE supported by DBIA #2053
 ; Reference to ^DIQ supported by DBIA #2056
 ; Reference to ^DIR supported by DBIA #10026
 ; Reference to $$SITE^VASITE supported by DBIA #10112
 ; Reference to ^XLFDT supported by DBIA #10103
 ; Reference to MIX^DIC1 supported by DBIA #10007
 ; Reference to ^%ZTLOAD supported by DBIA #10063
 ; Reference to ^%DTC supported by DBIA #10000
 ; Reference to ^%DT supported by DBIA #10003
 ; Reference to PSS^PSS781 supported by DBIA #4480
 ; 
TRANSMIT ; send remote and local, kill and quit
 K XMZ S %DT="T",X="NOW" D ^%DT S YSCLNOW=$P(Y,".",2),YSCLSITE=$P($$SITE^VASITE,"^",2)
 S $P(YSSTOP,",",7)=7 I $$S^%ZTLOAD D ABORT^YSCLTEST G END
 S YSDEBUG=$$GET1^DIQ(603.03,1,3,"I"),YSPROD=$$GET1^DIQ(8989.3,1,501,"I")
 S YSPRODST=$$GET1^DIQ(603.03,1,8) ;S:YSPRODST="" YSPRODST="S.RUCLRXLAB@FO-HINES.DOMAIN.EXT"
 S YSDBGST=$$GET1^DIQ(603.03,1,10) ;S:YSDBGST="" YSDBGST="G.CLOZAPINE DEBUG@FO-DALLAS.DOMAIN.EXT"
 ;/RBN - Begin modifications for YS*5.01*122
 I $G(YSCLLN) D
 .K XMY
 .I YSPROD D
 ..I 'YSDEBUG S XMY(YSPRODST)="" ;XMY("G.CLOZAPINE ROLL-UP")="" ;,
 ..E  S XMY("G.CLOZAPINE DEBUG@FO-DALLAS.DOMAIN.EXT")="",XMY("G.RUCLRXLAB@FO-DALLAS.DOMAIN.EXT")=""
 .E  D
 ..I 'YSDEBUG S XMY(YSDBGST)=""
 ..E  S XMY("G.CLOZAPINE DEBUG")=""
 .S XMDUZ="Clozapine MONITOR",XMTEXT="^TMP($J,",XMSUB=$S(YSDEBUG:"DEBUG ",1:"")_"Clozapine lab data @ "_YSCLSITE_" on "_DT_" at "_YSCLNOW D ^XMD
 K XMY
 S ^TMP("YSCL",$J,2,0)=" ",^TMP("YSCL",$J,3,0)="In message # "_$S($D(XMZ):XMZ,1:"no data sent")
 I 'YSDEBUG S XMY("G.PSOCLOZ")="" S:YSPROD XMY("G.CLOZAPINE ROLL-UP@DOMAIN.EXT")=""
 E  S XMY("G.CLOZAPINE DEBUG")="" S:YSPROD XMY("G.CLOZAPINE DEBUG@FO-DALLAS.DOMAIN.EXT")=""
 S XMSUB=$S(YSDEBUG:"DEBUG ",1:"")_"Clozapine lab data @ "_YSCLSITE_" on "_DT_" at "_YSCLNOW
 K XMZ S ^TMP("YSCL",$J,1,0)="Clozapine lab data was transmitted, "_YSCLLN_" records were sent",XMTEXT="^TMP(""YSCL"",$J," D ^XMD
 S DIE="^YSCL(603.03,",DA=1,DR="5////"_$$NOW^XLFDT D ^DIE  ;S $P(^YSCL(603.03,1,0),"^",5)=$$NOW^XLFDT
 ;/RBN - End modifications for YS*5.01*122
END ;
 G END1^YSCLTST3
 Q
 ;
REXMIT ; retransmit lab and RX data
 ; must be a tuesday
 S DIR(0)="Y",DIR("A")="Are you sure you wish to retransmit lab data"
 D ^DIR K DIR I Y'=1 K Y Q
 ;/RBN Begin modification for YS*122
 D REX^YSCLTST5
 ;/RBN End modification for YS*122
 Q
 ;
DATE S %DT="AEXP",%DT(0)=-DT,%DT("A")="Ending date for data collection."
 D ^%DT K %DT G END:X="^",END:X="^" I Y=-1 G DATE
 ;/RBN Begin modifications for *122
 S ZTDESC="Server triggered retransmission"
 S ZTSAVE("YSCLED")="",ZTIO="",ZTRTN="REXMIT^YSCLTST5",ZTDTH=$H
 D REXMIT^YSCLTST5 G END
 ;/RBN End modifications for *122
FLSET ;Set up file 603.02
 W @IOF,"This option specifies the blood tests associated with the Clozapine"
 W !,"reporting software.  Two tests must be defined.  The first is the White"
 W !,"Blood Count.  The second is the Granulocyte (or Neutrophil) percentage."
 K DIR W !! S DIR(0)="PA^64:EMZ",DIR("A",1)="Enter the test that will be used to record the White Blood Count for the",DIR("A")="Clozapine patients: " D ^DIR
 Q:Y=-1!($D(DUOUT))!($D(DTOUT))!($D(DIRUT))!($D(DIROUT))
 S YSCLWBC=+Y
 K DIR W !! S DIR(0)="PA^64:EMZ",DIR("A",1)="Enter the test that will be used to record the Neutrophil Count (percentage)",DIR("A")=" for the Clozapine patients: " D ^DIR
 Q:Y=-1!($D(DUOUT))!($D(DTOUT))!($D(DIRUT))!($D(DIROUT))
 S YSCLGRN=+Y
 I YSCLWBC,YSCLGRN D
 .K DD S DIC="^YSCL(603.02,",X=YSCLWBC,DIC("DR")="1////"_YSCLGRN K DO D FILE^DICN
 ;Only one entry is allowed.
 K DIR,X,Y,YSCLWBC,YSCLGRN,ZTDESC
 Q
EN(DRG) ;
 K LAB
 I $$GET1^DIQ(50,DRG,17.5)'="PSOCLO1" S LAB("NOT")=0 Q
 N YSARRAY D LIST^DIC(50.02,","_YSDRG_",",3,"I",,,,,,,"YSARRAY")
 S (CNT,I)=0 F  S I=$O(YSARRAY("DILIST",2,I)) Q:'I  S CNT=$G(CNT)+1
 I CNT'=2 S LAB("BAD TEST")=0 K CNT Q
 K CNT F I=1:1 Q:'$D(YSARRAY("DILIST","ID",I))  D
 .S LABT=$S(YSARRAY("DILIST","ID",I,3)=1:"WBC",1:"ANC"),YSLN=YSARRAY("DILIST",2,I)
 .S LAB(LABT)=$$GET1^DIQ(50.02,YSLN_","_DRG,.01,"I")_"^"_$$GET1^DIQ(50.02,YSLN_","_DRG,2,"I")_"^"_$$GET1^DIQ(50.02,YSLN_","_DRG,3,"I")
 K LABT,I
 Q
CL1(DFN,DAYS) ;The routine was split due to size
 G CL1^YSCLTST4
 Q
 ;
 ;BEGIN: JCH - PSO*7*612
CL(DFN,PSORCLOZ) ; patient must be in both file #55 and #603.01 to get lab results
 ;END: JCH - PSO*7*612
 K ^TMP("LRRR",$J) N RESULTS,YSCLYWBC,YSCLRANC,YSCLYANC,YSCLXANC,YSCLXWBC,YSCLRWBC,YSCLFRQ,YSCLIEN
 I 'DFN Q "-1^-1^-1^-1^-1^-1^-1"
 N ARRAY D LIST^DIC(603.01,,1,"I",,,DFN,"C",,,"ARRAY")
 I '$D(ARRAY("DILIST","ID")) Q "-1^-1^-1^-1^-1^-1^-1"
 ;BEGIN: JCH - YS*5.01*166 Use frequency from registered cloz auth number, otherwise most recently assigned cloz number
 S YSCLIEN=$$GETREGYS^PSOCLUTL(DFN),YSCLFRQ=""
 I YSCLIEN>0 S YSCLIEN=$O(^YSCL(603.01,"C",DFN,""),-1)
 ;END: JCH - YS*5.01*166
 I YSCLIEN S YSCLFRQ=$$GET1^DIQ(603.01,YSCLIEN,2,"I")
 I $$GET1^DIQ(603.03,1,7,"I")=1!(YSCLFRQ="")  Q "-1^0^0^0^0^0^"_YSCLFRQ
 I $$GET1^DIQ(55,DFN,54,"I")'="A"  Q "-1^0^0^0^0^0^"_YSCLFRQ
 ; BEGIN: JCH - PSO*7*612. If coming from CPRS, no cloz ordering if local override number currently registered 
 I $G(PSORCLOZ) N ORYSIEN S ORYSIEN=$$GET1^DIQ(603.01,YSCLIEN,.01,"I") I ORYSIEN?1U6N Q "-1^0^0^0^0^0"
 ; END: JCH - PSO*7*612
 S X1=DT,X2="-7" D C^%DTC S YSCLSD=X
 K ARRAY D LIST^DIC(603.41,",1,",,"I",,,,,,,"ARRAY")
 F I=1:1 Q:'$D(ARRAY("DILIST",2,I))  S YSCLA=ARRAY("DILIST",2,I) D
 . N YSCLTNM,YSCLTTP,YSCLTFR S YSCLTNM=$$GET1^DIQ(603.41,YSCLA_",1,",.01,"I")
 . S YSCLTTP=$$GET1^DIQ(603.41,YSCLA_",1,",1,"I")
 . S YSCLTFR=$$GET1^DIQ(603.41,YSCLA_",1,",2,"I")
 . S YSCLTLS(YSCLTTP,YSCLTNM)=YSCLTFR
 F I=1:1 Q:'$D(ARRAY("DILIST",1,I))  S YSCLTL=ARRAY("DILIST",1,I) D
 . D RR^LR7OR1(DFN,,YSCLSD,DT,,YSCLTL,"L")
 . S YSCLSB1="" F  S YSCLSB1=$O(^TMP("LRRR",$J,DFN,YSCLSB1)) Q:YSCLSB1=""  D
 . . S YSCLTDT="" F  S YSCLTDT=$O(^TMP("LRRR",$J,DFN,YSCLSB1,YSCLTDT)) Q:YSCLTDT=""  I $P(YSCLTDT,".",2)]"" D
 . . . S YSCLTA="" F  S YSCLTA=$O(^TMP("LRRR",$J,DFN,YSCLSB1,YSCLTDT,YSCLTA)) Q:YSCLTA=""  I YSCLTA D
 . . . . S RESULTS1=^TMP("LRRR",$J,DFN,YSCLSB1,YSCLTDT,YSCLTA)
 . . . . S RESULTS(YSCLTL,YSCLTDT)=$P(RESULTS1,"^",2)
 ;Find all entries for WBC and sort by inverse date.
 S YSCLA="" F  S YSCLA=$O(YSCLTLS("W",YSCLA)) Q:'YSCLA  S YSCLXWBC(YSCLA)="" D
  . S YSCLA1="" F  S YSCLA1=$O(RESULTS(YSCLA,YSCLA1)) Q:'YSCLA1  S YSCLYWBC(YSCLA1)=RESULTS(YSCLA,YSCLA1)_"^"_$$GET1^DIQ(60,YSCLA,.01)_"^"_YSCLTLS("W",YSCLA)
 I '$D(YSCLYWBC) G ALTANC
 I $D(YSCLXWBC),$D(YSCLYWBC) D
 .S YSCLRWBC=$O(YSCLYWBC(0)) I 'YSCLRWBC ;D KILL Q "0^^^^^^"_YSCLFRQ
 .S YSCLMULT=$P(YSCLYWBC(YSCLRWBC),"^",3),YSCLMULT=$S(YSCLMULT:1000,1:1)
 .S YSCLRWBC(YSCLRWBC)=($P(YSCLYWBC(YSCLRWBC),"^")*YSCLMULT)_"^"_$P(YSCLYWBC(YSCLRWBC),"^",2)
 .;Scan for Neutrophil count on same day and time as most recent WBC
 .S YSCLMTCH=0 F YSCLA="A","N","S","T" S YSCLTPT="" Q:YSCLMTCH  F  S YSCLTPT=$O(YSCLTLS(YSCLA,YSCLTPT)) Q:'YSCLTPT  D  Q:YSCLMTCH
 ..S YSCLMULT=YSCLTLS(YSCLA,YSCLTPT),YSCLMULT=$S(YSCLMULT:1000,1:1)
  ..I $G(RESULTS(YSCLTPT,YSCLRWBC)),YSCLA="A",RESULTS(YSCLTPT,YSCLRWBC)'?1A.E S YSCLMTCH=1,YSCLRANC(YSCLRWBC)=RESULTS(YSCLTPT,YSCLRWBC)*YSCLMULT_"^"_$$GET1^DIQ(60,YSCLTPT,.01) Q
  ..I $G(RESULTS(YSCLTPT,YSCLRWBC)),YSCLA="N",RESULTS(YSCLTPT,YSCLRWBC)'?1A.E S YSCLMTCH=1,YSCLRANC(YSCLRWBC)=YSCLRWBC(YSCLRWBC)*((RESULTS(YSCLTPT,YSCLRWBC))*.01)_"^"_$$GET1^DIQ(60,YSCLTPT,.01) Q
  ..I $G(RESULTS(YSCLTPT,YSCLRWBC)),YSCLA="S",RESULTS(YSCLTPT,YSCLRWBC)'?1A.E D
  ...S YSCLSGS="" F  S YSCLSGS=$O(YSCLTLS("B",YSCLSGS)) D  Q:YSCLMTCH!'YSCLSGS
  ....S:'YSCLSGS YSCLSGS="Z" I '$D(RESULTS(YSCLSGS,YSCLRWBC)) S RESULTS(YSCLSGS,YSCLRWBC)=0
  ....S YSCLMTCH=1,YSCLRANC(YSCLRWBC)=YSCLRWBC(YSCLRWBC)*((RESULTS(YSCLTPT,YSCLRWBC)*.01)+(RESULTS(YSCLSGS,YSCLRWBC)*.01))_"^"_$$GET1^DIQ(60,YSCLTPT,.01)_"/"_$$GET1^DIQ(60,YSCLSGS,.01) Q
  ..I $G(RESULTS(YSCLTPT,YSCLRWBC)),YSCLA="C",RESULTS(YSCLTPT,YSCLRWBC)'?1A.E D
  ...S YSCLSGS="" F  S YSCLSGS=$O(YSCLTLS("T",YSCLSGS)) D  Q:YSCLMTCH!'YSCLSGS
  ....S:'YSCLSGS YSCLSGS="Z" I '$D(RESULTS(YSCLSGS,YSCLRWBC)) S RESULTS(YSCLSGS,YSCLRWBC)=0
  ....S YSCLMTCH=1,YSCLRANC(YSCLRWBC)=((RESULTS(YSCLTPT,YSCLRWBC)*YSCLMULT)+(RESULTS(YSCLSGS,YSCLRWBC)*YSCLMULT))_"^"_$P(^LAB(60,YSCLTPT,0),"^")_"/"_$P($G(^LAB(60,YSCLSGS,0)),"^") Q
 D KILL
 I '$G(YSCLRWBC(YSCLRWBC)),'+$G(YSCLRANC(YSCLRWBC)) Q "0^^^^^^"_YSCLFRQ
 I $G(YSCLRWBC(YSCLRWBC)),+$G(YSCLRANC(YSCLRWBC))<1000 Q "0^"_$G(YSCLRWBC(YSCLRWBC))_"^"_$S($G(YSCLRANC(YSCLRWBC))="":"^",1:$G(YSCLRANC(YSCLRWBC)))_"^"_(9999999-YSCLRWBC)_"^"_YSCLFRQ
 I '$G(YSCLRWBC(YSCLRWBC)),+$G(YSCLRANC(YSCLRWBC))<1000 Q "0^"_$G(YSCLRWBC(YSCLRWBC))_"^"_$S($G(YSCLRANC(YSCLRWBC))="":"^",1:$G(YSCLRANC(YSCLRWBC)))_"^"_(9999999-YSCLRWBC)_"^"_YSCLFRQ
 I '$G(YSCLRWBC(YSCLRWBC)),+$G(YSCLRANC(YSCLRWBC)) Q "0^"_$G(YSCLRWBC(YSCLRWBC))_"^"_$S($G(YSCLRANC(YSCLRWBC))="":"^",1:$G(YSCLRANC(YSCLRWBC)))_"^"_(9999999-YSCLRWBC)_"^"_YSCLFRQ
 I $G(YSCLRWBC(YSCLRWBC)),+$G(YSCLRANC(YSCLRWBC))<1500 Q "2^"_$G(YSCLRWBC(YSCLRWBC))_"^"_$S($G(YSCLRANC(YSCLRWBC))="":"^",1:$G(YSCLRANC(YSCLRWBC)))_"^"_(9999999-YSCLRWBC)_"^"_YSCLFRQ
 ;;END NCC REMEDIATION << RJS*122
 Q "1^"_YSCLRWBC(YSCLRWBC)_"^"_YSCLRANC(YSCLRWBC)_"^"_(9999999-YSCLRWBC)_"^"_YSCLFRQ
 ;
 ;;START NCC REMEDIATION >> RJS*122
ALTANC ;
 S YSCLA=0 F  S YSCLA=$O(YSCLTLS("A",YSCLA)) Q:'YSCLA  S YSCLXANC(YSCLA)="" D
 .S YSCLA1=0 F  S YSCLA1=$O(RESULTS(YSCLA,YSCLA1)) Q:'YSCLA1  S YSCLYANC(YSCLA1)=RESULTS(YSCLA,YSCLA1)_"^"_$$GET1^DIQ(60,YSCLA,.01)_"^"_YSCLTLS("A",YSCLA)
 I $D(YSCLYANC) D
 .S (YSCLRANC,YSCLRWBC)=$O(YSCLYANC(0)) I 'YSCLRANC ;D KILL Q "0^^^^^^"_YSCLFRQ
 .S YSCLMULT=$P(YSCLYANC(YSCLRANC),"^",3),YSCLMULT=$S(YSCLMULT:1000,1:1)
 .S YSCLRANC(YSCLRANC)=($P(YSCLYANC(YSCLRANC),"^")*YSCLMULT)_"^"_$P(YSCLYANC(YSCLRANC),"^",2)
 .;Scan for Neutrophil count on same day and time as most recent ANC
 .S YSCLMTCH=0 F YSCLA="A","N","S","T" S YSCLTPT="" Q:YSCLMTCH  F  S YSCLTPT=$O(YSCLTLS(YSCLA,YSCLTPT)) Q:'YSCLTPT  D  Q:YSCLMTCH
 ..S YSCLMULT=YSCLTLS(YSCLA,YSCLTPT),YSCLMULT=$S(YSCLMULT:1000,1:1)
 ..I $D(RESULTS(YSCLTPT,YSCLRANC)),YSCLA="A",RESULTS(YSCLTPT,YSCLRANC)'?1A.E S YSCLMTCH=1,YSCLRANC(YSCLRANC)=RESULTS(YSCLTPT,YSCLRANC)*YSCLMULT_"^"_$$GET1^DIQ(60,YSCLTPT,.01) Q
 ..I $D(RESULTS(YSCLTPT,YSCLRANC)),YSCLA="N",RESULTS(YSCLTPT,YSCLRANC)'?1A.E S YSCLMTCH=1,YSCLRANC(YSCLRANC)=YSCLRANC(YSCLRANC)*((RESULTS(YSCLTPT,YSCLRANC))*.01)_"^"_$$GET1^DIQ(60,YSCLTPT,.01) Q
 ..I $D(RESULTS(YSCLTPT,YSCLRANC)),YSCLA="S",RESULTS(YSCLTPT,YSCLRANC)'?1A.E D
 ...S YSCLSGS="" F  S YSCLSGS=$O(YSCLTLS("B",YSCLSGS)) D  Q:YSCLMTCH
 ....S:'YSCLSGS YSCLSGS="Z" I '$D(RESULTS(YSCLSGS,YSCLRANC)) S RESULTS(YSCLSGS,YSCLRANC)=0
 ....S YSCLMTCH=1,YSCLRANC(YSCLRANC)=YSCLRANC(YSCLRANC)*((RESULTS(YSCLTPT,YSCLRANC)*.01)+(RESULTS(YSCLSGS,YSCLRANC)*.01))_"^"_$$GET1^DIQ(60,YSCLTPT,.01)_"/"_$$GET1^DIQ(60,YSCLSGS,.01) Q
 ..I $D(RESULTS(YSCLTPT,YSCLRANC)),YSCLA="C",RESULTS(YSCLTPT,YSCLRANC)'?1A.E D
 ...S YSCLSGS="" F  S YSCLSGS=$O(YSCLTLS("T",YSCLSGS)) D  Q:YSCLMTCH
 ....S:'YSCLSGS YSCLSGS="Z" I '$D(RESULTS(YSCLSGS,YSCLRANC)) S RESULTS(YSCLSGS,YSCLRANC)=0
 ....S YSCLMTCH=1,YSCLRANC(YSCLRANC)=((RESULTS(YSCLTPT,YSCLRANC)*YSCLMULT)+(RESULTS(YSCLSGS,YSCLRANC)*YSCLMULT))_"^"_$P(^LAB(60,YSCLTPT,0),"^")_"/"_$P($G(^LAB(60,YSCLSGS,0)),"^") Q
 .S YSCLRWBC(YSCLRWBC)="^WBC"
 D KILL
 I '$G(YSCLRANC(+$G(YSCLRWBC))) Q "0^^^^^^"_YSCLFRQ
 I +$G(YSCLRANC(YSCLRWBC))<1000 Q "0^"_$G(YSCLRWBC(YSCLRWBC))_"^"_$S($G(YSCLRANC(YSCLRWBC))="":"^",1:$G(YSCLRANC(YSCLRWBC)))_"^"_(9999999-YSCLRWBC)_"^"_YSCLFRQ
 I +$G(YSCLRANC(YSCLRWBC))<1500 Q "0^"_$G(YSCLRWBC(YSCLRWBC))_"^"_$S($G(YSCLRANC(YSCLRWBC))="":"^",1:$G(YSCLRANC(YSCLRWBC)))_"^"_(9999999-YSCLRWBC)_"^"_YSCLFRQ
 Q "0^"_$G(YSCLRWBC(YSCLRWBC))_"^"_$S($G(YSCLRANC(YSCLRWBC))="":"^",1:$G(YSCLRANC(YSCLRWBC)))_"^"_(9999999-YSCLRWBC)_"^"_YSCLFRQ
 ;;END NCC REMEDIATION << RJS*122
 ;
KILL ;
 ;Q:$D(PSLAST7)  ;RTW
 K FDA,YSCLSGS,Y15,RESULTS,RESULTS1,YSCLA,YSCLA1,YSCLMTCH,YSCLSB1,YSCLSD,YSCLTA,YSCLMULT
 K YSCLTL,YSCLTLS,X1,X2
 Q
 ;
OVERRIDE(DFN) ;Check for an over-ride.   SEE RQ12.11
 N YSCLIEN,YSCLOVRD,ARRAY ;S YSCLIEN=$O(^YSCL(603.01,"C",DFN,0)) Q:YSCLIEN="" 0
 ;BEGIN: JCH - YS*5.01*166
 N YSCLPSN,PSOCZPTS,PSOERR,Y,X
 D GET55(DFN,.YSCLPSN) S YSCLPSN=$G(YSCLPSN(DFN,53)) Q:YSCLPSN="" 0  ; Get current Clozapine number associated with patient's Clozapine registration
 D FIND^DIC(603.01,"","","QX",DFN,"","C","I $P($G(^(0)),""^"")=$G(YSCLPSN)","","PSOCZPTS","PSOERR")
 S YSCLIEN=$G(PSOCZPTS("DILIST",2,1)) Q:YSCLPSN="" 0
 ;END: JCH - YS*5.01*166
 S YSCLOVRD=$$GET1^DIQ(603.01,YSCLIEN,3,"I")
 S:YSCLOVRD'=DT ANQRE=""
 I '$G(PSGCFLG),$G(YSCLOVRD),DT>YSCLOVRD S X=YSCLOVRD,YSCXDATE=$$FMTE^XLFDT(X,"D") W !,"National Override expired at midnight on "_YSCXDATE
 Q YSCLOVRD=DT
ZEOR ;YSCLTST2
 Q
 ;
GET55(DFN,CLOZ55) ; JCH - PSO*7*612 - Get Clozapine "SAND" node from file 55 via PDM API
 Q:'$G(DFN) ""
 K CLOZ55
 D PSS^PSS781(+DFN,"","SAND")
 M CLOZ55(DFN)=^TMP($J,"SAND",DFN)
 Q