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

QAMC22.m

Go to the documentation of this file.
QAMC22 ;HISC/DAD-CONDITION: PTF ICD DIAGNOSIS & PROCEDURE ;7/23/93  10:16
 ;;1.0;Clinical Monitoring System;;09/13/1993
EN1 ; *** CONDITION CODE
 S ICDDIAG=+$G(^QA(743,QAMD0,"COND",QAMD1,"P1"))
 S ICDPROC=+$G(^QA(743,QAMD0,"COND",QAMD1,"P2"))
 F QAMPTFDT=(QAMTODAY-.0000001):0 S QAMPTFDT=$O(^DGP(45.84,"AC",QAMPTFDT)) Q:(QAMPTFDT'>0)!(QAMPTFDT>(QAMTODAY+.9999999))!(QAMPTFDT\1'?7N)  F QAMPTFD0=0:0 S QAMPTFD0=$O(^DGP(45.84,"AC",QAMPTFDT,QAMPTFD0)) Q:QAMPTFD0'>0  D LOOP
 K ICDDIAG,ICDPROC,OPCODE,PTFDATE,QAMPTF70,QAMPTFD0,QAMPTFD1,QAMPTFDT
 Q
LOOP Q:$D(^DGPT(QAMPTFD0,0))[0  S X=^(0),QAMDFN=+X,PTFDATE=$P(X,"^",2),ICDDIAG(0)=0
DIAG S QAMPTF70=$G(^DGPT(QAMPTFD0,70)) F QA=10,16:1:24 S X=+$P(QAMPTF70,"^",QA) I $O(^QA(743.5,ICDDIAG,"GRP","AB",X,0)) S ICDDIAG(0)=1 Q
 S:ICDDIAG'>0 ICDDIAG(0)=1 Q:ICDDIAG(0)'>0  I ICDPROC'>0 D FALLOUT Q
PROC F QAMPTFD1=0:0 S QAMPTFD1=$O(^DGPT(QAMPTFD0,"S",QAMPTFD1)) Q:QAMPTFD1'>0  S X=^(QAMPTFD1,0),PTFDATE=+X F QA=8:1:12 S OPCODE=+$P(X,"^",QA) I $O(^QA(743.5,ICDPROC,"GRP","AB",OPCODE,0)) D FALLOUT Q
 Q
FALLOUT S ^UTILITY($J,"QAM CONDITION",QAMD1,QAMDFN)="",^(QAMDFN,PTFDATE)=QAMPTFD0
 Q
EN2 ; *** PARAMETER CODE
21 K DIC,DIR,DIRUT S DIC=743.5,DIC(0)="EMNQZ",DIC("S")="I $P(^(0),""^"",2)=80",DIC("A")="ICD DIAGNOSIS GROUP: ",DIC("B")=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P1"))#2:$P(^("P1"),"^",2),1:"") K:DIC("B")="" DIC("B")
 S DIR("?",1)="Enter a GROUP name that contains ICD diagnoses.",DIR("?")="press 'RETURN' for all ICD diagnoses."
 S QAMPARAM="P1" D EN2^QAMUTL1 I $D(DIRUT) S Y=-1 G Y
 S:Y]"" ^QA(743,QAMD0,"COND",QAMD1,"P1")=+Y_"^"_Y(0,0)
22 K DIC,DIR,DIRUT S DIC=743.5,DIC(0)="EMNQZ",DIC("S")="I $P(^(0),""^"",2)=80.1",DIC("A")="ICD PROCEDURE GROUP: ",DIC("B")=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P2"))#2:$P(^("P2"),"^",2),1:"") K:DIC("B")="" DIC("B")
 S DIR("?",1)="Enter a GROUP name that contains ICD procedures.",DIR("?")="press 'RETURN' for all ICD procedures."
 S QAMPARAM="P2" D EN2^QAMUTL1 I $D(DIRUT) S Y=-1 G Y
 S:Y]"" ^QA(743,QAMD0,"COND",QAMD1,"P2")=+Y_"^"_Y(0,0)
EXIT K Y
 K QAMPARAM
Y Q