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

ADE0608.m

Go to the documentation of this file.
ADE0608 ;IHS/HQT/MJL - DENTAL CODE EDIT GROUP FILE CORRECTIONS [ 06/19/2001  2:59 PM ]
 ;;6.0;ADE;**8**;JUL 1, 2001
CTL ;
 ; Find all "[EXTRACTION" edits and update, changing nothing, in order to fire cross-references that
 ; use the updated string of ADA codes defined in the "EXTRACTIONS" DENTAL CODE EDIT GROUP.  This is
 ; convoluted because the cross-reference logic should have been defined in the file definition of the
 ; DENTAL CODE EDIT GROUP, not where it currently is, in the file definition for DENTAL EDIT.
 ;
 ; Save the DENTAL CODE EDIT entries in ADEDIT
 S ADEFILE=9002007.9
 D FIND^DIC(ADEFILE,"",".01;1;1.3;1.4;2;2.4;3;4;4.1;5;6","X","[EXTRACTIONS","","","","","ADEDIT","ADEEMSG")
 I $D(ADEEMSG) D KILL Q
 ; Remove the current DENTAL CODE EDIT entries
 S DIK="^ADEDIT(" F ADEN=1:1:+ADEDIT("DILIST",0) S DA=ADEDIT("DILIST",2,ADEN) D ^DIK
 ; Change the EDIT GROUPS
 D EDITGRP
 ; Reset the DENTAL CODE EDIT entries
 S ADEFILE=9002007.9,ADEIENST="+1,",ADEUPDF="E",ADEWPFLD=1101,ADETXT=0
 F ADEN=1:1:+ADEDIT("DILIST",0) S ADEIEN(1)=ADEDIT("DILIST",2,ADEN) D EDIT
 D KILL
 Q
 ;
EDITGRP ;
 ;MOVE 3221,9971,9973,9974 FROM EXTRACTIONS TO ADEPHY-3
 S ADEFILE=9002007.91,ADEIENST="?+1,",ADEUPDF="",ADEWPFLD=1101,ADETXT=0
 S ADEFDA(ADEFILE,ADEIENST,.01)="EXTRACTIONS"
 S ADEFDA(ADEFILE,ADEIENST,1)="7110|7120|7111|7113|7112|7114|7210|7220|7230|7240|7241|7250"
 D FILE
 S ADEFDA(ADEFILE,ADEIENST,.01)="ADEPHY-3" ; There's no "[ADEPHY-3" DENTAL EDIT CODE entry
 S ADEFDA(ADEFILE,ADEIENST,1)="3110|3120|3220|3230|3240|3960|3221|9971|9973|9974"
 D FILE
 ; REMOVE GROUP "ADEPHY-7", its only member is 9930, which is no longer required
 S DIK="^ADEDIT(""GRP"",",DA=0 F  S DA=$O(^ADEDIT("GRP","B","ADEPHY-7",DA)) Q:'DA  D ^DIK
 Q
 ;
EDIT ;
 M ADEFDA(ADEFILE,ADEIENST)=ADEDIT("DILIST","ID",ADEN)
 D FILE
 Q
 ;
FILE ;
 D UPDATE^DIE(ADEUPDF,"ADEFDA","ADEIEN","ADEEMSG")
 K ADEFDA,ADEEMSG
 I '$D(ADEIEN(1)) S ADEERR=1 Q
 ; get the IEN assigned
 I ADETXT,ADETXT>1!(ADETEXT(1)'="") D WP^DIE(ADEFILE,ADEIEN(1)_",",ADEWPFLD,,"ADETEXT","ADEEMSG")
 K ADEEMSG,ADEFDA,ADEIEN,ADETEXT
 Q
 ;
KILL ;
 K ADEADA,ADECNT,ADECODE,ADEDESC,ADEDONE,ADEDIT,ADEEMSG,ADEFDA,ADEFILE,ADEICD9,ADEID,ADEIENST,ADELEV,ADEMIN,ADEMNE,ADEN,ADERLN,ADERN,ADERTN,ADESYN,ADETDT,ADETEXT,ADETXT,ADEUPDF,ADEUSE,ADEWPFLD,DA,DIC,DIE,DR,X
 Q