- DVBA239P ;ALB/JDG - AMIE EXAM (#396.6) FILE ENTRY ; 12/30/21@09:30
- ;;2.7;AMIE;**239**;Apr 10, 1995;Build 1
- ;
- ;this routine is used as a post-init in a KIDS build
- ;to modify the AMIE EXAM file (#396.6)
- ;
- Q
- ;
- ;
- EN ;
- N DVBAMES,DVBI,DVBJ,DVBAREF,DIC,X
- S DVBAMES=0
- D BMES^XPDUTL("Updating the AMIE EXAM file (#396.6)...")
- D DVBANEW ; addition of new exam entry
- Q:DVBAMES=1 D BMES^XPDUTL("Update to the AMIE EXAM file (#396.6) completed.")
- Q
- DVBANEW ;Add new exams
- F DVBI=1:1 S DVBJ=$P($T(NEWEXAM+DVBI),";;",2) Q:DVBJ="QUIT" D
- .S DVBAREF=$P((DVBJ),"^",1)
- .I $D(^DVB(396.6,"B",DVBAREF)) D DVBAERR Q
- .K DO
- .S DIC="^DVB(396.6,",DIC(0)="L",DIC("DR")=$P((DVBJ),"^",2),X=DVBAREF
- .D FILE^DICN
- .D BMES^XPDUTL("** "_DVBAREF_" has been added to the AMIE EXAM file (#396.6) **")
- Q
- DVBAERR ;Message to the user that the file entry already exists.
- D BMES^XPDUTL("*** A FILE ENTRY FOR EXAM NAME "_DVBAREF_" HAS ALREADY BEEN CREATED ***") S DVBAMES=1
- Q
- NEWEXAM ;exam to be added
- ;;DBQ Spina bifida^.01///DBQ Spina bifida;.5///A;6///DBQ SPINA BIFIDA;2///SPECIAL;7///DVBCQDRV
- ;;QUIT
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBA239P 1123 printed Feb 18, 2025@23:05:56 Page 2
- DVBA239P ;ALB/JDG - AMIE EXAM (#396.6) FILE ENTRY ; 12/30/21@09:30
- +1 ;;2.7;AMIE;**239**;Apr 10, 1995;Build 1
- +2 ;
- +3 ;this routine is used as a post-init in a KIDS build
- +4 ;to modify the AMIE EXAM file (#396.6)
- +5 ;
- +6 QUIT
- +7 ;
- +8 ;
- EN ;
- +1 NEW DVBAMES,DVBI,DVBJ,DVBAREF,DIC,X
- +2 SET DVBAMES=0
- +3 DO BMES^XPDUTL("Updating the AMIE EXAM file (#396.6)...")
- +4 ; addition of new exam entry
- DO DVBANEW
- +5 if DVBAMES=1
- QUIT
- DO BMES^XPDUTL("Update to the AMIE EXAM file (#396.6) completed.")
- +6 QUIT
- DVBANEW ;Add new exams
- +1 FOR DVBI=1:1
- SET DVBJ=$PIECE($TEXT(NEWEXAM+DVBI),";;",2)
- if DVBJ="QUIT"
- QUIT
- Begin DoDot:1
- +2 SET DVBAREF=$PIECE((DVBJ),"^",1)
- +3 IF $DATA(^DVB(396.6,"B",DVBAREF))
- DO DVBAERR
- QUIT
- +4 KILL DO
- +5 SET DIC="^DVB(396.6,"
- SET DIC(0)="L"
- SET DIC("DR")=$PIECE((DVBJ),"^",2)
- SET X=DVBAREF
- +6 DO FILE^DICN
- +7 DO BMES^XPDUTL("** "_DVBAREF_" has been added to the AMIE EXAM file (#396.6) **")
- End DoDot:1
- +8 QUIT
- DVBAERR ;Message to the user that the file entry already exists.
- +1 DO BMES^XPDUTL("*** A FILE ENTRY FOR EXAM NAME "_DVBAREF_" HAS ALREADY BEEN CREATED ***")
- SET DVBAMES=1
- +2 QUIT
- NEWEXAM ;exam to be added
- +1 ;;DBQ Spina bifida^.01///DBQ Spina bifida;.5///A;6///DBQ SPINA BIFIDA;2///SPECIAL;7///DVBCQDRV
- +2 ;;QUIT
- +3 QUIT