source: WorldVistAEHR/trunk/r/CLINICAL_MONITORING_SYSTEM-QAM/QAMUTL2.m@ 1361

Last change on this file since 1361 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1QAMUTL2 ;HISC/DAD-MONITORING TOOL UTILITIES ;2/10/92 07:33
2 ;;1.0;Clinical Monitoring System;;09/13/1993
3EN1 ; *** RETURN DIR STRINGS FOR A DATA ELEMENT
4 ; REQUIRES: QAMELEM = DATA ELEMENT INTERNAL ENTRY NUMBER
5 ; RETURNS: ALL NON-NULL DIR INPUT VARIABLES/ARRAYS
6 ; QADIRPNT = CODE TO CREATE DATA POINTERS
7 ; QADIROUT = DIR OUTPUT TRANSFORM
8 K DIR,QADIROUT,QADIRPNT
9 Q:$S($D(QAMELEM)[0:1,QAMELEM'>0:1,$D(^QA(743.4,QAMELEM,0))[0:1,1:0)
10 N QA,QAM S QAM=$S($D(^QA(743.4,QAMELEM,"DIR"))#2:^("DIR"),1:"")
11 S DIR(0)=$S($D(^QA(743.4,QAMELEM,"DIR0"))#2:^("DIR0"),1:"")
12 S DIR("A")=$S($P(QAM,"^")]"":$P(QAM,"^"),1:$P(^QA(743.4,QAMELEM,0),"^"))
13 S DIR("B")=$S($P(QAM,"^",2)]"":$P(QAM,"^",2),1:"")
14 S DIR("T")=$S($P(QAM,"^",3):$P(QAM,"^",3),1:DTIME)
15 S DIR("?")=$S($D(^QA(743.4,QAMELEM,"DIRQ"))#2:^("DIRQ"),1:"")
16 S DIR("??")=$S($D(^QA(743.4,QAMELEM,"DIRQQ"))#2:^("DIRQQ"),1:"")
17 S QADIROUT=$S($D(^QA(743.4,QAMELEM,"DIROUT"))#2:^("DIROUT"),1:"")
18 S QADIRPNT=$S($D(^QA(743.4,QAMELEM,"POINT"))#2:^("POINT"),1:"")
19 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
20 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
21 F QA=0,"A","B","T","?","??" K:DIR(QA)="" DIR(QA)
22 K:QADIROUT="" QADIROUT K:QADIRPNT="" QADIRPNT
23 Q
Note: See TracBrowser for help on using the repository browser.