1 | C0CORSLT ; CCDCCR/GPL - CCR/CCD PROCESSING ADDITIONAL RESULTS ; 06/27/11
|
---|
2 | ;;1.0;C0C;;Jan 21, 2010;Build 38
|
---|
3 | ;Copyright 2011 George Lilly.
|
---|
4 | ;Licensed under the terms of the GNU General Public License.
|
---|
5 | ;See attached copy of the License.
|
---|
6 | ;
|
---|
7 | ;This program is free software; you can redistribute it and/or modify
|
---|
8 | ;it under the terms of the GNU General Public License as published by
|
---|
9 | ;the Free Software Foundation; either version 2 of the License, or
|
---|
10 | ;(at your option) any later version.
|
---|
11 | ;
|
---|
12 | ;This program is distributed in the hope that it will be useful,
|
---|
13 | ;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | ;GNU General Public License for more details.
|
---|
16 | ;
|
---|
17 | ;You should have received a copy of the GNU General Public License along
|
---|
18 | ;with this program; if not, write to the Free Software Foundation, Inc.,
|
---|
19 | ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
---|
20 | ;
|
---|
21 | W "NO ENTRY FROM TOP",!
|
---|
22 | Q
|
---|
23 | ;
|
---|
24 | EN(ZVARS,DFN) ; LOOKS FOR CCR RESULTS THAT ARE NOT LAB RESULTS AND ADDS
|
---|
25 | ; THEM TO THE LAB VARIABLES ZVARS IS PASSED BY REFERENCE
|
---|
26 | ; AN EXAMPLE IS EKG RESULTS THAT ARE FOUND IN NOTES AND CONSULTS
|
---|
27 | ; THIS IS CREATED FOR MU CERTIFICATION BY GPL
|
---|
28 | D ENTRY^C0CCPT(DFN,,,1) ; RETURNS ALL RESULTS IN VISIT LOCAL VARIABLE
|
---|
29 | N ZN ; RESULT NUMBER
|
---|
30 | S ZN=$O(@ZVARS@(""),-1) ; NEXT RESULT
|
---|
31 | N ZI S ZI=""
|
---|
32 | F S ZI=$O(VISIT(ZI)) Q:ZI="" D ; FOR EACH VISIT
|
---|
33 | . I $G(VISIT(ZI,"TEXT",1))["ECG DONE" D ; GOT AN ECG
|
---|
34 | . . S ZN=ZN+1 ; INCREMENT RESULT COUNT
|
---|
35 | . . N ZDATE,ZPRV,ZTXT
|
---|
36 | . . S ZDATE=$G(VISIT(ZI,"DATE",0)) ; DATE OF PROCEDURE
|
---|
37 | . . S ZPRV=$P($G(VISIT(ZI,"PRV",2)),"^",1) ;PROVIDER
|
---|
38 | . . S ZTXT=$P($G(VISIT(ZI,"TEXT",4)),"ECG RESULTS: ",2)
|
---|
39 | . . S @ZVARS@(ZN,"RESULTASSESSMENTDATETIME")=$$FMDTOUTC^C0CUTIL(ZDATE,"DT")
|
---|
40 | . . S @ZVARS@(ZN,"RESULTCODE")="34534-8"
|
---|
41 | . . S @ZVARS@(ZN,"RESULTCODINGSYSTEM")="LOINC"
|
---|
42 | . . S @ZVARS@(ZN,"RESULTDESCRIPTIONTEXT")="Electrocardiogram LOINC:34534-8"
|
---|
43 | . . S @ZVARS@(ZN,"RESULTOBJECTID")="RESULT"_ZN
|
---|
44 | . . S @ZVARS@(ZN,"RESULTSOURCEACTORID")="ACTORPROVIDER_"_ZPRV
|
---|
45 | . . S @ZVARS@(ZN,"RESULTSTATUS")=""
|
---|
46 | . . S @ZVARS@(ZN,"M","TEST",0)=1
|
---|
47 | . . S @ZVARS@(ZN,"M","TEST",1,"RESULTTESTCODEVALUE")="34534-8"
|
---|
48 | . . S @ZVARS@(ZN,"M","TEST",1,"RESULTTESTCODINGSYSTEM")="LOINC"
|
---|
49 | . . S @ZVARS@(ZN,"M","TEST",1,"RESULTTESTDATETIME")=$$FMDTOUTC^C0CUTIL(ZDATE,"DT")
|
---|
50 | . . S @ZVARS@(ZN,"M","TEST",1,"RESULTTESTDESCRIPTIONTEXT")="Electrocardiogram LOINC:34534-8"
|
---|
51 | . . S @ZVARS@(ZN,"M","TEST",1,"RESULTTESTFLAG")=""
|
---|
52 | . . S @ZVARS@(ZN,"M","TEST",1,"RESULTTESTNORMALDESCTEXT")=""
|
---|
53 | . . S @ZVARS@(ZN,"M","TEST",1,"RESULTTESTNORMALSOURCEACTORID")="ACTORORGANIZATION_VASTANUM"
|
---|
54 | . . S @ZVARS@(ZN,"M","TEST",1,"RESULTTESTOBJECTID")="RESULTTEST_ECG_"_ZN
|
---|
55 | . . S @ZVARS@(ZN,"M","TEST",1,"RESULTTESTSOURCEACTORID")="ACTORPROVIDER"_ZPRV
|
---|
56 | . . S @ZVARS@(ZN,"M","TEST",1,"RESULTTESTSTATUSTEXT")="F"
|
---|
57 | . . S @ZVARS@(ZN,"M","TEST",1,"RESULTTESTUNITS")=""
|
---|
58 | . . S @ZVARS@(ZN,"M","TEST",1,"RESULTTESTVALUE")=ZTXT
|
---|
59 | . . S @ZVARS@(0)=ZN ; UPDATE RESULTS COUNT
|
---|
60 | Q
|
---|
61 | ;
|
---|
62 | OLD ; OLD CODE FOR OTHER WAYS OF DOING THE ECG
|
---|
63 | ; FOR CERTIFICATION - SAVE EKG RESULTS gpl
|
---|
64 | W !,"CPT=",ZCPT
|
---|
65 | I ZCPT["93000" D ; THIS IS AN EKG
|
---|
66 | . D RNF1TO2^C0CRNF(C0CPRSLT,"ZRNF") ; SAVE FOR LABS
|
---|
67 | . M ^GPL("RNF2")=@C0CPRSLT
|
---|
68 | Q
|
---|
69 | ;
|
---|