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

PSO467PO.m

Go to the documentation of this file.
  1. PSO467PO ;ALB/BWF - patch 467 post-install ; 8/17/2016 1:14pm
  1. ;;7.0;OUTPATIENT PHARMACY;**467**;DEC 1997;Build 153
  1. ;
  1. ; ICR #4677 = $$CREATE^XUSAP (API for Application Proxy)
  1. ; ICR #10141 = BMES^XPDUTL & MES^XPDUTL
  1. ;
  1. ; Application Proxy name = "PSOAPPLICATIONPROXY,PSO"
  1. ; Secondary Menu Option name = "PSO WEB SERVICES OPTION"
  1. ;
  1. RUNALL ; Entry point in the (Patch - PSO*7.0*467)
  1. D BMSG("Starting Post-Init")
  1. D PROXY
  1. D MSG("Post-Init Complete")
  1. D APRIND
  1. D WSERV
  1. D PAYMIG
  1. D INDEX
  1. Q
  1. ;
  1. PROXY ; Create an Application Proxy for PSO application
  1. N X
  1. S X=$$CREATE^XUSAP("PSOAPPLICATIONPROXY,PSO","","PSO WEB SERVICES OPTION")
  1. ;
  1. I +X=0 D Q
  1. .D BMSG(" Application Proxy User - 'PSOAPPLICATIONPROXY,PSO'")
  1. .D MSG(" already exists in the NEW PERSON file (#200)"),MSG("")
  1. ;
  1. I +X=-1 D Q
  1. .D BMSG(" Application Proxy User - 'PSOAPPLICATIONPROXY,PSO'")
  1. .D MSG(" Unsuccessful; could not create Application Proxy User")
  1. .D MSG(" OR error in call to UPDATE^DIE)"),MSG("")
  1. ;
  1. D BMSG(" *****************************************************************")
  1. D MSG(" ** Application Proxy User - 'PSOAPPLICATIONPROXY,PSO' = created **")
  1. D MSG(" ** Secondary Menu Option - 'PSO WEB SERVICES OPTION' = linked **")
  1. D MSG(" ** to the Application Proxy. **")
  1. D MSG(" ******************************************************************")
  1. D MSG("")
  1. Q
  1. ;
  1. ; A message is also recorded in INSTALL file
  1. ; (#9.7) entry for the installation.
  1. ;
  1. ; Output a message.
  1. MSG(MSG) ; Integration Agreement #10141
  1. D MES^XPDUTL(MSG)
  1. Q
  1. ;
  1. ; Output a message with a blank line added.
  1. BMSG(MSG) ; Integration Agreement #10141
  1. D BMES^XPDUTL(MSG)
  1. Q
  1. ; create the APR index
  1. APRIND ;
  1. N DIK,DA
  1. S DIK="^PSDRUG(",DIK(1)="22^APR"
  1. D ENALL^DIK
  1. Q
  1. ; create web server and service
  1. WSERV ;
  1. N FDA,WSIEN,NWSIEN,WSERVIEN,WSRVIEN
  1. ; if the web service already exists, this has been configured
  1. I $$FIND1^DIC(18.02,,"B","PSO ERX WEB SERVICE") Q
  1. ; set up the web service
  1. S FDA(18.02,"+1,",.01)="PSO ERX WEB SERVICE"
  1. S FDA(18.02,"+1,",.02)=2
  1. S FDA(18.02,"+1,",200)="/INB-ERX/"
  1. D UPDATE^DIE(,"FDA","WSIEN") K FDA
  1. S NWSIEN=$O(WSIEN(0)),NWSIEN=$G(WSIEN(NWSIEN)) Q:'NWSIEN
  1. S FDA(18.12,"+1,",.01)="PSO WEB SERVER"
  1. S FDA(18.12,"+1,",.03)=80
  1. ;S FDA(18.12,"+1,",.04)="vaauserxappdev1.aac.domain.ext"
  1. S FDA(18.12,"+1,",.06)=1
  1. S FDA(18.12,"+1,",.07)=30
  1. S FDA(18.12,"+1,",1.01)=0
  1. D UPDATE^DIE(,"FDA","WSERVIEN") K FDA
  1. S WSRVIEN=$O(WSERVIEN(0)) Q:'WSRVIEN
  1. S WSRVIEN=$G(WSERVIEN(WSRVIEN)) Q:'WSRVIEN
  1. S FDA(18.121,"+1,"_WSRVIEN_",",.01)=NWSIEN
  1. S FDA(18.121,"+1,"_WSRVIEN_",",.06)=1
  1. D UPDATE^DIE(,"FDA",,"ERR") K FDA
  1. Q
  1. CALL ;
  1. N I,X
  1. F I=52.46,52.47,52.48,52.49 D
  1. .S X=0 F S X=$O(^PS(I,X)) Q:'X D
  1. ..S FDA(I,X_",",.01)="@"
  1. D FILE^DIE(,"FDA","FERR") K FDA
  1. Q
  1. ; migrate payer fields for new cardholder and sequence structure
  1. PAYMIG ;
  1. N ERXIEN,BFCIEN,CHID,BIENS,FDA,DA,DR
  1. ; no need to reindex if there is no data
  1. I '$O(^PS(52.49,0)) Q
  1. S ERXIEN=0 F S ERXIEN=$O(^PS(52.49,ERXIEN)) Q:'ERXIEN D
  1. .; do not process entries that have already been converted
  1. .Q:$$GET1^DIQ(52.49,ERXIEN,44,"I")=1
  1. .S BFCIEN=0 F S BFCIEN=$O(^PS(52.49,ERXIEN,18,BFCIEN)) Q:'BFCIEN D
  1. ..S BIENS=BFCIEN_","_ERXIEN_","
  1. ..S CHID=$$GET1^DIQ(52.4918,BIENS,.01,"E")
  1. ..; move the cardholder id to field 7 and change the .01 field to the IEN (as a sequence)
  1. ..S FDA(52.4918,BIENS,7)=CHID
  1. ..S FDA(52.4918,BIENS,.01)=BFCIEN
  1. ..D FILE^DIE(,"FDA") K FDA
  1. .; set the conversion flag so this conversion will not run again for this entry.
  1. .S DIE="^PS(52.49,",DA=ERXIEN,DR="44///1" D ^DIE K DIE
  1. Q
  1. ; reindex all files
  1. INDEX ;
  1. N DIK,FILE
  1. ; no need to reindex if there is no data
  1. I '$O(^PS(52.49,0)) Q
  1. F FILE="52.45","52.46","52.47","52.48","52.49" D
  1. .S DIK="^PS("_FILE_"," D IXALL2^DIK,IXALL^DIK
  1. Q