ONCWEBCS ;HINES OIFO/RTK - Input transform and help for CS fields ;02/21/24
;;2.2;ONCOLOGY;**19**;Jul 31, 2013;Build 4
;
Q
;
INPUT(TABLE,CODELEN,IEN) ;
S X=$$TRIM^XLFSTR($G(X))
I X'?@(CODELEN_"N") K X Q
D:$G(IEN)>0
.S SITE=$TR($$GET1^DIQ(165.5,IEN,20.1,,,"ONCMSG"),".")
.S HIST=$E($$HIST^ONCFUNC(IEN),1,4)
.S DISCRIM=$$GET1^DIQ(165.5,IEN,240)
;
; send server request for CS schema
D GETSCHM
;
; get the Schema and SchemaName from the Schema response
K ONCCSSCH,ONCCSSNM D PARSESCR^ONCWEBP2
;
; send server request for CS table
I ONCCSSCH="E" W !!,"PROBLEM GETTING SCHEMA" K X,ONCCSSCH,ONCCSSNM Q
S ONCCSTBL=TABLE D GETTBL
;
; get the Table info from the Table response and use it to validate data
D PARSETBR^ONCWEBP2
I '$D(ONCVLARR(X)),'$D(ONCVLARR(+X)) K X,ONCVLARR Q
K ONCVLARR
Q
HELP(TABLE,IEN) ;
N ONCCSSCH,ONCCSSNM
D:$G(IEN)>0
.S SITE=$TR($$GET1^DIQ(165.5,IEN,20.1,,,"ONCMSG"),".")
.S HIST=$E($$HIST^ONCFUNC(IEN),1,4)
.S DISCRIM=$$GET1^DIQ(165.5,IEN,240)
;
; send server request for CS schema
D GETSCHM
;
; get the Schema and SchemaName from the Schema response
K ONCCSSCH,ONCCSSNM D PARSESCR^ONCWEBP2
;
; send server request for CS table
I ONCCSSCH="E" W !!,"PROBLEM GETTING SCHEMA" K X,ONCCSSCH,ONCCSSNM Q
S ONCCSTBL=TABLE D GETTBL
;
; get the Table info from the Table response and display it
D PARSETBR^ONCWEBP2
D DISPLAY^ONCWEBP2
Q
;
GETSCHM ;
K ^TMP("ONCCSCMA",$J)
S ^TMP("ONCCSCMA",$J,1)="<?xml version=""1.0"" encoding=""UTF-8""?>"
S ^TMP("ONCCSCMA",$J,2)="<SchemaRecordCompleteRequest>"
S ^TMP("ONCCSCMA",$J,3)="<requestId>1</requestId>"
S ^TMP("ONCCSCMA",$J,4)="<requestType>New</requestType>"
S ^TMP("ONCCSCMA",$J,5)="<site>"_SITE_"</site>"
S ^TMP("ONCCSCMA",$J,6)="<hist>"_HIST_"</hist>"
S ^TMP("ONCCSCMA",$J,7)="<discriminator>"_DISCRIM_"</discriminator>"
S ^TMP("ONCCSCMA",$J,8)="</SchemaRecordCompleteRequest>"
S ONCEXEC="P",ONCCSRQT="SCHEMA"
K ^TMP("ONCSCRSP",$J) D T3^ONCWEB2
Q
;
GETTBL ;
K ^TMP("ONCCSTBL",$J)
S ^TMP("ONCCSTBL",$J,1)="<CsGetTablesRequest>"
S ^TMP("ONCCSTBL",$J,2)="<schema>"_ONCCSSCH_"</schema>"
S ^TMP("ONCCSTBL",$J,3)="<table>"_ONCCSTBL_"</table>"
S ^TMP("ONCCSTBL",$J,4)="<requestId>1234</requestId>"
S ^TMP("ONCCSTBL",$J,5)="<requestType>test</requestType>"
S ^TMP("ONCCSTBL",$J,5)="</CsGetTablesRequest>"
S ONCEXEC="P",ONCCSRQT="TABLE"
K ^TMP("ONCTBRSP",$J) D T3^ONCWEB2
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCWEBCS 2467 printed Nov 22, 2024@17:39:16 Page 2
ONCWEBCS ;HINES OIFO/RTK - Input transform and help for CS fields ;02/21/24
+1 ;;2.2;ONCOLOGY;**19**;Jul 31, 2013;Build 4
+2 ;
+3 QUIT
+4 ;
INPUT(TABLE,CODELEN,IEN) ;
+1 SET X=$$TRIM^XLFSTR($GET(X))
+2 IF X'?@(CODELEN_"N")
KILL X
QUIT
+3 if $GET(IEN)>0
Begin DoDot:1
+4 SET SITE=$TRANSLATE($$GET1^DIQ(165.5,IEN,20.1,,,"ONCMSG"),".")
+5 SET HIST=$EXTRACT($$HIST^ONCFUNC(IEN),1,4)
+6 SET DISCRIM=$$GET1^DIQ(165.5,IEN,240)
End DoDot:1
+7 ;
+8 ; send server request for CS schema
+9 DO GETSCHM
+10 ;
+11 ; get the Schema and SchemaName from the Schema response
+12 KILL ONCCSSCH,ONCCSSNM
DO PARSESCR^ONCWEBP2
+13 ;
+14 ; send server request for CS table
+15 IF ONCCSSCH="E"
WRITE !!,"PROBLEM GETTING SCHEMA"
KILL X,ONCCSSCH,ONCCSSNM
QUIT
+16 SET ONCCSTBL=TABLE
DO GETTBL
+17 ;
+18 ; get the Table info from the Table response and use it to validate data
+19 DO PARSETBR^ONCWEBP2
+20 IF '$DATA(ONCVLARR(X))
IF '$DATA(ONCVLARR(+X))
KILL X,ONCVLARR
QUIT
+21 KILL ONCVLARR
+22 QUIT
HELP(TABLE,IEN) ;
+1 NEW ONCCSSCH,ONCCSSNM
+2 if $GET(IEN)>0
Begin DoDot:1
+3 SET SITE=$TRANSLATE($$GET1^DIQ(165.5,IEN,20.1,,,"ONCMSG"),".")
+4 SET HIST=$EXTRACT($$HIST^ONCFUNC(IEN),1,4)
+5 SET DISCRIM=$$GET1^DIQ(165.5,IEN,240)
End DoDot:1
+6 ;
+7 ; send server request for CS schema
+8 DO GETSCHM
+9 ;
+10 ; get the Schema and SchemaName from the Schema response
+11 KILL ONCCSSCH,ONCCSSNM
DO PARSESCR^ONCWEBP2
+12 ;
+13 ; send server request for CS table
+14 IF ONCCSSCH="E"
WRITE !!,"PROBLEM GETTING SCHEMA"
KILL X,ONCCSSCH,ONCCSSNM
QUIT
+15 SET ONCCSTBL=TABLE
DO GETTBL
+16 ;
+17 ; get the Table info from the Table response and display it
+18 DO PARSETBR^ONCWEBP2
+19 DO DISPLAY^ONCWEBP2
+20 QUIT
+21 ;
GETSCHM ;
+1 KILL ^TMP("ONCCSCMA",$JOB)
+2 SET ^TMP("ONCCSCMA",$JOB,1)="<?xml version=""1.0"" encoding=""UTF-8""?>"
+3 SET ^TMP("ONCCSCMA",$JOB,2)="<SchemaRecordCompleteRequest>"
+4 SET ^TMP("ONCCSCMA",$JOB,3)="<requestId>1</requestId>"
+5 SET ^TMP("ONCCSCMA",$JOB,4)="<requestType>New</requestType>"
+6 SET ^TMP("ONCCSCMA",$JOB,5)="<site>"_SITE_"</site>"
+7 SET ^TMP("ONCCSCMA",$JOB,6)="<hist>"_HIST_"</hist>"
+8 SET ^TMP("ONCCSCMA",$JOB,7)="<discriminator>"_DISCRIM_"</discriminator>"
+9 SET ^TMP("ONCCSCMA",$JOB,8)="</SchemaRecordCompleteRequest>"
+10 SET ONCEXEC="P"
SET ONCCSRQT="SCHEMA"
+11 KILL ^TMP("ONCSCRSP",$JOB)
DO T3^ONCWEB2
+12 QUIT
+13 ;
GETTBL ;
+1 KILL ^TMP("ONCCSTBL",$JOB)
+2 SET ^TMP("ONCCSTBL",$JOB,1)="<CsGetTablesRequest>"
+3 SET ^TMP("ONCCSTBL",$JOB,2)="<schema>"_ONCCSSCH_"</schema>"
+4 SET ^TMP("ONCCSTBL",$JOB,3)="<table>"_ONCCSTBL_"</table>"
+5 SET ^TMP("ONCCSTBL",$JOB,4)="<requestId>1234</requestId>"
+6 SET ^TMP("ONCCSTBL",$JOB,5)="<requestType>test</requestType>"
+7 SET ^TMP("ONCCSTBL",$JOB,5)="</CsGetTablesRequest>"
+8 SET ONCEXEC="P"
SET ONCCSRQT="TABLE"
+9 KILL ^TMP("ONCTBRSP",$JOB)
DO T3^ONCWEB2
+10 QUIT