source: ccr/trunk/p/C0CORSLT.m@ 1588

Last change on this file since 1588 was 1586, checked in by Sam Habiel, 12 years ago

Changed license to AGPL. Some clean-up for XINDEX

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