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

QAMUTL2.m

Go to the documentation of this file.
QAMUTL2 ;HISC/DAD-MONITORING TOOL UTILITIES ;2/10/92  07:33
 ;;1.0;Clinical Monitoring System;;09/13/1993
EN1 ; *** RETURN DIR STRINGS FOR A DATA ELEMENT
 ; REQUIRES:  QAMELEM  = DATA ELEMENT INTERNAL ENTRY NUMBER
 ; RETURNS:   ALL NON-NULL DIR INPUT VARIABLES/ARRAYS
 ;            QADIRPNT = CODE TO CREATE DATA POINTERS
 ;            QADIROUT = DIR OUTPUT TRANSFORM
 K DIR,QADIROUT,QADIRPNT
 Q:$S($D(QAMELEM)[0:1,QAMELEM'>0:1,$D(^QA(743.4,QAMELEM,0))[0:1,1:0)
 N QA,QAM S QAM=$S($D(^QA(743.4,QAMELEM,"DIR"))#2:^("DIR"),1:"")
 S DIR(0)=$S($D(^QA(743.4,QAMELEM,"DIR0"))#2:^("DIR0"),1:"")
 S DIR("A")=$S($P(QAM,"^")]"":$P(QAM,"^"),1:$P(^QA(743.4,QAMELEM,0),"^"))
 S DIR("B")=$S($P(QAM,"^",2)]"":$P(QAM,"^",2),1:"")
 S DIR("T")=$S($P(QAM,"^",3):$P(QAM,"^",3),1:DTIME)
 S DIR("?")=$S($D(^QA(743.4,QAMELEM,"DIRQ"))#2:^("DIRQ"),1:"")
 S DIR("??")=$S($D(^QA(743.4,QAMELEM,"DIRQQ"))#2:^("DIRQQ"),1:"")
 S QADIROUT=$S($D(^QA(743.4,QAMELEM,"DIROUT"))#2:^("DIROUT"),1:"")
 S QADIRPNT=$S($D(^QA(743.4,QAMELEM,"POINT"))#2:^("POINT"),1:"")
 S QAM=1 F QA=0:0 S QA=$O(^QA(743.4,QAMELEM,"DIR1",QA)) Q:QA'>0  S DIR("?",QAM)=^QA(743.4,QAMELEM,"DIR1",QA,0),QAM=QAM+1
 S QAM=1 F QA=0:0 S QA=$O(^QA(743.4,QAMELEM,"DIR2",QA)) Q:QA'>0  S DIR("A",QAM)=^QA(743.4,QAMELEM,"DIR2",QA,0),QAM=QAM+1
 F QA=0,"A","B","T","?","??" K:DIR(QA)="" DIR(QA)
 K:QADIROUT="" QADIROUT K:QADIRPNT="" QADIRPNT
 Q