Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Source |  Entry Points
Print Page as PDF
Routine: ICDJC2

Package: DRG Grouper

Routine: ICDJC2


Information

ICDJC2 ;ALB/ARH - DRG GROUPER CALCULATOR 2015 - CODE SETS ;05/26/2016

Source Information

Source file <ICDJC2.m>

Entry Points

Name Comments DBIA/ICR reference
CDSET(ICDDX,ICDPR,ICDDATE,PRATT,CDSARR) ; get all Code Sets defined by event Diagnosis and Procedure codes
; most Code Sets are specific to an event code, either Diagnosis (83.5,20) or Procedure (83.6,20)
; Dx Code Sets may be specific to primary or secondary event dx, all members of procedure Clusters must be defined
; an 'ONLY' Code Set is selected only if all the codes defined for the event are in the Code Set
; computed generic and linked group Code Sets are selected if all criteria are met
;
; Input: ICDDX(x) and ICDPR(x) - array of Dx/procedures input to API, ICDDATE - date of event, PRATT pr attributes
; Output: CDSARR - array of all Code Sets (83.3) satisfied by the event diagnosis and procedures
; CDSARR(code set ifn, icdxx number) = code ien (80/80.1) ^ DX/PR ^ single(1)/cluster only(0) ^ cluster ien
; CDSARR(code set ifn, 99_cmpt #) = ^ type of codes in set 'DX' or 'PR' - for computed codes sets
GETCDS(TYP,CDIFN,DATE,ARRCDS,ICDPR) ; get Code Sets for a single code on a date, either diagnosis (83.5,20) or procedure (83.6,20)
; input: TYP - type of codes 'DX' or 'PR', CDIFN - ptr to code in 83.5 or 83.6
; output: ARRCDS - array of code sets the code is a member of on the date
; ARRCDS(code set ifn (83.3)) = TYP ^ code set ifn ^ single(1)/cluster only(0) in set ^ cluster ptr 83.61
; a procedure may be assigned to a Code Set as a single procedure and/or as a member of a cluster, all members
; of a cluster (83.6,20,.04) must be defined for the cluster only procedures to select a Code Set
CLSTR(CLUSTER,ICDPR) ; determine if the event procedures satisfy the cluster
; returns true if all the procedures assigned to the cluster (83.61) are defined on the event
; input: CLUSTER - ptr to a cluster (83.61), ICDPR - array of event procedures
CALC1(ICDPR,PRATT) ; Computed generic Code Set: ANY OPERATING ROOM PROCEDURE
; returns the generic Code Set IFN if there is one or more O.R. or Surgical event procedures
CALC2(ICDPR,PRATT) ; Computed generic Code Set: NO OPERATING ROOM PROCEDURE
; returns the generic Code Set IFN if there are no O.R or Surgical event procedures
CALC3(ICDDX) ; Computed generic Code Set: NO SECONDARY DIAGNOSIS
; returns the generic Code Set IFN if there are no Secondary diagnosis on the event (only 1 dx)
ONLY(ONLYARR,ICDARR,CDSARR,PRATT) ; add 'ONLY' Code Set if all codes assigned to the event are in the Set
; if all the event codes are in the set then add the Only Code Set to the list of all selected Code Sets
; for diagnosis this is only applied to the secondary codes
; for procedures this is only applied to operating room procedures, non-or procedures outside the set are allowed
; input: ONLYARR(icdxx number) = ONLY code set ifn ^ code ifn (ptr #80, #80.1) ^ code type
; ICDARR - may be either ICDDX or ICDPRC, PRATT compiled procedure attributes
; output: CDSARR modified - if meets criteria the ONLY Code Set is added to CDSARR array of selected code sets
; CDSARR(ONLY code set ifn, idcxx number) = code ien (80/80.1) ^ code type ^ 1 (single)
LINK(LINKARR,CDSARR) ; add any Computed LNK Code Set that apply
; for any selected Code Set in a Linked group, check if the Link criteria is satisfied
; if the Link criteria is met then add the generic LNK Computed Code Set to the list of selected Code Sets
; input: LINKARR(link group, LINKED code set ifn) = count of selected Code Sets with the link group
; CDSARR(code set ifn, icdxx number) = code ifn (ptr #80, #80.1) ^ code type
; output: CDSARR modified, any LNK Computed Code Set satisfied is added to CDSARR array of all selected Sets
; CDSARR(LNK Computed code set ifn, 99x) = ^ code type w/x is the LNK set value
; difference between CDN and MLT is Condition is not exclusive, one code can satisfy more than one condition
; number of sets required is in link text after '-', count link number a group satisfies is in the set name
Info |  Source |  Entry Points