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

APCLDF4.m

Go to the documentation of this file.
APCLDF4 ; IHS/CMI/LAB - PROCESS DEMOGRAPHIC INFORMATION ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
D ; -ENTRY POINT FROM APCLDF - Demographic
 K APCL("DEM")
 S VAL=$P(X," ",2,10)
 I VAL="" S APCLER=15 G X7
 F FILE=2,9000001 Q:$D(APCL("DEM"))  I $D(^DD(FILE,"B",VAL)) S (FLD,DR)=$O(^(VAL,"")),(FN,DIC)=FILE,DA=PAT,DIQ="APCL(""DEM"",",DIQ(0)="E" D EN^DIQ1
 I '$D(APCL("DEM")) F FILE=2,9000001 Q:$D(APCL("DEM"))!$D(APCLER)  I $O(^DD(FILE,"B",VAL))]"",$E($O(^(VAL)),1,$L(VAL))=VAL D  G:$D(APCLER) X7 S (FLD,DR)=$O(^DD(FILE,"B",TVAL,"")),(FN,DIC)=FILE,DA=PAT,DIQ="APCL(""DEM"",",DIQ(0)="E" D EN^DIQ1
 . S TVAL=$O(^DD(FILE,"B",VAL))
 . I $O(^DD(FILE,"B",TVAL))]"" S TVAL2=$O(^(TVAL)) I $E(TVAL2,1,$L(VAL))=VAL S APCLER=13 G X6
X6 . Q
 I $D(APCL("DEM")) S @(APCLY_1_")")=$S($D(DT):DT,1:"")_U_APCL("DEM",FN,$O(APCL("DEM",FN,"")),FLD,"E") K:$P(@(APCLY_1_")"),U,2)="" @(APCLY_1_")")
 E  S APCLER=4
 K APCL,DIC,DA,DR,DIQ
X7 Q
 ;