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

DGPWPOST.m

Go to the documentation of this file.
  1. DGPWPOST ;ALB/CM POST INIT FOR WRISTBAND ; 12/4/95
  1. ;;5.3;Registration;**62,1015**;Aug 13, 1993;Build 21
  1. ;
  1. ;This post init will add the Wristband entry to the EMBOSSED CARD
  1. ;TYPE file #39.1. The entry is added via the post init due to the
  1. ;pointer values that are included in the entry, they could be different
  1. ;values from site to site.
  1. ;
  1. EN ;
  1. ;Add WRISTBAND entry to the file
  1. W !!,"Post Init...."
  1. S DIC="^DIC(39.1,",DIC(0)="LZM",DLAYGO=39.1,X="WRISTBAND"
  1. D ^DIC
  1. K DIC,DLAYGO,X
  1. I +Y<0 W !,"Unable to add WRISTBAND entry to file 39.1",!,"Contact your IRMFO for assistance.",! Q
  1. I $P(Y,U,3)'=1 W !,"An entry already exists for WRISTBAND in EMBOSSED CARD file (#39.1)." Q
  1. N ENTRY
  1. S ENTRY=+Y
  1. W !,"Adding WRISTBAND entry to EMBOSSED CARD TYPE file (#39.1)...",!
  1. ;
  1. ;look up data items in Embossing Data file #39.2 to be added to the
  1. ;WRISTBAND entry
  1. ;
  1. N WARD,PID,BIRTH,BLANK,ALL,REL,NAME
  1. ;
  1. F X="WARD LOCATION","PID","NAME","DOB","RELIGION","BLANK","ALLERGY" D
  1. .S DIC="^DIC(39.2,",DIC(0)="ZMOX",DLAYGO=39.2
  1. .D ^DIC
  1. .I +Y<0 W !,"Unable to find "_X_" in file 39.2.",!,"Contact your IRMFO for assistance.",! Q
  1. .I X="WARD LOCATION" S WARD=+Y
  1. .I X="PID" S PID=+Y
  1. .I X="NAME" S NAME=+Y
  1. .I X="DOB" S BIRTH=+Y
  1. .I X="RELIGION" S REL=+Y
  1. .I X="BLANK" S BLANK=+Y
  1. .I X="ALLERGY" S ALL=+Y
  1. .K Y,X,DIC
  1. ;
  1. ;Hard set the global entry
  1. ;
  1. S ^DIC(39.1,ENTRY,0)="WRISTBAND^^^1^^"_ENTRY
  1. S ^DIC(39.1,ENTRY,1,0)="^39.11^^4"
  1. S ^DIC(39.1,ENTRY,1,1,0)=1
  1. S ^DIC(39.1,ENTRY,1,1,1,0)="^39.12P^2^2"
  1. S ^DIC(39.1,ENTRY,1,1,1,1,0)=NAME_"^1^30"
  1. S ^DIC(39.1,ENTRY,1,1,1,2,0)=WARD_"^32^30"
  1. S ^DIC(39.1,ENTRY,1,2,0)=2
  1. S ^DIC(39.1,ENTRY,1,2,1,0)="^39.12P^3^3"
  1. S ^DIC(39.1,ENTRY,1,2,1,1,0)=PID_"^1^14"
  1. S ^DIC(39.1,ENTRY,1,2,1,2,0)=BIRTH_"^17^12"
  1. S ^DIC(39.1,ENTRY,1,2,1,3,0)=REL_"^35^2"
  1. S ^DIC(39.1,ENTRY,1,3,0)=3
  1. S ^DIC(39.1,ENTRY,1,3,1,0)="^39.12P^1^1"
  1. S ^DIC(39.1,ENTRY,1,3,1,1,0)=BLANK_"^1"
  1. S ^DIC(39.1,ENTRY,1,4,0)=4
  1. S ^DIC(39.1,ENTRY,1,4,1,0)="^39.12P^1^1"
  1. S ^DIC(39.1,ENTRY,1,4,1,1,0)=ALL_"^1^40"
  1. ;
  1. ;Re-index "C" cross reference
  1. S DIK="^DIC(39.1,",DA=ENTRY,DIK(1)="5^C"
  1. D EN^DIK
  1. K DIK,DA
  1. ;
  1. W !,"Post Init completed."
  1. Q