source: FOIAVistA/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMDOUT.m@ 1777

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1PXRMDOUT ; SLC/PKR - Handle outpatient med findings. ;05/25/2005
2 ;;2.0;CLINICAL REMINDERS;**4**;Feb 04, 2005;Build 21
3 ;
4 ;===============================================
5GETDATA(DAS,FIEVT) ;Return data for an outpatient drug finding.
6 ;DBIA #3793
7 D PSRX^PSOPXRM1(DAS,.FIEVT)
8 S (FIEVT("STATUS"),FIEVT("VALUE"))=$$EXTERNAL^DILFD(52,100,"",FIEVT("STATUS"))
9 S FIEVT("START DATE")=FIEVT("RELEASED DATE/TIME")
10 S FIEVT("STOP DATE")=$$FMADD^XLFDT(FIEVT("START DATE"),FIEVT("DAYS SUPPLY"))
11 S FIEVT("DURATION")=$$DURATION^PXRMDATE(FIEVT("START DATE"),FIEVT("STOP DATE"))
12 Q
13 ;
14 ;===============================================
15EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;Evaluate terms.
16 D EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
17 Q
18 ;
19 ;===============================================
20MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the MHV output.
21 N DRUG,JND,NOUT,TEMP,TEXTOUT
22 S DRUG=IFIEVAL("DISPENSE DRUG")
23 ;DBIA #10043
24 S DRUG=$S(+DRUG=0:DRUG,1:$P(^PSDRUG(DRUG,0),U,1))
25 S TEMP="Outpatient Drug: "_DRUG_" = "
26 S TEMP=TEMP_"("_$$EDATE^PXRMDATE(IFIEVAL("START DATE"))
27 S TEMP=TEMP_" - "_$$EDATE^PXRMDATE(IFIEVAL("STOP DATE"))_")"
28 D FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
29 F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
30 Q
31 ;
32 ;===============================================
33OUTPUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the clinical
34 ;maintenance output.
35 N DRUG,JND,NOUT,TEMP,TEXTOUT
36 S DRUG=IFIEVAL("DISPENSE DRUG")
37 ;DBIA #10043
38 S DRUG=$S(+DRUG=0:DRUG,1:$P(^PSDRUG(DRUG,0),U,1))
39 S NLINES=NLINES+1
40 S TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"Outpatient Medication: "_DRUG
41 S TEMP=$$EDATE^PXRMDATE(IFIEVAL("DATE"))
42 S TEMP=TEMP_" Status: "_IFIEVAL("STATUS")
43 S TEMP=TEMP_" Last release date: "_$$EDATE^PXRMDATE(IFIEVAL("RELEASED DATE/TIME"))
44 S TEMP=TEMP_" Days supply: "_IFIEVAL("DAYS SUPPLY")
45 S TEMP=TEMP_" Start date: "_$$EDATE^PXRMDATE(IFIEVAL("START DATE"))
46 S TEMP=TEMP_" Stop date: "_$$EDATE^PXRMDATE(IFIEVAL("STOP DATE"))
47 I $D(IFIEVAL("DURATION")) S TEMP=TEMP_" Duration: "_IFIEVAL("DURATION")_" D"
48 D FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
49 F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
50 S NLINES=NLINES+1,TEXT(NLINES)=""
51 Q
52 ;
Note: See TracBrowser for help on using the repository browser.