IBCEF ;ALB/TMP - FORMATTER SPECIFIC BILL FUNCTIONS ;22-JAN-96
Source file <IBCEF.m>
Name | Comments | DBIA/ICR reference |
---|---|---|
COB(IBIFN) | ; Bill seq
|
|
COBN(IBIFN,A) | ; Return seq # of selected payer
; A = 'PST' or null to get current bill payer seq # |
|
POLICY(IBIFN,IBPC,IBCOBN) | ; Return raw data from policy info on bill
; IBPC = pc # of data element in policy (optional) ; if null, 0-node is returned ; IBCOBN = bill designation 1-3 or 'PST' (optional) ; if null, default to current |
|
POLICYQ | ||
INSADDR(IBIFN,IBCOB) | ; Return insured's address in 7 pieces:
; ALL STREET ADDRESSES^CITY^STATE ABBREVIATION^ZIP^STREET ADDRESS 1^ ; STREET ADDRESS 2^STREET ADDRESS 3 ; IBIFN = bill ien ; IBCOB = bill designation (P)rimary, (S)econdary, (T)ertiary ; or 1-2-3. If not defined or null, return current ; If insured is patient or spouse, take from patient file top level ; fields, then if top-level street addresses are blank and policy ; level fields are not, use policy level ; If insured is other than patient/spouse, use policy level fields only |
|
INSADDQ | ||
PI3 | ; build IBADDR string from patient insurance 3 node data
|
|
PTADDR(IBIFN,ELE) | ;Return part of patient's permanent address
|
|
PTDEM(IBIFN,ELE,PC) | ;Return part of patient's demographics
|
|
PTEMPL(IBIFN,ELE,WHOSE,VAOA) | ;Return part of pt's or spouse's employer info
|
|
INSDEM(IBIFN,IBCOB) | ; Return insured's demographics in 6 pieces:
; DATE OF BIRTH^SEX^PHONE^BRANCH pointer^RANK^SSN(no dashes) ; IBIFN = bill ien ; IBCOB = bill designation (P)rimary (default), (S)econdary, (T)ertiary ; or 1,2,3 ... if not defined or null, return current ; If insured is patient/spouse, take from patient file top level ; fields, then if top-level are blank and policy level aren't, ; use policy level ; If insured other than patient/spouse, use policy level fields only |
|
INSDEM1 | ||
INSEMPL(IBIFN,IBCOB) | ; Return insured's employer data in 5 pieces:
; EMPLOYER NAME^EMPLOYER CITY^EMPLOYER STATE ABBREVIATION^STATE IEN^STREET 1 ; IBCOB = bill designation (P)rimary-default, (S)econdary, (T)ertiary ; or 123 - if not defined or null, return current |
|
INSEMPQ | ||
WHOSINS(IBIFN,IBCOB) | ; Determine who is insured for bill IBIFN and
; seq of coverage COB (123 or PST) or if not defined or null, current |
|
EMPSTAT(IBIFN,WHOSE) | ;Return employment status
; IBIFN = bill ien ; WHOSE = v for vet, s for spouse status |
|
INPAT(IBIFN,OUT) | ; Determine if bill is inpatient
; OUT = optional - if 1, return output value based on ; inpatient/outpatient from UB-04 type of bill field ; Return 1 if inpatient, 0 if not inpatient or can't be determined |
|
INSPRF(IBIFN) | ; Function to determine if bill is prof or inst
; Return 1 if institutional (UB-04) claim, 0 if professional (CMS-1500) claim |
|
F(FLD,IBXRET,IBXERR1,IBIEN) | ;Execute extract for data element FLD and bill IBIEN
; If IBXDATA array to be returned as data value(s) of fld ; D F^IBCEF("FLD NAME","IBXDATA","IBXERR") or D F^IBCEF("FLD NAME") ; Variable ref-ed by IBXERR1 will contain error message if an error ; @IBXRET always defined on return. It will be null if error |
|
FQ | ||
SERVDT(IBIFN,LENGTH,FORMAT) | ; Return default service date for
; outpatient/UB-04 lines or X12-837 institutional lines ; LENGTH = null/8 for 8 digit date, 6 for 6 digit date ; FORMAT = 1 = X12 format (YYYYMMDD), 2 = FM internal (NNNNNNN), ; 0 = external (MMDDYY or MMDDYYYY) |
|
SERVDTQ | ||
NOPUNCT(X,SPACE,EXC) | ; Strip punctuation from data in X
; SPACE = flag if 1 strip SPACES ; EXC = list of punctuation not to strip |
|
FT(IBIFN) | ; Internal code for bill form type
|
|
COBCT(IBIFN) | ; # of payers on claim
|
|
INSTOUT(IBIFN) |
Name | Field # of Occurrence |
---|---|
$$GET1^DIQ | POLICY+19, POLICY+20 |
$$FT^IBCEF | SERVDT+6 |
$$INPAT^IBCEF | SERVDT+6, INSTOUT+2 |
$$INSPRF^IBCEF | INSTOUT+2 |
EXTONE^IBCEFG0 | F+24 |
$$DT^IBCEFG1 | SERVDT+11 |
$$DATE^IBCF2 | SERVDT+12 |
ADD^VADPT | INSADDR+18, PTADDR+7 |
DEM^VADPT | PTDEM+9 |
ELIG^VADPT | WHOSINS+6, WHOSINS+7 |
OAD^VADPT | PTEMPL+6 |
OPD^VADPT | EMPSTAT+5 |
FileNo | Call Tags |
---|---|
^IBA(355.3 - [#355.3] | GET1^DIQ |
Name | Line Occurrences (* Changed, ! Killed) |
---|---|
^DGCR(399 - [#399] | COB+2, POLICY+7, POLICY+15, INSADDR+14, INSADDR+17, INSADDQ, PTADDR+6, PTDEM+8, PTEMPL+5, INSDEM+13 , INSDEM1, INSEMPL+8, WHOSINS+5, EMPSTAT+4, INPAT+5, INSPRF+3, FT+1, COBCT+2 |
^DGCR(399.1 - [#399.1] | INPAT+9 |
^DIC(5 - [#5] | INSADDR+19, PI3+4, INSEMPL+10 |
^DPT - [#2] | INSADDQ+1, INSDEM1+1, EMPSTAT+6 |
^IBA(364.5 - [#364.5] | F+15, F+16, F+21 |
^UTILITY("VADM" | PTDEM+6, PTDEM+10, INSDEM+17 |
^UTILITY("VAPA" | PTADDR+4, PTADDR+8, INSDEM+18 |
Name | Line Occurrences |
---|---|
$$COB | COBN+2 |
$$COBN | POLICY+6, INSADDR+12, INSDEM+11 |
$$NOPUNCT | INSADDQ+3 |
$$POLICY | INSADDR+13, WHOSINS+3, WHOSINS+5 |
$$PTADDR | INSDEM+16 |
$$PTDEM | INSDEM+16 |
$$PTEMPL | INSEMPL+9 |
$$WHOSINS | INSDEM+12, INSEMPL+5 |
F | SERVDT+8 |
FQ | F+14, F+15, F+22 |
INSADDQ | INSADDR+15 |
INSDEM1 | INSDEM+14, INSDEM+19 |
INSEMPQ | INSEMPL+6 |
PI3 | INSADDQ+2, INSADDQ+3 |
SERVDTQ | SERVDT+6, SERVDT+9, SERVDT+11 |
Name | Field # of Occurrence |
---|---|
^("U" | INSADDR+17 |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
A | COB+1~, COB+2*, COB+3, COBN~, COBN+2*, COBN+3*, COBN+4, INSADDR+10~, INSADDQ*, INSADDQ+1* , INSADDQ+3, PI3+1, PI3+2, PI3+3, PI3+4, INSDEM+9~, INSDEM+16*, INSDEM+17*, INSDEM1*, INSDEM1+1* , INSDEM1+3, INSDEM1+4, INSDEM1+5, INSDEM1+6, INSDEM1+7, INSEMPL+4~, INSEMPL+9*, INSPRF+2~, INSPRF+3*, INSPRF+4* , INSPRF+5 |
B | INSADDR+10~, PI3+3*, INSDEM+9~ |
CODE | INPAT+4~, INPAT+6*, INPAT+7 |
CODE0 | INPAT+4~, INPAT+9*, INPAT+10, INPAT+11, INPAT+12, INPAT+13, INPAT+14, INPAT+15 |
CT | COBCT+1~, COBCT+2*, COBCT+3 |
DFN | INSADDR+10~, INSADDR+14*, INSADDQ+1, PTADDR+5~, PTADDR+6*, PTDEM+7~, PTDEM+8*, PTEMPL+4~, PTEMPL+5*, INSDEM+9~ , INSDEM+13*, INSDEM1+1, INSEMPL+4~, INSEMPL+8*, WHOSINS+2~, WHOSINS+5*, EMPSTAT+3~, EMPSTAT+4*, EMPSTAT+6 |
ELE | PTADDR~, PTADDR+8, PTDEM~, PTDEM+10, PTEMPL~, PTEMPL+7 |
EXC | NOPUNCT~, NOPUNCT+7 |
FLD | F~, F+15, F+16*, F+17*, F+21, F+22 |
FLDN | F+12~, F+24 |
FLDN(1 | F+24* |
FORMAT | SERVDT~, SERVDT+7*, SERVDT+9, SERVDT+11 |
IB0 | INPAT+4~, INPAT+5*, INPAT+6, INPAT+9, INPAT+10, INPAT+11, INPAT+12, INPAT+13, INPAT+14 |
IBADDR | INSADDR+10~, INSADDR+15*, INSADDR+19*, INSADDQ+2, INSADDQ+4, PI3+1*, PI3+2*, PI3+3*, PI3+4*, PI3+5* |
IBCOB | INSADDR~, INSADDR+11*, INSADDR+12*, INSADDR+13, INSADDQ, INSDEM~, INSDEM+10*, INSDEM+11*, INSDEM+12, INSDEM1 , INSEMPL~, INSEMPL+5, WHOSINS~, WHOSINS+3, WHOSINS+5 |
IBCOBN | POLICY~, POLICY+6*, POLICY+7, POLICY+15 |
IBDEM | INSDEM+9~, INSDEM+14*, INSDEM+19*, INSDEM+20*, INSDEM+21*, INSDEM1+3*, INSDEM1+4*, INSDEM1+5*, INSDEM1+6*, INSDEM1+7* , INSDEM1+8 |
IBEMPL | INSEMPL+4~, INSEMPL+6*, INSEMPL+10*, INSEMPQ |
IBI | POLICY+5~, POLICY+7*, POLICY+16*, POLICY+17*, POLICY+18, POLICY+19*, POLICY+20*, POLICY+21*, POLICYQ, INSADDR+10~ , INSADDR+13*, INSADDR+15, INSADDQ+3, INSDEM+9~, INSDEM+12*, INSDEM+14, INSDEM+21, INSDEM1+3, INSEMPL+4~, INSEMPL+5* , INSEMPL+6, INSEMPL+9 |
IBIEN | F~, F+5 |
IBIFN | COB~, COB+2, COBN~, COBN+2, POLICY~, POLICY+6, POLICY+7, POLICY+15, INSADDR~, INSADDR+12 , INSADDR+13, INSADDR+14, INSADDR+17, INSADDQ, PTADDR~, PTADDR+6, PTDEM~, PTDEM+8, PTEMPL~, PTEMPL+5 , INSDEM~, INSDEM+11, INSDEM+12, INSDEM+13, INSDEM+16, INSDEM1, INSEMPL~, INSEMPL+5, INSEMPL+8, INSEMPL+9 , WHOSINS~, WHOSINS+3, WHOSINS+5, EMPSTAT~, EMPSTAT+4, INPAT~, INPAT+5, INSPRF~, INSPRF+3, SERVDT~ , SERVDT+6, SERVDT+8, FT~, FT+1, COBCT~, COBCT+2, INSTOUT~, INSTOUT+2 |
IBPC | POLICY~, POLICY+21 |
>> IBXARRY | FQ*, FQ+1, FQ+4, FQ+5 |
IBXERR1 | F~, F+6*, F+10, F+14, F+15, F+22, F+26, FQ+1 |
IBXERR2 | F+12~, F+24, F+26 |
IBXHOLD | F+7~, F+8*, F+9*, FQ, FQ+3 |
IBXIEN | F+5~*, F+14, F+24 |
IBXRET | F~, F+9*, F+24, FQ, FQ+3*, FQ+4 |
IBXRETX | F+12~, FQ+4* |
IBXRETX(1 | FQ+4 |
IBY | POLICY+5~, POLICY+15*, POLICY+16, POLICY+17, POLICY+18*, POLICY+19, POLICY+20 |
IBZ | SERVDT+5~, SERVDT+9, SERVDT+11*, SERVDT+12*, SERVDTQ |
INPT | INPAT+4~, INPAT+7*, INPAT+10*, INPAT+11*, INPAT+12*, INPAT+13*, INPAT+14*, INPAT+15*, INPAT+16 |
LENGTH | SERVDT~, SERVDT+7*, SERVDT+11, SERVDT+12 |
OFLD | F+12~, F+15*, F+17 |
OUT | INPAT~, INPAT+6*, INPAT+7, INPAT+8 |
PC | PTDEM~, PTDEM+5*, PTDEM+10 |
PUNCT | NOPUNCT+4~, NOPUNCT+5*, NOPUNCT+6*, NOPUNCT+7*, NOPUNCT+8 |
SPACE | NOPUNCT~, NOPUNCT+6 |
STAT | EMPSTAT+3~, EMPSTAT+4*, EMPSTAT+5*, EMPSTAT+6*, EMPSTAT+7*, EMPSTAT+8 |
STOP | F+12~, F+15*, F+16, F+18* |
U | COB+2, POLICY+16, POLICY+17, POLICY+18, POLICY+19, POLICY+20, POLICY+21, INSADDR+14, INSADDR+17, INSADDR+19 , INSADDQ, INSADDQ+2, INSADDQ+3, PI3+1, PI3+2, PI3+3, PI3+4, PI3+5, PTADDR+6, PTADDR+8 , PTDEM+8, PTDEM+10, PTEMPL+5, PTEMPL+7, INSDEM+13, INSDEM+17, INSDEM+18, INSDEM+20, INSDEM+21, INSDEM1 , INSDEM1+3, INSDEM1+4, INSDEM1+5, INSDEM1+6, INSDEM1+7, INSEMPL+8, INSEMPL+10, WHOSINS+5, EMPSTAT+4, EMPSTAT+5 , EMPSTAT+6, INPAT+6, INPAT+9, INPAT+10, INPAT+11, INPAT+12, INPAT+13, INPAT+14, INSPRF+4, INSPRF+5 , F+21, FT+1 |
VADM | PTDEM+7~, INSDEM+9~ |
VADM( | INSDEM+17* |
VADM(2 | INSDEM+20 |
VADM(3 | INSDEM+19, INSDEM+21 |
VADM(5 | INSDEM+19, INSDEM1+2*, INSDEM1+3 |
VAEL | WHOSINS+2~ |
VAEL(4 | WHOSINS+6, WHOSINS+7 |
VAHOW | PTADDR+5~, PTADDR+6*, PTDEM+7~, PTDEM+8* |
VAOA | PTEMPL~, INSEMPL+4~, INSEMPL+9 |
VAOA( | PTEMPL+7 |
VAOA("A" | PTEMPL+5* |
VAOA(1 | INSEMPL+10 |
VAOA(4 | INSEMPL+10 |
VAOA(5 | INSEMPL+10 |
VAOA(9 | INSEMPL+10 |
VAPA | INSADDR+10~, PTADDR+5~ |
VAPA("P" | PTADDR+6* |
VAPA(1 | INSADDR+19 |
VAPA(2 | INSADDR+19 |
VAPA(3 | INSADDR+19 |
VAPA(4 | INSADDR+19 |
VAPA(5 | INSADDR+19 |
VAPA(6 | INSADDR+19 |
VAPA(8 | INSDEM+18*, INSDEM+19, INSDEM+20 |
VAPD | EMPSTAT+3~ |
VAPD(7 | EMPSTAT+5 |
VATEST | INSADDR+10~ |
VATEST("ADD" | INSADDR+17* |
WHOSE | PTEMPL~, PTEMPL+5, EMPSTAT~, EMPSTAT+5, EMPSTAT+6 |
X | NOPUNCT~, NOPUNCT+8*, NOPUNCT+9 |
Z | WHOSINS+2~, WHOSINS+3*, WHOSINS+4, WHOSINS+6*, WHOSINS+7*, WHOSINS+8*, WHOSINS+9, F+12~, F+20*, F+21* , F+22, F+24, NOPUNCT+4~, NOPUNCT+7*, COBCT+1~, COBCT+2* |
Z0 | WHOSINS+2~, WHOSINS+5*, WHOSINS+6, WHOSINS+7 |