Changeset 1335 for qrda/C0Q/trunk/p/C0QHF.m
- Timestamp:
- Jan 4, 2012, 4:37:42 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
qrda/C0Q/trunk/p/C0QHF.m
r1232 r1335 1 1 C0QHF ; GPL - Health Factor Utility Routines ;9/02/11 17:05 2 ;;0.1;C0Q;nopatch;noreleasedate;Build 192 ;;0.1;C0Q;nopatch;noreleasedate;Build 23 3 3 ;Copyright 2011 George Lilly. Licensed under the terms of the GNU 4 4 ;General Public License See attached copy of the License. … … 37 37 N ZI,ZJ,ZR 38 38 S ZI=$O(^AUTTHF("B",C0QHF,"")) ; HEALTH FACTOR IEN 39 I ZI="" D Q 0 ; 40 . W !,"BAD HEALTH FACTOR: ",C0QHF 39 41 I $D(^AUPNVHF("AA",DFN,ZI)) S ZR=1 40 42 E S ZR=0 41 43 Q ZR 44 ; 45 HFIEN(ZHF) ; EXTRINSIC RETURNS THE IEN OF THE HEALTHFACTOR 46 N ZI 47 S ZI=$O(^AUTTHF("B",ZHF,"")) ; HEALTH FACTOR IEN 48 Q ZI 49 ; 50 VHFIEN(DFN,ZHF) ; EXTRINSIC RETURNS THE LAST IEN OF THIS HEALTH FACTOR 51 ; FOR THE PATIENT 52 N ZG,ZJ,ZK 53 S ZG=$$HFIEN(ZHF) 54 I ZG="" Q ; OPPS HEALTH FACTOR NOT FOUND 55 S ZJ=$O(^AUPNVHF("AA",DFN,ZG,""),-1) ;DATE 56 S ZK=$O(^AUPNVHF("AA",DFN,ZG,ZJ,"")) ;IEN 57 Q ZK 42 58 ; 43 59 HFCAT(RTN,DFN,C0QHFCAT) ; C0QFHCAT IS A HEALTH FACTOR CATEGORY … … 47 63 N ZI 48 64 S ZI=$O(^AUTTHF("B",C0QHFCAT,"")) ; HEALTH FACTOR CATEGORY IEN 49 N C0QN,C0QO 65 N C0QN,C0QO,C0QR 50 66 S C0QO=$NA(^AUPNVHF("AA",DFN)) ; ALL THE PATIENT'S HEALTH FACTORS 51 67 S C0QN=$NA(^AUTTHF("AC",ZI)) ; ALL HEALTH FACTORS IN THIS CATEGORY
Note:
See TracChangeset
for help on using the changeset viewer.