source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUCHLP.m@ 839

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

initial load of WorldVistAEHR

File size: 3.2 KB
Line 
1TIUCHLP ; SLC/SBW - Help for Clinician ;11/29/02
2 ;;1.0;TEXT INTEGRATION UTILITIES;**3,21,109,148,156**;Jun 20, 1997
3MAIN ; Control branching
4 N DIC,X,Y,TIUI,TIUROOT,TIUFPRIV S TIUFPRIV=1
5 I '$D(TIUPRM0)!'$D(TIUPRM1) D SETPARM^TIULE
6 S DIC=8925.1,DIC(0)="AEMQZ",DIC("A")="Select DOCUMENT TYPE: "
7 S DIC("B")=$G(^DISV(+DUZ,"^TIU(8925.1,"))
8 D ^DIC I +Y'>0 D
9 . W !!,"Required information for dictation help not set up for this report type."
10 I +Y>0 D
11 . I $P(TIUPRM0,U,16)="D" S TIUROOT="ITEM"
12 . E I $P(TIUPRM0,U,16)="C" S TIUROOT="HEAD"
13 . I $G(TIUROOT)']"" W !!,"Required information for dictation help not set up for this report type." Q
14 . W !!,"A Dictated ",$P(Y(0),U),", requires the following:"
15 . S TIUI=0
16 . F S TIUI=$O(^TIU(8925.1,+Y,TIUROOT,TIUI)) Q:+TIUI'>0 D
17 . . I +$P($G(^TIU(8925.1,+Y,TIUROOT,TIUI,0)),U,6) W !?10,$P($G(^(0)),U,2)
18 W !!
19 I $$READ^TIUU("YO","Do you want to get patient data","YES") D GETPAT
20 Q
21GETPAT ; Gets Dictation data for a specific patient
22 N TIU,TIUOUT,DFN,SUCCESS,TITLE
23 F D Q:$D(DUOUT)!$D(DIROUT)!+$G(TIUOUT)
24 . S DFN=+$$PATIENT^TIULA
25 . D MAIN^TIUMOVE(.TIU,DFN)
26 . I $D(TIU) D PATDATA(.TIU)
27 . S TIUOUT=$$READ^TIUU("Y","... OK","YES")
28 D MAKE^TIUPEFIX(.SUCCESS,DFN,.TITLE,.TIU,$S(+$G(XQADATA):+$G(XQADATA),+$G(BUFDA):+$G(BUFDA),1:""))
29 I +SUCCESS S TIUDONE=1
30 Q
31PATDATA(X) ; Display/validate correct patient/treatment episode
32 N DIR,Y,TIURC
33 W !!?1,"Patient: ",$$NAME^TIULS(X("PNM"),"LAST, FIRST MI"),?40,"SSN: ",X("SSN"),?62,"Sex: ",$P(X("SEX"),U,2),!
34 W ?4,"Ward: ",$P(X("WARD"),U,2),?40,"Age: ",X("AGE"),!
35 W "Att Phys: ",$P(X("AMD"),U,2),?34,"Prim Phys: ",$P(X("PMD"),U,2),!
36 W "Adm Date: ",$$DATE^TIULS(+X("EDT"),"MM/DD/YY@HR:MIN:SEC")
37 W:X("LDT")]"" ?35,"Dis Date: ",$$DATE^TIULS(X("LDT"),"MM/DD/YY")
38 W !
39 W ?2,"Adm Dx: ",X("ADDX")
40 ; Below TIU*148
41 I $G(X("NUMRACE"))>0 D
42 . W !?4,"Race: " F TIURC=1:1:X("NUMRACE") W ?10,$P(X("RACE",TIURC),U,2),!
43 I $G(X("RACENO"))=0 W !?4,"Race: ",$P($G(X("RACE")),U,2),!
44 I $D(X("DICTDT")) D
45 . W !,"A DISCHARGE SUMMARY is already on file:",!
46 . W ?2,"Dict'd: ",X("DICTDT"),?41,"By: ",X("AUTHOR"),!
47 . W ?2,"Signed: ",X("SIGDT"),?35,"Cosigned: ",X("COSDT"),!
48 Q
49GETPN ; Help get Fields for PN Dictation/Error Resolution
50 N TIU,DFN,TIUY,TITLE
51 S DFN=+$$PATIENT^TIULA Q:+DFN'>0
52 D ENPN^TIUVSIT(.TIU,+DFN,1)
53 I '$D(TIU) Q
54 S TIUY=$$CHEKPN(.TIU)
55 D MAKE^TIUPEFIX(.SUCCESS,DFN,.TITLE,.TIU,$S(+$G(XQADATA):+$G(XQADATA),+$G(BUFDA):+$G(BUFDA),1:""))
56 I +SUCCESS S TIUDONE=1
57 Q
58CHEKPN(X,TIUBY) ; Display/validate demographic/visit information
59 W !!,"Document Identifiers..."
60 W !?14,"Patient Name: ",$S($G(X("PNM"))]"":$G(X("PNM")),1:"UNKNOWN")
61 W !?15,"Patient SSN: ",$S($G(X("SSN"))]"":$G(X("SSN")),1:"UNKNOWN")
62 W !?10,"Patient Location: ",$S(+$G(X("LOC")):$P($G(X("LOC")),U,2),1:"UNKNOWN")
63 W !?8,"Date/time of Visit: ",$S($L($G(X("VSTR"))):$$DATE^TIULS($P(X("VSTR"),";",2),"MM/DD/YY HR:MIN"),1:"UNKNOWN")
64 S Y=$$READ^TIUU("YO"," ...OK","YES")
65 I $S($D(DIROUT):1,$D(DUOUT):1,$D(DTOUT):1,1:0) Q 0
66 I +Y'>0 D
67 . K X N TIUINOUT
68 . S TIUINOUT=$$INOUT^TIUVSIT
69 . I $S($D(DIROUT):1,$D(DUOUT):1,$D(DTOUT):1,1:0) Q
70 . I $P(TIUINOUT,U)="o" D MAIN^TIUVSIT(.X,DFN,"","","","",1,"",20,1)
71 . I $P(TIUINOUT,U)'="o" D MAIN^TIUMOVE(.X,DFN,"","","",1,"LAST",1)
72 . S Y=$S($D(X)>9:$$CHEKPN(.X,.TIUBY),1:0)
73 Q Y
Note: See TracBrowser for help on using the repository browser.