source: WorldVistAEHR/trunk/r/ONCOLOGY-ONC/ONCCSRS.m@ 691

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

initial load of WorldVistAEHR

File size: 4.0 KB
Line 
1ONCCSRS ;Hines OIFO/GWB - Re-stage using version 01.03.00 ;05/11/05
2 ;;2.11;ONCOLOGY;**43,46**; Mar 07, 1995;Build 39
3 ;
4 ;Re-stage 2004+ cases using CS Version 01.03.00
5 K DIRUT
6 N ZZIS,IOP,POP
7 S ZZIS="MQ"
8 D OPEN^%ZISUTL("ONCCSRS",,.ZZIS) Q:$G(POP)
9 D USE^%ZISUTL("ONCCSRS")
10 I $D(IO("Q")) D TASK G END
11 D RS D CLOSE^%ZISUTL("ONCCSRS") G END
12 Q
13 ;
14RS D SAVDEV^%ZISUTL("ONCCSRS")
15 S DIVISION=$P(^DIC(4,DUZ(2),0),U,1)
16 W !?3,"Restaging using CS Version 01.03.00 for ",DIVISION
17 S CTR=0,SUCCTR=0,ERRCTR=0
18 S XDT=3040000 F S XDT=$O(^ONCO(165.5,"ADX",XDT)) Q:XDT="" S IEN=0 F S IEN=$O(^ONCO(165.5,"ADX",XDT,IEN)) Q:IEN="" I $$DIV^ONCFUNC(IEN)=DUZ(2) D G:$G(DIRUT)=1 EXIT
19 .I $P($G(^ONCO(165.5,IEN,"CS1")),U,11)="" Q
20 .I $P($G(^ONCO(165.5,IEN,"CS1")),U,11)="010300" Q
21 .S PN=$$GET1^DIQ(165.5,IEN,.02)
22 .S AN=$$GET1^DIQ(165.5,IEN,.05)
23 .S SEQ=$$GET1^DIQ(165.5,IEN,.06)
24 .S PID=$$GET1^DIQ(165.5,IEN,61)
25 .S PSCODE=$$GET1^DIQ(165.5,IEN,20.1)
26 .K INPUT,STORE,DISPLAY,STATUS,ONCSAPI
27 .D CLEAR^ONCSAPIE(1)
28 .S INPUT("AGE")=$$AGEDX^ONCACDU1(IEN)
29 .S:$L(INPUT("AGE"))=1 INPUT("AGE")="00"_INPUT("AGE")
30 .S:$L(INPUT("AGE"))=2 INPUT("AGE")=0_INPUT("AGE")
31 .S INPUT("BEHAV")=$E($$GET1^DIQ(165.5,IEN,22.3,"I"),5)
32 .S INPUT("EXT")=$$GET1^DIQ(165.5,IEN,30.2,"I")
33 .S INPUT("EXTEVAL")=$$GET1^DIQ(165.5,IEN,29.1,"I")
34 .S INPUT("GRADE")=$$GET1^DIQ(165.5,IEN,24,"I")
35 .S INPUT("HIST")=$E($$GET1^DIQ(165.5,IEN,22.3,"I"),1,4)
36 .S INPUT("LNPOS")=$$GET1^DIQ(165.5,IEN,32,"I")
37 .S:$L(INPUT("LNPOS"))=1 INPUT("LNPOS")=0_INPUT("LNPOS")
38 .S INPUT("LNEXAM")=$$GET1^DIQ(165.5,IEN,33,"I")
39 .S:$L(INPUT("LNEXAM"))=1 INPUT("LNEXAM")=0_INPUT("LNEXAM")
40 .S INPUT("METS")=$$GET1^DIQ(165.5,IEN,34.3,"I")
41 .S INPUT("METSEVAL")=$$GET1^DIQ(165.5,IEN,34.4,"I")
42 .S INPUT("NODES")=$$GET1^DIQ(165.5,IEN,31.1,"I")
43 .S INPUT("NODESEVAL")=$$GET1^DIQ(165.5,IEN,32.1,"I")
44 .S PS=$$GET1^DIQ(165.5,IEN,20,"I")
45 .S:PS'="" PS=$TR($$GET1^DIQ(164,PS,1,"I"),".","")
46 .S INPUT("SITE")=PS
47 .S INPUT("SIZE")=$$GET1^DIQ(165.5,IEN,29.2,"I")
48 .S INPUT("SSF1")=$$GET1^DIQ(165.5,IEN,44.1,"I")
49 .S INPUT("SSF2")=$$GET1^DIQ(165.5,IEN,44.2,"I")
50 .S INPUT("SSF3")=$$GET1^DIQ(165.5,IEN,44.3,"I")
51 .S INPUT("SSF4")=$$GET1^DIQ(165.5,IEN,44.4,"I")
52 .S INPUT("SSF5")=$$GET1^DIQ(165.5,IEN,44.5,"I")
53 .S INPUT("SSF6")=$$GET1^DIQ(165.5,IEN,44.6,"I")
54 .S RC=$$CALC^ONCSAPI3(.ONCSAPI,.INPUT,.STORE,.DISPLAY,.STATUS)
55 .D USE^%ZISUTL("ONCCSRS")
56 .I $P(RC,U,1)<0 W !!?3,PID," ",PSCODE," ",AN,"/",SEQ," encountered a CS error" S ERRCTR=ERRCTR+1
57 .I $P(RC,U,1)>0 W !!?3,PID," ",PSCODE," ",AN,"/",SEQ," encountered a CS warning" S ERRCTR=ERRCTR+1
58 .I $P(RC,U,1)=0 S SUCCTR=SUCCTR+1 D
59 ..S $P(^ONCO(165.5,IEN,"CS1"),U,1)=STORE("T")
60 ..S $P(^ONCO(165.5,IEN,"CS1"),U,2)=STORE("TDESCR")
61 ..S $P(^ONCO(165.5,IEN,"CS1"),U,3)=STORE("N")
62 ..S $P(^ONCO(165.5,IEN,"CS1"),U,4)=STORE("NDESCR")
63 ..S $P(^ONCO(165.5,IEN,"CS1"),U,5)=STORE("M")
64 ..S $P(^ONCO(165.5,IEN,"CS1"),U,6)=STORE("MDESCR")
65 ..S $P(^ONCO(165.5,IEN,"CS1"),U,7)=STORE("AJCC")
66 ..S $P(^ONCO(165.5,IEN,"CS1"),U,8)=STORE("SS1977")
67 ..S $P(^ONCO(165.5,IEN,"CS1"),U,9)=STORE("SS2000")
68 ..S $P(^ONCO(165.5,IEN,"CS1"),U,11)=$G(STATUS("APIVER"))
69 .S CTR=CTR+1 W "."
70 D RMDEV^%ZISUTL("ONCCSRS")
71 ;
72EXIT W !
73 S TAB=$S($L(CTR)=1:5,$L(CTR)=2:4,$L(CTR)=3:3,1:3)
74 S SUCTAB=$S($L(SUCCTR)=1:5,$L(SUCCTR)=2:4,$L(SUCCTR)=3:3,1:3)
75 S ERRTAB=$S($L(ERRCTR)=1:5,$L(ERRCTR)=2:4,$L(ERRCTR)=3:3,1:3)
76 ;
77 W:CTR=1 !?TAB,CTR," primary was re-staged using CS Version 01.03.00"
78 W:CTR'=1 !?TAB,CTR," primaries were re-staged using CS Version 01.03.00"
79 W !
80 W:SUCCTR=1 !?SUCTAB,SUCCTR," primary was successfully restaged"
81 W:SUCCTR'=1 !?SUCTAB,SUCCTR," primaries were successfully restaged"
82 W:ERRCTR=1 !?ERRTAB,ERRCTR," primary encountered an error or warning"
83 W:ERRCTR'=1 !?ERRTAB,ERRCTR," primaries encountered errors or warnings"
84 D ^%ZISC
85 W ! D PAUSE^ONCOPA2A
86 Q
87 ;
88TASK ;Queue a task
89 K IO("Q"),ZTUCI,ZTDTH,ZTIO,ZTSAVE
90 S ZTRTN="RS^ONCCSRS",ZTREQ="@",ZTSAVE("ZTREQ")=""
91 S ZTDESC="Restage CS using 01.03.00"
92 S ZTSAVE("ERRCTR")=""
93 D ^%ZTLOAD D CLOSE^%ZISUTL("ONCCSRS") W !,"Request Queued",!
94 K ZTSK
95 Q
96 ;
97END Q
Note: See TracBrowser for help on using the repository browser.