source: ePrescribing/trunk/p/C0PEWDU.m@ 979

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

web service test routines

File size: 1007 bytes
Line 
1C0PEWDU ; WV/SMH - E-prescription utilities; Mar 3 2009
2 ;;0.1;WV EPrescribing;;
3 Q
4 ;
5CLEAN(STR) ; extrinsic function; returns string
6 ;; Removes all non printable characters from a string.
7 ;; STR by Value
8 N TR,I
9 F I=0:1:31 S TR=$G(TR)_$C(I)
10 S TR=TR_$C(127)
11 QUIT $TR(STR,TR)
12 ;
13GETSOAP(ENTRY,REQUEST,RESULT) ; XML SOAP Spec for NewCrop
14 ;; Gets world processing field from Fileman for Parsing
15 ;; ENTRY Input by Value
16 ;; REQUEST XML Output by Reference
17 ;; RESULT XML Output by Reference
18 ;; Example call: D GETSOAP^C0PEWDU("DrugAllergyInteraction",.REQ,.RES)
19 ;
20 N OK,ERR,IEN,F ; if call is okay, Error, IEN, File
21 S F=175.101
22 S IEN=$$FIND1^DIC(F,"","",ENTRY,"B")
23 S OK=$$GET1^DIQ(F,IEN,2,"","REQUEST","ERR")
24 I OK=""!($D(ERR)) S REQUEST=""
25 ; M ^CacheTempEWD($j)=REQUEST
26 ; K REQUEST
27 ; S ok=$$parseDocument^%zewdHTMLParser("REQUEST",0)
28 ; S ok=$$outputDOM^%zewdDOM("REQUEST",1,1)
29 ; Q ; remove later
30 K OK,ERR
31 S OK=$$GET1^DIQ(F,IEN,3,"","RESULT","ERR")
32 I OK=""!($D(ERR)) S RESULT=""
33 QUIT
34 ;
Note: See TracBrowser for help on using the repository browser.