source: FOIAVistA/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUPNCV1.m@ 1783

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

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1TIUPNCV1 ;SLC/DJP-SF/JLI ;11/24/97 14:31
2 ;;1.0;TEXT INTEGRATION UTILITIES;**9**;Jun 20, 1997
3SETFIELD ;Sets fields for copy into TIU Document File
4 D VISIT,SIGVAR,COSVAR,ADDENDA,FIELDS
5 Q
6 ;
7VISIT ;Sets Visit Tracking data elements
8 N DFN,VDT,TIUVSIT
9 S DFN=TIU(.02),VDT=TIU(1301)
10 D PXAPI^TIUPXAP1(.TIUVSIT,DFN,"",VDT,"E")
11 I +$G(TIUVSIT)'>0 S PROBLEM="Progress Note - IFN "_GMRPIFN_": Unable to create Visit Tracking entry based on entry date." D ERRORLOG^TIUPNCV3 K PROBLEM Q
12 S TIU(.03)=+$G(TIUVSIT)
13 Q
14 ;
15FIELDS ;Individual fields, such as S-O-A-P, are converted as a single document
16 S CNT1=0,CNT2=0,RENUM=0
17 F GMRPFLD=10,20,21,22,23,30,32,33,34,40,41,42,43,44,45,46,47,48,8 I $D(^GMR(121,GMRPIFN,GMRPFLD)) D WHATSIT^TIUPNCV2
18 I RENUM=1 D RENUM^TIUPNCV2 K RENUM
19 Q
20 ;
21SIGVAR ;Sets additional variables for signature block --
22 ;.05 STATUS
23 ;1503 SIGNATURE BLOCK NAME
24 ;1504 SIGNATURE BLOCK TITLE
25 ;1505 SIGNATURE BLOCK MODE
26 I TIU(1502)="",TIU("SIGCHART")="" S TIUSTAT="UNSIGNED",TIU(.05)=$$STATUS^TIUPNCV3(TIUSTAT),TIU(1505)="" K TIUSTAT Q
27 S:TIU("SIGCHART")'="" TIU(1502)=TIU(1512)
28 S DR=$G(^VA(200,TIU(1502),20)),TIU(1503)=$P(DR,U,2)
29 S TIU(1504)=$P(DR,U,3),TIU(1505)=$S(TIU(1512)="":"E",1:"")
30 S TIUSTAT="COMPLETED",TIU(.05)=$$STATUS^TIUPNCV3(TIUSTAT)
31 I TIU(1512)'="" S TIUSTAT="COMPLETED",TIU(.05)=$$STATUS^TIUPNCV3(TIUSTAT),TIU(1505)="C"
32 K DIC,X,Y,DIQ,DR,TIUSTAT,DA Q
33 ;
34COSVAR ;Sets required variables for cosignature block
35 ;.05 STATUS
36 ;1509 COSIGNATURE BLOCK NAME
37 ;1510 COSIGNATURE BLOCK TITLE
38 ;1511 COSIGNATURE BLOCK MODE
39 S TIU(1511)="" I TIU(1506)="",TIU(1508)="",TIU("COSCHART")="" Q
40 I TIU(1508)="",TIU("COSCHART")="" Q:TIU(1502)=""&(TIU("SIGCHART")="") S TIUSTAT="UNCOSIGNED",TIU(.05)=$$STATUS^TIUPNCV3(TIUSTAT),TIU(1208)=$G(TIUECS) K TIUSTAT Q
41 S:TIU("COSCHART")'="" TIU(1508)=TIU(1513)
42 S DR=$G(^VA(200,TIU(1508),20)),TIU(1509)=$P(DR,U,2)
43 S TIU(1510)=$P(DR,U,3),TIU(1511)=$S(TIU(1513)="":"E",1:"")
44 S TIUSTAT="COMPLETED",TIU(.05)=$$STATUS^TIUPNCV3(TIUSTAT)
45 I TIU(1513)'="" S TIUSTAT="COMPLETED",TIU(.05)=$$STATUS^TIUPNCV3(TIUSTAT),TIU(1511)="C"
46 K DIC,X,Y,DIQ,DR,TIUSTAT,DA Q
47 ;
48ADDENDA ;sets the Parent variable for notes that are addenda - .06 PARENT
49 Q:TIU("PARENT")=""
50 S PARENT=$G(^GMR(121,GMRPIFN,100))
51 S TIU("PARENT")=$G(^GMR(121,"CNV",PARENT))
52 S TIUNEWTY=+$$WHATITLE^TIUPUTU("ADDENDUM")
53 S TIU(.04)=$$DOCCLASS^TIULC1(TIUNEWTY)
54 Q
Note: See TracBrowser for help on using the repository browser.