source: qrda/C0Q/trunk/p/C0QMU123.m@ 1607

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

Updated C0QMU12 and created C0QMU123 for patch 6: support for Model Measure Sets

File size: 3.6 KB
RevLine 
[1581]1C0QMU123 ; VEN/SMH - Clone a Measure Set and give a new name and filter. ; 10/23/12 1:07pm
2 ;;1.0;QUALITY MEASURES;**6**;
3 ; (C) George Lilly. Licensed under AGPL.
4 QUIT
5 ;
6CLONE(MSIEN,CLNNM,ISQM,FLNAME) ; Private $$ ; Clone a measure set into a new one
7 ; Input:
8 ; 1. Measurement Set IEN to clone
9 ; 2. Clinic Name for which this Measurement Set would apply (FT)
10 ; 3. Boolean: Is Quality Measure?
11 ; 4. Filter List Name
12 ;
13 ; Output:
14 ; IEN of Created measure set.
15 ;
16 ; Get data from Model Set
17 N C0QIENS S C0QIENS=MSIEN_"," ; Input to GETS call
18 N C0QOUT,C0QERR ; Output Variables in GETS call.
19 D GETS^DIQ(1130580001.201,C0QIENS,"**","",$NA(C0QOUT),$NA(C0QERR))
20 ;
21 I $D(C0QERR) S $EC=",U1," ; Crash in case of error. Shouldn't happen.
22 ;
23 ; Deal with D0 stuff first.
24 ; Merge D0 level into a new FDA array.
25 N C0QNEW ; New FDA
26 M C0QNEW(1130580001.201,"?+1,")=C0QOUT(1130580001.201,C0QIENS)
27 ;
28 ; Change .01
29 ; NOTE: Field name is 30 characters. But HL is max 30 chars too!
30 ; So we have to truncate it.
31 ; If Is Quality Measure, Use QM, otherwise, use Performance Report.
32 S C0QNEW(1130580001.201,"?+1,",.01)=$E(CLNNM,1,27)_" "_$S(ISQM:"QM",1:"PR")
33 ;
34 ; Deal with D1 level
35 N I S I=0 ; Looper
36 N CNT S CNT=1 ; IENS counter ; Will become 2 and larger. Not to collide with the initial 1.
37 ;
38 ; For each record in D1 level
39 F S I=$O(C0QOUT(1130580001.2011,I)) Q:'I D
40 . S CNT=CNT+1
41 . ; Grab the Measure field
42 . S C0QNEW(1130580001.2011,"?+"_CNT_",?+1,",.01)=C0QOUT(1130580001.2011,I,.01)
43 . ;
44 . ; Put the Filter lists on
45 . S C0QNEW(1130580001.2011,"?+"_CNT_",?+1,",1.2)=FLNAME
46 . S C0QNEW(1130580001.2011,"?+"_CNT_",?+1,",2.2)=FLNAME
47 ;
48 ; File Data.
49 N C0QIEN,C0QERR ; Returned IEN, Error array
50 D UPDATE^DIE("E",$NA(C0QNEW),$NA(C0QIEN),$NA(C0QERR))
51 I $D(C0QERR) S $EC=",U1,"
52 ;
53 Q C0QIEN(1) ; Quit with IEN for ?+1.
54 ;
55 ; SAM(1130580001.201,"17,",.01)="DR OFFICE QM REPORT"
56 ; SAM(1130580001.201,"17,",.02)="AUG 1,2012"
57 ; SAM(1130580001.201,"17,",.03)="OCT 31,2012"
58 ; SAM(1130580001.201,"17,",.04)=""
59 ; SAM(1130580001.201,"17,",.05)=""
60 ; SAM(1130580001.201,"17,",.2)=""
61 ; SAM(1130580001.201,"17,",.3)=""
62 ; SAM(1130580001.201,"17,",.4)=""
63 ; SAM(1130580001.2011,"1,17,",.01)="MU EP NQF 0013"
64 ; SAM(1130580001.2011,"1,17,",1.1)=1
65 ; SAM(1130580001.2011,"1,17,",1.2)="MU12-EP-DR OFFICE-Patient"
66 ; SAM(1130580001.2011,"1,17,",2.1)=1
67 ; SAM(1130580001.2011,"1,17,",2.2)="MU12-EP-DR OFFICE-Patient"
68 ; SAM(1130580001.2011,"1,17,",3)=100
69 ; SAM(1130580001.2011,"2,17,",.01)="MU EP NQF 0028A"
70 ; SAM(1130580001.2011,"2,17,",1.1)=0
71 ; SAM(1130580001.2011,"2,17,",1.2)="MU12-EP-DR OFFICE-Patient"
72 ; SAM(1130580001.2011,"2,17,",2.1)=1
73 ; SAM(1130580001.2011,"2,17,",2.2)="MU12-EP-DR OFFICE-Patient"
74 ; SAM(1130580001.2011,"2,17,",3)=0
75 ; SAM(1130580001.2011,"3,17,",.01)="MU EP NQF 0028B"
76 ; SAM(1130580001.2011,"3,17,",1.1)=0
77 ; SAM(1130580001.2011,"3,17,",1.2)="MU12-EP-DR OFFICE-Patient"
78 ; SAM(1130580001.2011,"3,17,",2.1)=1
79 ; SAM(1130580001.2011,"3,17,",2.2)="MU12-EP-DR OFFICE-Patient"
80 ; SAM(1130580001.2011,"3,17,",3)=0
81 ; SAM(1130580001.2011,"4,17,",.01)="MU EP NQF 0421"
82 ; SAM(1130580001.2011,"4,17,",1.1)=1
83 ; SAM(1130580001.2011,"4,17,",1.2)="MU12-EP-DR OFFICE-Patient"
84 ; SAM(1130580001.2011,"4,17,",2.1)=1
85 ; SAM(1130580001.2011,"4,17,",2.2)="MU12-EP-DR OFFICE-Patient"
86 ; SAM(1130580001.2011,"4,17,",3)=100
87 ; SAM(1130580001.20111,"1,1,17,",.01)="MOUSE,MICKEY"
88 ; SAM(1130580001.20111,"1,4,17,",.01)="MOUSE,MICKEY"
89 ; SAM(1130580001.20112,"1,1,17,",.01)="MOUSE,MICKEY"
90 ; SAM(1130580001.20112,"1,2,17,",.01)="MOUSE,MICKEY"
91 ; SAM(1130580001.20112,"1,3,17,",.01)="MOUSE,MICKEY"
92 ; SAM(1130580001.20112,"1,4,17,",.01)="MOUSE,MICKEY"
93 ;
Note: See TracBrowser for help on using the repository browser.