- GMPLIPST ; SLC/MKB -- Problem List post-init rtn ;5/18/94 10:30
- ;;2.0;Problem List;;Aug 25, 1994
- EN ; entry point
- D ^GMPLONIT ; install protocols
- W !!,">>> Installing List Templates ... " D ^GMPLIL
- I '$D(^GMT(142)) W !!,$C(7),">>> HEALTH SUMMARY is not installed on this system!",!," After installing Health Summary, D HS^GMPLIPST to set up",!," Problem List components."
- E D HS
- D CKPARAM ; ck Verify parameter w/PL menu for Verify action
- I +$O(^AUPNPROB(0)),'$D(^AUPNPROB("C")) D ; set new Xrefs for PCE sites
- . W !!,">>> Setting new 'ACTIVE' and 'C' cross-references ..."
- . S DIK="^AUPNPROB(",DIK(1)=".12^ACTIVE" D ENALL^DIK W "."
- . S DIK="^AUPNPROB(",DIK(1)="1.01^C" D ENALL^DIK W "."
- S XQORM=$O(^ORD(101,"B","GMPL HIDDEN MENU",0))_";ORD(101,"
- D XREF^XQORM K XQORM ; recompile menu in ^XUTL
- EN1 ; Populate fld 1.7 in Service file, set new Xref
- I '$D(^DIC(49,"ACHLD")) S DIK="^DIC(49,",DIK(1)="1.6^ACHLD" D ENALL^DIK
- W !!!,">>> Please update your Service file (#49) at this time ..."
- D ^GMPLISRV
- D TIME
- Q
- HS ; install Health Summary components
- N DIE,DIF,XCNP,XCN,DIC,DLAYGO,DINUM,X,Y,HSVER,INCLUDE
- W !!,">>> Installing Health Summary components ... "
- S HSVER=$G(^DD(142,0,"VR"))
- W !,"'GMTSPLST' Routine..."
- S X="GMPLHSPL",XCNP=0,DIF="^UTILITY(""GMPLHSPL""," X ^%ZOSF("LOAD")
- S X="GMTSPLST",XCN=2,DIE="^UTILITY(""GMPLHSPL""," X ^%ZOSF("SAVE")
- W "Filed." K ^UTILITY("GMPLHSPL")
- HS1 ; filing components in HEALTH SUMMARY COMPONENT FILE
- W !,"'PROBLEM LIST ACTIVE' Component..."
- S (DIC,DLAYGO)=142.1,DIC(0)="NXL",X="PROBLEM LIST ACTIVE",DINUM=59
- D ^DIC I +Y'>0 W $C(7),"Could not install." G HS2
- S DIE=DIC,DA=+Y,DR="1///^S X=""ACTIVE""_$C(59)_""GMTSPLST"";3///PLA"
- I HSVER>1.2 S DR=DR_";9///Active Problems"
- D ^DIE
- S ^GMT(142.1,+DA,3.5,0)="^^1^1^"_DT_"^"
- S ^GMT(142.1,+DA,3.5,1,0)="This component lists all known active problems for a patient."
- W "Filed."
- HS2 W !,"'PROBLEM LIST INACTIVE' Component..."
- S (DIC,DLAYGO)=142.1,DIC(0)="NXL",X="PROBLEM LIST INACTIVE",DINUM=60
- D ^DIC I +Y'>0 W $C(7),"Could not install." G HS3
- S DIE=DIC,DA=+Y,DR="1///^S X=""INACT""_$C(59)_""GMTSPLST"";3///PLI"
- I HSVER>1.2 S DR=DR_";9///Inactive Problems"
- D ^DIE
- S ^GMT(142.1,+DA,3.5,0)="^^1^1^"_DT_"^"
- S ^GMT(142.1,+DA,3.5,1,0)="This component lists all known inactive problems for a patient."
- W "Filed."
- HS3 W !,"'PROBLEM LIST ALL' Component..."
- S (DIC,DLAYGO)=142.1,DIC(0)="NXL",X="PROBLEM LIST ALL",DINUM=61
- D ^DIC I +Y'>0 W $C(7),"Could not install." G HSADH
- S DIE=DIC,DA=+Y,DR="1///^S X=""ALL""_$C(59)_""GMTSPLST"";3///PLL"
- I HSVER>1.2 S DR=DR_";9///All Problems"
- D ^DIE
- S ^GMT(142.1,+DA,3.5,0)="^^2^2^"_DT_"^"
- S ^GMT(142.1,+DA,3.5,1,0)="This component lists all known problems, both active and inactive,",^GMT(142.1,+DA,3.5,2,0)="for a patient."
- W "Filed."
- HSADH ; add components to Ad Hoc HS
- W !!,">>> Installing new components in Ad Hoc Health Summary ..."
- S INCLUDE=0 D ENPOST^GMTSLOAD
- Q
- ;
- TIME ; Write start and stop times for inits
- N %,%H,%I,X,Y D NOW^%DTC,YX^%DTC S GMPLSTOP=Y
- W !!!,"Initialization started: "_$G(GMPLSTRT)
- W !,"Initialization finished: "_GMPLSTOP,!
- K GMPLSTOP,GMPLSTRT
- Q
- ;
- CKPARAM ; Ck PL menu for Verify action based on parameter
- N PARAM,MENU,VERFY,BLANK,DIE,DR,DA
- S PARAM=$P($G(^GMPL(125.99,1,0)),U,2)
- S DA(1)=$O(^ORD(101,"B","GMPL PROBLEM LIST",0))
- S VERFY=$O(^ORD(101,"B","GMPL VERIFY",0)),DA=$O(^ORD(101,DA(1),10,"B",+VERFY,0))
- S MNEM=$P($G(^ORD(101,DA(1),10,DA,0)),U,2),BLANK=" "
- Q:PARAM&(MNEM="$") Q:'PARAM&(MNEM="") ; ok
- S DR=$S(PARAM:"2////$;6///@",1:"2///@;6///^S X=BLANK")
- S DIE="^ORD(101,"_DA(1)_",10," D ^DIE
- Q
- GMPLIPST ; SLC/MKB -- Problem List post-init rtn ;5/18/94 10:30
- +1 ;;2.0;Problem List;;Aug 25, 1994
- EN ; entry point
- +1 ; install protocols
- DO ^GMPLONIT
- +2 WRITE !!,">>> Installing List Templates ... "
- DO ^GMPLIL
- +3 IF '$DATA(^GMT(142))
- WRITE !!,$CHAR(7),">>> HEALTH SUMMARY is not installed on this system!",!," After installing Health Summary, D HS^GMPLIPST to set up",!," Problem List components."
- +4 IF '$TEST
- DO HS
- +5 ; ck Verify parameter w/PL menu for Verify action
- DO CKPARAM
- +6 ; set new Xrefs for PCE sites
- IF +$ORDER(^AUPNPROB(0))
- IF '$DATA(^AUPNPROB("C"))
- Begin DoDot:1
- +7 WRITE !!,">>> Setting new 'ACTIVE' and 'C' cross-references ..."
- +8 SET DIK="^AUPNPROB("
- SET DIK(1)=".12^ACTIVE"
- DO ENALL^DIK
- WRITE "."
- +9 SET DIK="^AUPNPROB("
- SET DIK(1)="1.01^C"
- DO ENALL^DIK
- WRITE "."
- End DoDot:1
- +10 SET XQORM=$ORDER(^ORD(101,"B","GMPL HIDDEN MENU",0))_";ORD(101,"
- +11 ; recompile menu in ^XUTL
- DO XREF^XQORM
- KILL XQORM
- EN1 ; Populate fld 1.7 in Service file, set new Xref
- +1 IF '$DATA(^DIC(49,"ACHLD"))
- SET DIK="^DIC(49,"
- SET DIK(1)="1.6^ACHLD"
- DO ENALL^DIK
- +2 WRITE !!!,">>> Please update your Service file (#49) at this time ..."
- +3 DO ^GMPLISRV
- +4 DO TIME
- +5 QUIT
- HS ; install Health Summary components
- +1 NEW DIE,DIF,XCNP,XCN,DIC,DLAYGO,DINUM,X,Y,HSVER,INCLUDE
- +2 WRITE !!,">>> Installing Health Summary components ... "
- +3 SET HSVER=$GET(^DD(142,0,"VR"))
- +4 WRITE !,"'GMTSPLST' Routine..."
- +5 SET X="GMPLHSPL"
- SET XCNP=0
- SET DIF="^UTILITY(""GMPLHSPL"","
- XECUTE ^%ZOSF("LOAD")
- +6 SET X="GMTSPLST"
- SET XCN=2
- SET DIE="^UTILITY(""GMPLHSPL"","
- XECUTE ^%ZOSF("SAVE")
- +7 WRITE "Filed."
- KILL ^UTILITY("GMPLHSPL")
- HS1 ; filing components in HEALTH SUMMARY COMPONENT FILE
- +1 WRITE !,"'PROBLEM LIST ACTIVE' Component..."
- +2 SET (DIC,DLAYGO)=142.1
- SET DIC(0)="NXL"
- SET X="PROBLEM LIST ACTIVE"
- SET DINUM=59
- +3 DO ^DIC
- IF +Y'>0
- WRITE $CHAR(7),"Could not install."
- GOTO HS2
- +4 SET DIE=DIC
- SET DA=+Y
- SET DR="1///^S X=""ACTIVE""_$C(59)_""GMTSPLST"";3///PLA"
- +5 IF HSVER>1.2
- SET DR=DR_";9///Active Problems"
- +6 DO ^DIE
- +7 SET ^GMT(142.1,+DA,3.5,0)="^^1^1^"_DT_"^"
- +8 SET ^GMT(142.1,+DA,3.5,1,0)="This component lists all known active problems for a patient."
- +9 WRITE "Filed."
- HS2 WRITE !,"'PROBLEM LIST INACTIVE' Component..."
- +1 SET (DIC,DLAYGO)=142.1
- SET DIC(0)="NXL"
- SET X="PROBLEM LIST INACTIVE"
- SET DINUM=60
- +2 DO ^DIC
- IF +Y'>0
- WRITE $CHAR(7),"Could not install."
- GOTO HS3
- +3 SET DIE=DIC
- SET DA=+Y
- SET DR="1///^S X=""INACT""_$C(59)_""GMTSPLST"";3///PLI"
- +4 IF HSVER>1.2
- SET DR=DR_";9///Inactive Problems"
- +5 DO ^DIE
- +6 SET ^GMT(142.1,+DA,3.5,0)="^^1^1^"_DT_"^"
- +7 SET ^GMT(142.1,+DA,3.5,1,0)="This component lists all known inactive problems for a patient."
- +8 WRITE "Filed."
- HS3 WRITE !,"'PROBLEM LIST ALL' Component..."
- +1 SET (DIC,DLAYGO)=142.1
- SET DIC(0)="NXL"
- SET X="PROBLEM LIST ALL"
- SET DINUM=61
- +2 DO ^DIC
- IF +Y'>0
- WRITE $CHAR(7),"Could not install."
- GOTO HSADH
- +3 SET DIE=DIC
- SET DA=+Y
- SET DR="1///^S X=""ALL""_$C(59)_""GMTSPLST"";3///PLL"
- +4 IF HSVER>1.2
- SET DR=DR_";9///All Problems"
- +5 DO ^DIE
- +6 SET ^GMT(142.1,+DA,3.5,0)="^^2^2^"_DT_"^"
- +7 SET ^GMT(142.1,+DA,3.5,1,0)="This component lists all known problems, both active and inactive,"
- SET ^GMT(142.1,+DA,3.5,2,0)="for a patient."
- +8 WRITE "Filed."
- HSADH ; add components to Ad Hoc HS
- +1 WRITE !!,">>> Installing new components in Ad Hoc Health Summary ..."
- +2 SET INCLUDE=0
- DO ENPOST^GMTSLOAD
- +3 QUIT
- +4 ;
- TIME ; Write start and stop times for inits
- +1 NEW %,%H,%I,X,Y
- DO NOW^%DTC
- DO YX^%DTC
- SET GMPLSTOP=Y
- +2 WRITE !!!,"Initialization started: "_$GET(GMPLSTRT)
- +3 WRITE !,"Initialization finished: "_GMPLSTOP,!
- +4 KILL GMPLSTOP,GMPLSTRT
- +5 QUIT
- +6 ;
- CKPARAM ; Ck PL menu for Verify action based on parameter
- +1 NEW PARAM,MENU,VERFY,BLANK,DIE,DR,DA
- +2 SET PARAM=$PIECE($GET(^GMPL(125.99,1,0)),U,2)
- +3 SET DA(1)=$ORDER(^ORD(101,"B","GMPL PROBLEM LIST",0))
- +4 SET VERFY=$ORDER(^ORD(101,"B","GMPL VERIFY",0))
- SET DA=$ORDER(^ORD(101,DA(1),10,"B",+VERFY,0))
- +5 SET MNEM=$PIECE($GET(^ORD(101,DA(1),10,DA,0)),U,2)
- SET BLANK=" "
- +6 ; ok
- IF PARAM&(MNEM="$")
- QUIT
- IF 'PARAM&(MNEM="")
- QUIT
- +7 SET DR=$SELECT(PARAM:"2////$;6///@",1:"2///@;6///^S X=BLANK")
- +8 SET DIE="^ORD(101,"_DA(1)_",10,"
- DO ^DIE
- +9 QUIT