source: WorldVistAEHR/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMPTD2.m@ 841

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

revised back to 6/30/08 version

File size: 2.0 KB
Line 
1PXRMPTD2 ; SLC/PKR/PJH - Reminder Inquiry print template routines.;10/07/2005
2 ;;2.0;CLINICAL REMINDERS;**4**;Feb 04, 2005;Build 21
3 ;================================================
4DATE(FIND0,PIECE,FLDNUM,TITLE,RJC,PAD,FILENUM,FLG) ;Standard DATE
5 N DATE,X
6 S DATE=$P($G(FIND0),U,PIECE)
7 I DATE'="" D
8 .S DATE=$$FMTE^XLFDT(DATE,"D"),X=$$RJ^XLFSTR(TITLE,RJC,PAD),X=X_" "_DATE
9 .D ^DIWP
10 Q
11 ;
12 ;================================================
13ENTRYNAM(VPTR) ;Given the variable pointer return the entry name. The
14 ;variable pointer list contains the information necessary to do the
15 ;look up.
16 N IEN,FILENUM,NAME,ROOT
17 I VPTR="" Q ""
18 S IEN=$P(VPTR,";",1),ROOT=$P(VPTR,";",2),FILENUM=$P(PXRMFVPL(ROOT),U,1)
19 S NAME=$$GET1^DIQ(FILENUM,IEN,.01,"","","")
20 Q NAME
21 ;
22 ;================================================
23FREQ(FREQ) ;Format frequency.
24 I FREQ=-1 Q "Cannot be determined"
25 I +FREQ=0 Q FREQ_" - Not indicated"
26 I FREQ="99Y" Q "99Y - Once"
27 Q +FREQ_($S(FREQ?1N.N1"D":" day",FREQ?1N.N1"M":" month",FREQ?1N.N1"Y":" year",1:""))_$S(+FREQ>1:"s",1:"")
28 ;
29 ;================================================
30FTYPE(VPTR,CNT) ;Return finding type.
31 N FTYPE,ROOT
32 I VPTR="" Q "UNDEFINED?"
33 S ROOT=$P(VPTR,";",2)
34 I '$D(PXRMFVPL) N PXRMFVPL D BLDRLIST^PXRMVPTR(811.902,.01,.PXRMFVPL)
35 S FTYPE=$S(CNT=1:$P(PXRMFVPL(ROOT),U,4),1:$P(PXRMFVPL(ROOT),U,2))
36 Q FTYPE
37 ;
38 ;================================================
39GENFREQ(PXF0) ;Print age range frequency set for findings.
40 N PXF,PXW,PXAMIN,PXAMAX
41 S PXF=$P(PXF0,U,4)
42 I PXF="" Q ""
43 S PXAMIN=$P(PXF0,U,2),PXAMAX=$P(PXF0,U,3)
44 S PXW=$$FREQ(PXF)
45 S PXW=PXW_$$FMTAGE^PXRMAGE(PXAMIN,PXAMAX)
46 Q PXW
47 ;
48 ;================================================
49GENIEN(FINDING) ;Return internal entry number for findings.
50 N F0,IEN,PREFIX,ROOT,VPTR
51 S ROOT="^PXD(811.9,D0,20,FINDING,0)"
52 S F0=@ROOT
53 S VPTR=$P(F0,U,1)
54 I VPTR="" Q "UNDEFINED"
55 S IEN=$P(VPTR,";",1),ROOT=$P(VPTR,";",2)
56 I '$D(PXRMFVPL) N PXRMFVPL D BLDRLIST^PXRMVPTR(811.902,.01,.PXRMFVPL)
57 S VPTR=PXRMFVPL(ROOT)
58 S PREFIX=$P(VPTR,U,4)
59 Q " (FI("_+FINDING_")="_PREFIX_"("_IEN_"))"
60 ;
Note: See TracBrowser for help on using the repository browser.