source: WorldVistAEHR/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMIMM.m@ 1742

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

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1PXRMIMM ; SLC/PKR - Handle immunization findings. ;12/23/2004
2 ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
3 ;
4 ;=======================================================
5EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;Evaluate immunization findings.
6 D EVALFI^PXRMINDX(DFN,.DEFARR,ENODE,.FIEVAL)
7 Q
8 ;
9 ;=======================================================
10EVALPL(FINDPA,ENODE,TERMARR,PLIST) ;Evaluate immunization term findings
11 ;for patient lists.
12 D EVALPL^PXRMINDL(.FINDPA,ENODE,.TERMARR,PLIST)
13 Q
14 ;
15 ;=======================================================
16EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;Evaluate immunization terms.
17 D EVALTERM^PXRMINDX(DFN,.FINDPA,ENODE,.TERMARR,.TFIEVAL)
18 Q
19 ;
20 ;=======================================================
21GETDATA(DAS,FIEVT) ;Return data, for a specified V Immunization entry.
22 ;DBIA #4250
23 D VIMM^PXPXRM(DAS,.FIEVT)
24 Q
25 ;
26 ;=======================================================
27MHVOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the clinical
28 ;maintenance output.
29 N EM,FIEN,IND,JND,NAME,NOUT,PNAME,REACTION,SERIES,TEMP,TEXTOUT,VDATE
30 S FIEN=$P(IFIEVAL("FINDING"),";",1)
31 S PNAME=$P(^AUTTIMM(FIEN,0),U,1)
32 S NAME="Immunization: "_PNAME_" = "
33 S IND=0
34 F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
35 . S SERIES=$G(IFIEVAL(IND,"SERIES"))
36 . I SERIES'="" S SERIES=$$EXTERNAL^DILFD(9000010.11,.04,"",SERIES,.EM)
37 . I $G(IFIEVAL(IND,"CONTRAINDICATED")) S SERIES=SERIES_"; - CONTRAINDICATED"
38 . S VDATE=IFIEVAL(IND,"DATE")
39 . S TEMP=NAME_SERIES_" ("_$$EDATE^PXRMDATE(VDATE)_")"
40 . D FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
41 . F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
42 S NLINES=NLINES+1,TEXT(NLINES)=""
43 Q
44 ;
45 ;=======================================================
46OUTPUT(INDENT,IFIEVAL,NLINES,TEXT) ;Produce the clinical
47 ;maintenance output.
48 N EM,FIEN,IND,JND,NOUT,PNAME,REACTION,SERIES,TEMP,TEXTOUT,VDATE
49 S FIEN=$P(IFIEVAL("FINDING"),";",1)
50 S PNAME=$P(^AUTTIMM(FIEN,0),U,1)
51 S NLINES=NLINES+1
52 S TEXT(NLINES)=$$INSCHR^PXRMEXLC(INDENT," ")_"Immunization: "_PNAME
53 S IND=0
54 F S IND=+$O(IFIEVAL(IND)) Q:IND=0 D
55 . S VDATE=IFIEVAL(IND,"DATE")
56 . S TEMP=$$EDATE^PXRMDATE(VDATE)
57 . S REACTION=$G(IFIEVAL(IND,"REACTION"))
58 . S SERIES=$G(IFIEVAL(IND,"SERIES"))
59 . I SERIES'="" D
60 .. S TEMP=TEMP_" series - "
61 .. S TEMP=TEMP_$$EXTERNAL^DILFD(9000010.11,.04,"",SERIES,.EM)
62 . I REACTION'="" D
63 .. S TEMP=TEMP_" reaction - "
64 .. S TEMP=TEMP_$$EXTERNAL^DILFD(9000010.11,.06,"",REACTION,.EM)
65 . I $G(IFIEVAL(IND,"CONTRAINDICATED")) S TEMP=TEMP_"; - CONTRAINDICATED"
66 . D FORMATS^PXRMTEXT(INDENT+2,PXRMRM,TEMP,.NOUT,.TEXTOUT)
67 . F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
68 . I IFIEVAL(IND,"COMMENTS")'="" D
69 .. S TEMP="Comments: "_IFIEVAL(IND,"COMMENTS")
70 .. D FORMATS^PXRMTEXT(INDENT+3,PXRMRM,TEMP,.NOUT,.TEXTOUT)
71 .. F JND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(JND)
72 S NLINES=NLINES+1,TEXT(NLINES)=""
73 Q
74 ;
Note: See TracBrowser for help on using the repository browser.