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

BDGP1001.m

Go to the documentation of this file.
  1. BDGP1001 ;NEW PROGRAM [ 01/06/2005 11:38 AM ]
  1. ;;5.3;PIMS;**1001**;APR 26, 2002
  1. ;
  1. POST ;
  1. W !,"** CHECKING ENVIRONMENT **",!!
  1. NEW VER,X
  1. S VER=$$VERSION^XPDUTL("PIMS")
  1. I VER'=5.3 D
  1. . W !,"You must first install PIMS 5.3"
  1. . I VER["t"!(VER["T") W !,"Your site may have a 'T' version loaded"
  1. . S XPDQUIT=2
  1. E D
  1. .D UPDTVER ;Updates the two DPT version nodes
  1. .D BSDXREF ;Ensures that the xref AIHSDAM is/was created
  1. .D ADDPROT ;Ensures that ALL 14 protocols are included
  1. Q
  1. ;
  1. BSDXREF ;Assures that the AIHSDAM xref is/was created in ^SC (file#44)
  1. ; Some inpatient sites may not have had this xref created during
  1. ; the initial install of PIMS 5.3
  1. D AIHSDAM^BSDPOST ;no check performed in BSDPOST prior to running
  1. Q
  1. UPDTVER ;Update the appropriate 'version' nodes for DPT.
  1. ;Using 'DPT' & the "C" Xref (PREFIX) should give you more than one
  1. ; entry, thus the reason for the $O. The two entries are:
  1. ; REGISTRATION^DG^ADT and PATIENT FILE^DPT^FILE 2
  1. I $G(VER)]"" D
  1. .S BDGN=0
  1. .F S BDGN=$O(^DIC(9.4,"C","DPT",BDGN)) Q:'BDGN D
  1. ..S ^DIC(9.4,BDGN,"VERSION")=VER ;update current version field
  1. ..;
  1. ..; now add version multiple
  1. ..I '$O(^DIC(9.4,BDGN,22,"B",5.3,0)) D
  1. ...S DIC="^DIC(9.4,"_BDGN_",22,",DIC(0)="L",X=5.3
  1. ...S DIC("P")=$P(^DD(9.4,22,0),U,2)
  1. ...S DIC("DR")="2///"_DT_";3///`"_DUZ,DA(1)=BDGN
  1. ...D ^DIC
  1. Q
  1. ;
  1. ADDPROT ;This sub-rtn was MOSTLY copied from the original code. The change
  1. ; that was made was in the 'F BDGI=1:1:14' it was 1:1:13.
  1. NEW IEN,ITEM,BDGE
  1. S BDGE=$O(^ORD(101,"B","BDGPM MOVEMENT EVENTS",0)) I 'BDGE Q
  1. ;
  1. F BDGI=1:1:14 S ITEM=$P($T(PROT+BDGI),";;",2) D
  1. . I $D(^ORD(101,"B",ITEM)) D ;if protocol exists
  1. .. S IEN=$O(^ORD(101,"B",ITEM,0)) Q:'IEN
  1. .. Q:$D(^ORD(101,BDGE,10,"B",IEN)) ;already added to event driver
  1. .. ;
  1. .. ; go ahead and add it
  1. .. S DIC="^ORD(101,"_BDGE_",10,",DIC(0)="L",DLAYGO=101.01
  1. .. S DA(1)=BDGE,DIC("P")="101.01PA",X=IEN
  1. .. S DIC("DR")="3///"_$P($T(PROT+BDGI),";;",3)
  1. .. K DD,DO D FILE^DICN
  1. K X S X=$$REPEAT^XLFSTR(" ",20)_"Done." D MES^XPDUTL(.X)
  1. Q
  1. PROT ;; Protocols to add to event driver
  1. ;;ORU PATIENT MOVMT;;101;;
  1. ;;ORU AUTOLIST;;105;;
  1. ;;PSJ OR PAT ADT;;120;;
  1. ;;GMRADGPM MARK CHART;;210;;
  1. ;;AQAL ADT EVENT;;150;;
  1. ;;FHWMAS;;160;;
  1. ;;SR IHS EVENT-ADMIT;;170;;
  1. ;;MAGD DHCP-PACS ADT EVENTS;;180;;
  1. ;;VEFSP PYXIS;;140;;
  1. ;;AMCO ADT EVENT;;130;;
  1. ;;BHL ADMIT A PATIENT;;5;;
  1. ;;BHL TRANSFER A PATIENT;;6;;
  1. ;;BHL DISCHARGE A PATIENT;;7;;
  1. ;;BHL PYXIS ADT;;141;;