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

AUMDO1D.m

Go to the documentation of this file.
AUMDO1D ;IHS/OIRM/DSD/AEF - UPDATE PCC DATA ENTRY INPT EDITS FILE [ 12/03/1998   2:35 PM ]
 ;;99.1;ICD UPDATE;;DEC 03, 1998
 ;
 Q
EN(UPD,ICD)        ;EP
 ;----- MAIN ENTRY POINT TO ADD ICD9 CODES TO THE PCC DATA ENTRY
 ;      INPT EDITS FILE
 ;
 ;      UPD  = ICD UPDATES FILE ENTRY INTERNAL NUMBER
 ;      ICD  = ICD DIAGNOSIS FILE ENTRY INTERNAL NUMBER
 ;
 N COND,CONDX
 S CONDX=0 F  S CONDX=$O(^AUMDDTMP(UPD,"PCC",CONDX)) Q:'CONDX  D
 . S COND=$P($G(^AUMDDTMP(UPD,"PCC",CONDX,0)),U)
 . Q:COND']""
 . D ONE(COND,ICD)
 Q
ONE(COND,ICD)      ;
 ;----- UPDATE ONE ENTRY
 ;
 N DA,DD,DIC,DIE,DO,DR,X,Y
 Q:'$D(^APCDINPT("B",COND))
 S DA(1)=$O(^APCDINPT("B",COND,0))
 Q:'DA(1)
 Q:$D(^APCDINPT(DA(1),11,"B",ICD))
 K DD,DO
 S DIC="^APCDINPT("_DA(1)_",11,"
 S DIC(0)="L"
 S DIC("P")=$P(^DD(9001001.4,1101,0),U,2)
 S X=ICD
 D FILE^DICN
 Q:Y'>0
 S DA=+Y
 S DIE=DIC
 S DR=".02////"_$P(^ICD9(ICD,0),U)
 D ^DIE
 Q