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

DVBAPOST.m

Go to the documentation of this file.
  1. DVBAPOST ;ALBANY-ISC/GTS-AMIE 2.6 POST-INIT RTN ;1/15/93
  1. ;;2.7;AMIE;;Apr 10, 1995
  1. ;
  1. EN D SET1^DVBAUTL1
  1. K ^TMP("DVBA",$J)
  1. W !,"Setting up List Manager Templates",!
  1. D ^DVBAL ;set up templates used by List Manager screens
  1. D ^DVBAONIT ;calls the onits to set up the List Manager screens/actions
  1. D REINDAC^DVBAPST1
  1. D REINDAF^DVBAPST1
  1. D REINDAE^DVBAPST1
  1. EN12 D ^DVBAPOPU ;populates various global information
  1. EN14 D ^DVBAPOP2 ;populates the pointer field of 396.6
  1. EN11 D EN^DVBAPADD ;adds new disability conditions
  1. EN10 D ^DVBAORPH ;adds orphan exams.
  1. EN1 K STOP
  1. D CHECK ; checks if pre init ran ok.
  1. I $D(STOP) D SE G MAIL ;stops if pre init did not run ok.
  1. EN2 D EN^DVBAPLNG ;updates the long description of file 31.
  1. EN3 K STOP
  1. D EN^DVBAPLL ;updates the local lookup file with file 31.
  1. I $D(STOP) D SE1 G MAIL ;stops if problems adding to Local Lookup file.
  1. D ORPHAN^DVBAPCXR
  1. EN4 ;;;D EN^DVBAPSHT ;enters the short cuts into the MTLU files. (DVBAPH1-99)
  1. EN5 D EN^DVBAPKY ;enters the keywords into the MTLU files. (DVBAPK1-99)
  1. EN13 D EN^DVBAPOKY ;enters the orphan keywords into the MTLU files. (DVBAPOK1)
  1. EN6 D EN^DVBAPSYN ;enters the synonyms into the MTLU files. (DVBAPS1-99)
  1. EN7 D EN^DVBAPBDY ;enters the disability codes into the body system file. (DVBAPB1-99)
  1. EN8 D EN^DVBAPWKS ;enters the disability codes into the AMIE worksheets. (DVBAPW1-99)
  1. D FINISHED ;prints out a completed message
  1. MAIL S V3=$$MAL($J) ;builds and sends the mail message from the post init running
  1. D EXIT^DVBAUTL1
  1. Q
  1. ;
  1. FINISHED ;
  1. N VAR
  1. S VAR="The Post-Init has completed."
  1. W *7,!!!,VAR
  1. D BUMP(VAR)
  1. Q
  1. ;
  1. CHECK ;checks for the 'post' node to see if the pre init ran ok.
  1. I '$D(^DVB(396.1,1,"POST")) S STOP=1 Q
  1. I ^DVB(396.1,1,"POST")']"" S STOP=1 Q
  1. Q
  1. MAL(V2) ;builds a mail message and sends to the DUZ defined. v2 must be the
  1. ;$J from the job of the post init.
  1. ;
  1. N LNE,LNCNT
  1. S XMDUZ="AMIE POST INIT"
  1. S XMSUB="AMIE v2.7 install results"
  1. D XMZ^XMA2 ;** Get message number
  1. I XMZ'>0 DO
  1. .W !!,"Mail Message containing Error Log has failed!",!
  1. .W "Errors contained in ^TMP(""DVBA"","_V2_") global.",!
  1. .W "Investigate this global to determine any existing problems."
  1. .W !!
  1. I XMZ>0 DO
  1. .F LNE=0:0 S LNE=$O(^TMP("DVBA",V2,LNE)) Q:'LNE DO
  1. ..S ^XMB(3.9,XMZ,2,LNE,0)=(^TMP("DVBA",V2,LNE)),LNCNT=LNE
  1. .S ^XMB(3.9,XMZ,2,0)="^3.92A^"_LNCNT_"^"_LNCNT_"^"_DT
  1. .K XMDUN
  1. .S (XMY(DUZ),XMY(.5))=""
  1. .D ENT1^XMD
  1. .W !!,"Mail message containing Error Log has been sent.",!
  1. .W "Check your mail to see this log.",!!
  1. .K ^TMP("DVBA",V2)
  1. Q 1
  1. ;
  1. SET ;set necessary local variables
  1. S CNT=1
  1. Q
  1. ;
  1. SE S VAR="The pre-init found a problem in the version of MTLU and KERNEL."
  1. W !!,VAR D BUMPBLK,BUMP(VAR)
  1. S VAR="Please review and correct. See install guide for further details."
  1. W !,VAR D BUMP(VAR)
  1. S VAR="No updates have occurred to the following files:"
  1. W !,VAR D BUMP(VAR)
  1. S VAR=" Local Lookup"
  1. W !,VAR D BUMP(VAR)
  1. S VAR=" Local keyword"
  1. W !,VAR D BUMP(VAR)
  1. S VAR=" Local Synonym"
  1. W !,VAR D BUMP(VAR)
  1. ;;;S VAR=" Local Shortcut"
  1. ;;;W !,VAR D BUMP(VAR)
  1. S VAR=" 2507 Body System"
  1. W !,VAR D BUMP(VAR)
  1. S VAR=" AMIE Exam file."
  1. W !,VAR D BUMP(VAR)
  1. S VAR=" Long Descriptions of the Disability Condition file."
  1. W !,VAR D BUMP(VAR)
  1. Q
  1. ;
  1. SE1 ;
  1. S VAR="The post init could not add to the Local Lookup file."
  1. W !!,VAR D BUMPBLK,BUMP(VAR)
  1. S VAR="No updates have occurred to the following files:"
  1. W !,VAR D BUMP(VAR)
  1. S VAR=" Local keyword"
  1. W !,VAR D BUMP(VAR)
  1. S VAR=" Local Synonym"
  1. W !,VAR D BUMP(VAR)
  1. S VAR=" Local Shortcut"
  1. W !,VAR D BUMP(VAR)
  1. S VAR=" 2507 Body System"
  1. W !,VAR D BUMP(VAR)
  1. S VAR=" AMIE Exam file."
  1. W !,VAR D BUMP(VAR)
  1. Q
  1. ;
  1. BUMP(V1) ;adds the entry and bumps the general counter.
  1. S ^TMP("DVBA",$J,CNT)=V1
  1. S CNT=CNT+1
  1. Q
  1. ;
  1. BUMPBLK ;adds a blank line to the array
  1. S ^TMP("DVBA",$J,CNT)=""
  1. S CNT=CNT+1
  1. Q
  1. ;
  1. OPEN F LP3=1:1 S LP4=$T(OPT+LP3) Q:LP4'[";;" S LP4=$P(LP4,";;",2) DO
  1. .S DIC="^DIC(19,",DIC(0)="MZ",X=LP4
  1. .D ^DIC
  1. .K DIC
  1. .I Y<0 D ERR Q
  1. .I Y>0 DO
  1. ..S DIE="^DIC(19,",DIC(0)="MZ",DA=+Y,DR="2///@"
  1. ..D ^DIE
  1. ..W !,LP4," Now in order!"
  1. ..K DIE,DIC,VAR,DR
  1. ..Q
  1. .K Y
  1. .Q
  1. K DIC,DIE,X,Y,DA,DR
  1. S DIC="^ORD(101,",DIC(0)="MZ",X="DVBA C&P SCHD EVENT"
  1. D ^DIC
  1. K DIC
  1. I Y<0 D ERR
  1. I Y>0 DO
  1. .S DIE="^ORD(101,",DIC(0)="MZ",DA=+Y,DR="2///@"
  1. .D ^DIE
  1. .W !,"DVBA C&P SCHD EVENT Now in order!"
  1. K DIC,DIE,X,Y,LP3,LP4,DA,DR
  1. Q
  1. ;
  1. ERR ;
  1. W "Could not find menu option ",X," NOT opened!"
  1. Q
  1. ;
  1. OPT ;
  1. ;;DVBA MEDICAL ADM 7131 MENU
  1. ;;DVBA REGIONAL OFFICE MENU
  1. ;;DVBA C PROCESS MAIL MESSAGE
  1. ;;DVBA C PHYSICIANS GUIDE
  1. ;