Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BQITD20

BQITD20.m

Go to the documentation of this file.
  1. BQITD20 ;GDIT/HS/ALA-CKD NOS ; 29 Nov 2016 1:57 PM
  1. ;;2.6;ICARE MANAGEMENT SYSTEM;;Jul 07, 2017;Build 72
  1. ;
  1. ;
  1. POP(BQARY,TGLOB) ; EP -- By population
  1. ;
  1. ;Description
  1. ; Finds all patients who meet the criteria for Chronic Kidney Disease Stage 1
  1. ;Input
  1. ; BQARY - Array of taxonomies and other information
  1. ; TGLOB - Global where data is to be stored and passed back
  1. ; to calling routine
  1. ; Structure:
  1. ; TGLOB(DFN,"CRITERIA",criteria or taxonomy,visit or problem ien)=date/time
  1. I $D(@BQARY) D
  1. . D POP^BQITDGN(BQARY,TGLOB)
  1. ;
  1. ; Finish with all the logic and have a list of patients to file
  1. ; If already ESRD or Stage 5 or Stage 4 or Stage 3 or Stage 2 or Stage 1 but
  1. ; has not otherwise a specified CKD diagnosis
  1. NEW TDFN,TDXNCN
  1. S TDFN=""
  1. F S TDFN=$O(@TGLOB@(TDFN)) Q:'TDFN D
  1. . NEW I,TEXT
  1. . F I=1:1 S TEXT=$T(TAG+I) Q:TEXT=" Q" D
  1. .. S TDXNCN=$P(TEXT,";;",2) D
  1. ... I $$ATAG^BQITDUTL(TDFN,TDXNCN) K @TGLOB@(TDFN)
  1. Q
  1. ;
  1. PAT(DEF,BTGLOB,BDFN) ; EP -- By patient
  1. NEW DXOK,BQDXN,BQREF
  1. S DXOK=0
  1. S BQDXN=$$GDXN^BQITUTL(DEF)
  1. ;
  1. S BQREF="BQIRY"
  1. D GDF^BQITUTL(BQDXN,BQREF)
  1. S DXOK=$$PAT^BQITDGN(BQREF,BTGLOB,BDFN)
  1. ;
  1. ; if the person has already been identified as ESRD, Stage 5, Stage 4, Stage 3,
  1. ; Stage 2, or Stage 1 but still has a not otherwise specified CKD diagnosis
  1. NEW I,TEXT
  1. F I=1:1 S TEXT=$T(TAG+I) Q:TEXT=" Q" D
  1. . S TDXNCN=$P(TEXT,";;",2) D
  1. .. I $$ATAG^BQITDUTL(BDFN,TDXNCN) S DXOK=0
  1. Q DXOK
  1. ;
  1. TAG ;EP
  1. ;;End Stage Renal Disease
  1. ;;Chronic Kidney Dis Stg 5
  1. ;;Chronic Kidney Dis Stg 4
  1. ;;Chronic Kidney Dis Stg 3
  1. ;;Chronic Kidney Dis Stg 2
  1. ;;Chronic Kidney Dis Stg 1
  1. Q