CDSPPST3 ;Post install for CDSP*1*3
;;1.0;Clinical Decision Support Platfrom;**3**;June 9, 2023@10:40;Build 12
;;VHA Directive 6402, this routine should not be modified
Q
;Start here
; Code contains 2 entry points EN1 and EN2. EN1 called from Post Install Routie in the package builed
;EN2 is called internally from the end point of EN!.
;EN1 will add CDSP APP to file 8925.1, EN2 will add CDSP SERVICE to the same file
EN ;
N CDSPENTRY1,CDSPENTRY2,DA,DIC,DIE,DLAYGO,DR,X,Y
S DIC="^XWB(8994.5,",DIC(0)="L",DLAYGO=8994.5,X="CDSP APP" D ^DIC S CDSPENTRY1=Y Q:'+Y D ; quit if entry in not added
.I '$P(Y,U,3) Q ; safety check only run once - quit if the entry already exist
.S DIE=DIC,DA=+CDSPENTRY1,DR=".02///CDSP RPC CONTEXT"_";.03///"_"qB7SKnu4pkt67ViXENchpbQjUvecxrpmn1N8vOtnTf8="
.; everything set up now add the new Remote Application with Option Context and HASHED Appliationcode
.; now call DIE
.D ^DIE
.; now we need to add the CALLBACKTYPE and CALLBACKPORT
.S DA(1)=+CDSPENTRY1,DIC(0)="L",DIC="^XWB(8994.5,"_DA(1)_",1,",X="R" D ^DIC Q:'Y S DA=+Y
.S $P(^XWB(8994.5,DA(1),1,DA,0),U,2,3)="-1^XXX",DIK="^XWB(8994,5,DA(1),1,DA," D IX1^DIK
D EN2
Q
EN2 ;
; add new REMOTE APPLICATION
; N CDSPENTRY1,CDSPENTRY2,DIC,DLAYGO
S DIC="^XWB(8994.5,",DIC(0)="L",DLAYGO=8994.5,X="CDSP SERVICE" D ^DIC S CDSPENTRY2=Y Q:'+Y D ; quit if entry in not added
.I '$P(Y,U,3) Q ; safety check only run once - quit if the entry already exist
.S DIE=DIC,DA=+CDSPENTRY2,DR=".02///CDSP SERVICE CONTEXT"_";.03///"_"+R84A/NdVpo+dVz2AW6syzPik93rzXw8rJDreJCeUk0="
.; everything set up now add the new Remote Application with Option Context and HASHED Appliationcode
.; now call DIE
.D ^DIE
.; now we need to add the CALLBACKTYPE and CALLBACKPORT for this entry
.S DA(1)=+CDSPENTRY2,DIC(0)="L",DIC="^XWB(8994.5,"_DA(1)_",1,",X="R" D ^DIC Q:'Y S DA=+Y
.S $P(^XWB(8994.5,DA(1),1,DA,0),U,2,3)="-1^XXX",DIK="^XWB(8994,5,DA(1),1,DA," D IX1^DIK