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

Last change on this file since 1742 was 1595, checked in by George Lilly, 12 years ago

initial release of ePrescribing

File size: 1.8 KB
Line 
1C0PEWDU ; WV/SMH - E-prescription utilities; Mar 3 2009 ; 5/4/12 4:25pm
2 ;;1.0;C0P;;Apr 25, 2012;Build 103
3 ;Copyright 2009 Sam Habiel. Licensed under the terms of the GNU
4 ;General Public License See attached copy of the License.
5 ;
6 ;This program is free software; you can redistribute it and/or modify
7 ;it under the terms of the GNU General Public License as published by
8 ;the Free Software Foundation; either version 2 of the License, or
9 ;(at your option) any later version.
10 ;
11 ;This program is distributed in the hope that it will be useful,
12 ;but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;GNU General Public License for more details.
15 ;
16 ;You should have received a copy of the GNU General Public License along
17 ;with this program; if not, write to the Free Software Foundation, Inc.,
18 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 ;
20 Q
21 ;
22CLEAN(STR) ; extrinsic function; returns string
23 ;; Removes all non printable characters from a string.
24 ;; STR by Value
25 N TR,I
26 F I=0:1:31 S TR=$G(TR)_$C(I)
27 S TR=TR_$C(127)
28 QUIT $TR(STR,TR)
29 ;
30GETSOAP(ENTRY,REQUEST,RESULT) ; XML SOAP Spec for NewCrop
31 ;; Gets world processing field from Fileman for Parsing
32 ;; ENTRY Input by Value
33 ;; REQUEST XML Output by Reference
34 ;; RESULT XML Output by Reference
35 ;; Example call: D GETSOAP^C0PEWDU("DrugAllergyInteraction",.REQ,.RES)
36 ;
37 N OK,ERR,IEN,F ; if call is okay, Error, IEN, File
38 S F=175.101
39 S IEN=$$FIND1^DIC(F,"","",ENTRY,"B")
40 S OK=$$GET1^DIQ(F,IEN,2,"","REQUEST","ERR")
41 I OK=""!($D(ERR)) S REQUEST=""
42 ; M ^CacheTempEWD($j)=REQUEST
43 ; K REQUEST
44 ; S ok=$$parseDocument^%zewdHTMLParser("REQUEST",0)
45 ; S ok=$$outputDOM^%zewdDOM("REQUEST",1,1)
46 ; Q ; remove later
47 K OK,ERR
48 S OK=$$GET1^DIQ(F,IEN,3,"","RESULT","ERR")
49 I OK=""!($D(ERR)) S RESULT=""
50 QUIT
51 ;
Note: See TracBrowser for help on using the repository browser.