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

AMER3P08.m

Go to the documentation of this file.
  1. AMER3P08 ;GDIT/HS/BEE - AMER v3.0 Patch 8 ENV Check/PST Check ; 07 Oct 2013 11:33 AM
  1. ;;3.0;ER VISIT SYSTEM;**8**;MAR 03, 2009;Build 23
  1. ;
  1. ;Check for AMER*3.0*7
  1. I '$$INSTALLD("AMER*3.0*7") D FIX(2)
  1. ;
  1. Q
  1. ;
  1. PST ;Post installation front end
  1. ;
  1. ;Need to loop through old PRESENTING COMPLAINT (#8) field and move results to new
  1. ;PRESENTING COMPLAINT field (#23)
  1. ;
  1. NEW AMERADM,X1,X2,X,II,QA3IEN
  1. ;
  1. ;Switch ER INPUT MAP QA3 entry to save in field 23 instead of field 8
  1. S QA3IEN=$O(^AMER(2.3,"B","QA3",""))
  1. I QA3IEN]"" D
  1. . NEW AMERUPD,ERROR
  1. . S AMERUPD(9009082.3,QA3IEN_",",.04)=23
  1. . D FILE^DIE("","AMERUPD","ERROR")
  1. ;
  1. ;Move Presenting Complaint data from field 8 to field 23
  1. ;
  1. ;Reset Monitoring Global
  1. K ^XTMP("AMERP8LOG")
  1. ;
  1. ;Get later date
  1. S X1=DT,X2=60 D C^%DTC
  1. ;
  1. ;Set up Monitoring Global
  1. S ^XTMP("AMERP8LOG",0)=X_U_DT_U_"Log of entries moved from old PC to new PC"
  1. ;
  1. S (II,AMERADM)=0 F S AMERADM=$O(^AMERADM(AMERADM)) Q:'AMERADM D
  1. . NEW OLDPC,NEWPC,AMERUPD,ERROR
  1. . ;
  1. . ;Retrieve new presenting complaint value (already converted)
  1. . S NEWPC=$$GET1^DIQ(9009081,AMERADM_",",23,"I") Q:NEWPC]""
  1. . ;
  1. . ;Retrieve old presenting complaint value
  1. . S OLDPC=$$GET1^DIQ(9009081,AMERADM_",",8,"I") Q:OLDPC=""
  1. . ;
  1. . ;Save to new
  1. . S AMERUPD(9009081,AMERADM_",",23)=OLDPC
  1. . D FILE^DIE("","AMERUPD","ERROR")
  1. . S II=II+1,^XTMP("AMERP8LOG",9009081,II)=AMERADM_U_OLDPC
  1. ;
  1. Q
  1. ;
  1. INSTALLD(AMERSTAL) ;EP - Determine if patch AMERSTAL was installed, where
  1. ; AMERSTAL is the name of the INSTALL. E.g "AMER*3.0*7"
  1. ;
  1. NEW AMERY,INST
  1. ;
  1. S AMERY=$O(^XPD(9.7,"B",AMERSTAL,""))
  1. S INST=$S(AMERY>0:1,1:0)
  1. D IMES(AMERSTAL,INST)
  1. Q INST
  1. ;
  1. IMES(AMERSTAL,Y) ;Display message to screen
  1. D MES^XPDUTL($$CJ^XLFSTR("Patch """_AMERSTAL_""" is"_$S(Y<1:" *NOT*",1:"")_" installed.",IOM))
  1. Q
  1. ;
  1. FIX(X) ;
  1. KILL DIFQ
  1. I X=3 S XPDQUIT=2 Q
  1. S XPDQUIT=X
  1. W *7,!,$$CJ^XLFSTR("This patch must be installed prior to the installation of AMER*3.0*7",IOM)
  1. Q