source: qrda/C0Q/trunk/p/C0Q1P4.m@ 1578

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

latest iteration

File size: 2.6 KB
Line 
1C0Q1P4 ; GPL - Kids utilities for C0Q 1.0 patch 4 ; 8/2/12 2:46am
2 ;;1.0;QUALITY MEASURES;**4**
3TRAN ; Unified Transport
4 D TRAN101
5 D TRAN201
6 QUIT
7 ;
8TRAN101 ; Remove Untransportable pointers in C0Q QUALITY MEASURE; Private EP
9 ; NB: I am reaching into KIDS's data here. This may not work for future versions
10 ; of KIDS. However, I am exporting this only; once exported, it should work in
11 ; any version of KIDS.
12 N XPDIEN S XPDIEN=$QS(XPDGREF,2) ; Get IEN of KIDS Transport Global
13 N X S X=$NA(^XTMP("XPDT",XPDIEN,"DATA",1130580001.101)) ; KIDS transports our data here
14 N IEN S IEN=0 ; Looper
15 F S IEN=$O(@X@(IEN)) Q:'IEN D ; For each IEN, remove the following:
16 . S $P(@X@(IEN,0),U,2)="" ; Numerator Patient List
17 . S $P(@X@(IEN,0),U,3)="" ; Denominator Patient List
18 . S $P(@X@(IEN,7),U,4)="" ; Negative Numerator List
19 . S $P(@X@(IEN,7),U,2)="" ; Alternate Numerator List
20 . S $P(@X@(IEN,7),U,3)="" ; Alternate Denominator List
21 . S $P(@X@(IEN,7),U,5)="" ; Alternate Negative Numerator List
22 ;
23 ; Now oooo how fun I have to remove the pointer resolution data by hand.
24 ; D1 and D2 constitute the "address" of the origin data.
25 ; D1 is the IEN,node
26 ; D2 is the piece.
27 ; Depending on the combination of the node and the piece, we can decide to
28 ; remove the data (how fun). To make it clearer, I will use vars called
29 ; node and piece to be clear. Up above you have a reference of which nodes
30 ; and pieces we want to get rid of. This makes up the "TARGET LIST"
31 ;
32 ; TARGET LIST
33 N TARLIST
34 S TARLIST(0,2)=""
35 S TARLIST(0,3)=""
36 S TARLIST(7,4)=""
37 S TARLIST(7,2)=""
38 S TARLIST(7,3)=""
39 S TARLIST(7,5)=""
40 ;
41 N X,SUB
42 F SUB="FRV1","FRV1K" S X=$NA(^XTMP("XPDT",XPDIEN,SUB,1130580001.101)) D
43 . N D1,D2 S (D1,D2)=0
44 . F S D1=$O(@X@(D1)) Q:'D1 F S D2=$O(@X@(D1,D2)) Q:'D2 D
45 . . N NODE,PIECE
46 . . S NODE=$P(D1,",",2)
47 . . S PIECE=D2
48 . . I $D(TARLIST(NODE,PIECE)) K ^(D2)
49 QUIT
50 ;
51TRAN201 ; Transport 201 (Measurement Sets file)
52 N XPDIEN S XPDIEN=$QS(XPDGREF,2) ; Get IEN of KIDS Transport Global
53 N X S X=$NA(^XTMP("XPDT",XPDIEN,"DATA",1130580001.201)) ; KIDS transports our data here
54 N IEN1 S IEN1=0 ; Looper
55 F S IEN1=$O(@X@(IEN1)) Q:'IEN1 D
56 . N IEN2 S IEN2=0
57 . F S IEN2=$O(@X@(IEN1,5,IEN2)) Q:'IEN2 D
58 . . N Y S Y=$NA(^(IEN2)) ;Grab the reference
59 . . K @Y@(1),@Y@(2),@Y@(3),@Y@(4) ; nodes to kill off containing untransportable data
60 QUIT
61 ;
62POST401 ; Post 401
63
Note: See TracBrowser for help on using the repository browser.