Ignore:
Timestamp:
Jan 4, 2012, 4:37:42 PM (13 years ago)
Author:
George Lilly
Message:

latest C0Q changes with parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qrda/C0Q/trunk/p/C0QHF.m

    r1232 r1335  
    11C0QHF   ; GPL - Health Factor Utility Routines ;9/02/11  17:05
    2         ;;0.1;C0Q;nopatch;noreleasedate;Build 19
     2        ;;0.1;C0Q;nopatch;noreleasedate;Build 23
    33        ;Copyright 2011 George Lilly.  Licensed under the terms of the GNU
    44        ;General Public License See attached copy of the License.
     
    3737        N ZI,ZJ,ZR
    3838        S ZI=$O(^AUTTHF("B",C0QHF,"")) ; HEALTH FACTOR IEN
     39        I ZI="" D  Q 0 ;
     40        . W !,"BAD HEALTH FACTOR: ",C0QHF
    3941        I $D(^AUPNVHF("AA",DFN,ZI)) S ZR=1
    4042        E  S ZR=0
    4143        Q ZR
     44        ;
     45HFIEN(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        ;
     50VHFIEN(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
    4258        ;
    4359HFCAT(RTN,DFN,C0QHFCAT) ; C0QFHCAT IS A HEALTH FACTOR CATEGORY
     
    4763        N ZI
    4864        S ZI=$O(^AUTTHF("B",C0QHFCAT,"")) ; HEALTH FACTOR CATEGORY IEN
    49         N C0QN,C0QO
     65        N C0QN,C0QO,C0QR
    5066        S C0QO=$NA(^AUPNVHF("AA",DFN)) ; ALL THE PATIENT'S HEALTH FACTORS
    5167        S C0QN=$NA(^AUTTHF("AC",ZI)) ; ALL HEALTH FACTORS IN THIS CATEGORY
Note: See TracChangeset for help on using the changeset viewer.