source: FOIAVistA/trunk/r/CLINICAL_PROCEDURES-MD/MDESPRT.m@ 1722

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

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1MDESPRT ;HOIFO/NCA - ELECTRONIC SIGNATURE PRINT ;12/21/04 09:24
2 ;;1.0;CLINICAL PROCEDURES;**5**;Apr 01, 2004;Build 1
3GETHDR(RESULTS,MDDP) ; Get Legal Header for Report Text
4 K ^TMP("MDTMP",$J) N MDC,MDFCHK,MDFT,MDS5,MDS6,X3,Y S (MDFCHK,MDFT)=0
5 N MCSTAT,TEMP,CODE,CREATION,FNAME,FT,FTYPE,NAME,NUM,TT,VERSION S MDC=7
6 S ^TMP("MDTMP",$J,1)="****************************************************************"
7 S ^TMP("MDTMP",$J,2)="This information was imported from the Medicine Package software"
8 S ^TMP("MDTMP",$J,3)="and does not include an electronic signature; therefore, it is"
9 S ^TMP("MDTMP",$J,4)="being administratively closed and should be used as information"
10 S ^TMP("MDTMP",$J,5)="only."
11 S ^TMP("MDTMP",$J,6)="****************************************************************"
12 S ^TMP("MDTMP",$J,7)=""
13 S MDS5=$P($P($G(MDDP),";",2),","),MDS5=+$P(MDS5,"(",2),MDS6=+MDDP
14 I $P($G(^MCAR(MDS5,MDS6,"ES")),U,7)=""!($P($G(^MCAR(MDS5,MDS6,"ES")),U,7)="RNV") S ^TMP("MDTMP",$J,8)=" CONVERTED ARCHIVED REPORT",MDC=MDC+1
15 F X3=0:0 S X3=$O(@RESULTS@(X3)) Q:'X3 D Q:+MDFCHK
16 .I $P($G(^MCAR(MDS5,MDS6,"ES")),U,7)="RNV"&($G(@RESULTS@(X3))["R e l e a s e S t a t u s") S MDFCHK=1 Q
17 .S MDC=MDC+1,^TMP("MDTMP",$J,MDC)=$G(@RESULTS@(X3))
18 S TEMP=$G(^MCAR(MDS5,MDS6,"ES"))
19 I $P(TEMP,U,7)=""!($P(TEMP,U,7)="RNV") S MDFT=1
20 I +MDFT<1 K ^TMP($J) M ^TMP($J)=^TMP("MDTMP",$J) K ^TMP("MDTMP",$J) Q
21 I $P(TEMP,U,7)="RNV"&($G(^TMP("MDTMP",$J,MDC))[" - -") K ^TMP("MDTMP",$J,MDC) S MDC=MDC-1
22 S $P(TEMP,U,15)=DT
23 ; Retrieve RC/ES Field (NA = Dont need)
24 S NAME="^^^^^^CODE^^^^^^^^CREATION",FTYPE="^^^^^^F^^^^^^^^D"
25 F TT=7,15 D
26 .S Y=$P(TEMP,U,TT),FT=$P(FTYPE,U,TT),FNAME=$P(NAME,U,TT)
27 .I Y S:FT="D" @FNAME=+$E(Y,4,5)_"/"_+$E(Y,6,7)_"/"_$E((1700+$E(Y,1,3)),3,4) S:FT="F" @FNAME=Y
28 S MCSTAT="CONVERTED ARCHIVED REPORT"
29 S NUM=1
30 S VERSION=NUM_" of "_NUM
31 S $P(SS," -",40)="" S MDC=MDC+1,^TMP("MDTMP",$J,MDC)=""
32 S MDC=MDC+1,^TMP("MDTMP",$J,MDC)=""
33 S MDC=MDC+1,^TMP("MDTMP",$J,MDC)=""
34 S MDC=MDC+1,^TMP("MDTMP",$J,MDC)=SS K SS
35 S MDC=MDC+1,^TMP("MDTMP",$J,MDC)=$J(" ",18)_"R e p o r t R e l e a s e S t a t u s"
36 S MDC=MDC+1,^TMP("MDTMP",$J,MDC)=""
37 S MDC=MDC+1,^TMP("MDTMP",$J,MDC)="Current "
38 S MDC=MDC+1,^TMP("MDTMP",$J,MDC)="Report "_$J(" ",51)_"Date of Report"
39 S MDC=MDC+1,^TMP("MDTMP",$J,MDC)="Status "_$J(" ",51)_" Entry Version"
40 S $P(SS,"=",80)="",MDC=MDC+1,^TMP("MDTMP",$J,MDC)=SS K SS
41 S MDC=MDC+1,^TMP("MDTMP",$J,MDC)=MCSTAT
42 S MDC=MDC+1,^TMP("MDTMP",$J,MDC)=$J(" ",59)_CREATION_" "_VERSION
43 K ^TMP($J) M ^TMP($J)=^TMP("MDTMP",$J) K ^TMP("MDTMP",$J)
44 Q
Note: See TracBrowser for help on using the repository browser.