source: FOIAVistA/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIURH.m@ 1314

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1TIURH ; SLC/JER - Review Screen Header ;5/7/03
2 ;;1.0;TEXT INTEGRATION UTILITIES;**113,207**;Jun 20, 1997
3HDR ; Initialize header for clinician's review screen
4 N BY,TIUI,TIUX,SCREEN,STATUS,RANGE,TIUBY,TIUDOCS,XREF,TIUNAME
5 S TIUX=$G(^TMP("TIUR",$J,0)),STATUS=$P(TIUX,U,2),SCREEN=$P(TIUX,U,3,99)
6 S VALM("TITLE")=$S($L(STATUS,",")>1:$S(VALM("ENTITY")="Document":"Clinical",1:""),1:STATUS)
7 I $G(XQY0)["MY UNSIGNED" S VALM("TITLE")="MY UNSIGNED"
8 S:$L(VALM("TITLE")) VALM("TITLE")=VALM("TITLE")_" "
9 S VALM("TITLE")=VALM("TITLE")_$S($L(VALM("ENTITY")):$$NTTNM(VALM("ENTITY")),1:"Document")_"s"
10 I +TIUEDT>1 S RANGE=" from "_$$DATE^TIULS(TIUEDT,"MM/DD/YY")_" to "_$$DATE^TIULS(TIULDT,"MM/DD/YY")
11 F TIUI=1:1:$L(SCREEN,";") D
12 . S XREF=$P($P(SCREEN,";",TIUI),U),XREF=$O(^TIU(8925.8,"C",XREF,0))
13 . I $D(TIUQUIK) D
14 . . S TIUBY=$G(TIUBY)_$S($G(TIUBY)]"":" or ",1:"")
15 . E D
16 . . S TIUBY=$G(TIUBY)_$S($G(TIUBY)]"":" and ",1:"")
17 . S TIUNAME=$P($G(^TIU(8925.8,+XREF,0)),U)
18 . I TIUNAME="ALL CATEGORIES",$G(^TMP("TIUR",$J,"TITLE OVERRIDE"))["TITLE" S TIUNAME="TITLE"
19 . S TIUBY=$G(TIUBY)_TIUNAME
20 . S:$P($P(SCREEN,";",TIUI),U,3)]"" TIUBY=$G(TIUBY)_" ("_$P($P(SCREEN,";",TIUI),U,3)_")"
21 S BY="by "_TIUBY
22 ; I BY'["ALL",(BY'["SUBJECT") S BY=BY_" for "_$P($P(SCREEN,U,3),";")
23 S VALMHDR(1)=$$CENTER^TIULS(BY_$S($L(SCREEN,";")=1:$G(RANGE),1:""))
24 S TIUDOCS=$J(+$G(^TMP("TIUR",$J,0)),4)_" documents"
25 S VALMHDR(1)=$$SETSTR^VALM1(TIUDOCS,VALMHDR(1),(IOM-$L(TIUDOCS)),$L(TIUDOCS))
26 ; I $L($G(RANGE)) S VALMHDR(2)=$$CENTER^TIULS(RANGE)
27 Q
28NTTNM(NAME) ; Handle plural names appropriately
29 I "Yy"[$E(NAME,$L(NAME)) S NAME=$E(NAME,1,($L(NAME)-1))_"ie"
30 I NAME="Discharge Summarie" S NAME="Disch Summarie"
31 Q NAME
Note: See TracBrowser for help on using the repository browser.