IBTRH3A ;ALB/VAD - IBT HCSR RESPONSE VIEW - Display set up ;02-JUN-2014
;;2.0;INTEGRATED BILLING;**517**;21-MAR-94;Build 240
;;Per VA Directive 6402, this routine should not be modified.
;
Q
;
GETINFO(IBTRNM,IBTRIEN) ; Get data items, as they would display on the bill
N DLN
D GETUMO(),GETPAT(),GETSVC^IBTRH3B()
Q
;
GETUMO() ; Get the UMO Contact Information
N GOTONE,SQ,X
Q:'$G(IBTRIEN)
D SETDLN("")
S DLN=" UMO Contact Information" D SETDLN(DLN,"B")
I $TR($G(DATA(19)),"^","")'="" D
. S DLN=" UMO Name: "_$P($G(DATA(19)),U,1) D SETDLN(DLN) ;[356.2219,.01]
. S DLN=" UMO Contact #: "
. I $P($G(DATA(19)),U,2)'=""!($L($G(DATA(20)))) D ;[356.2219,2]
. . S DLN=DLN_$$EXTERNAL^DILFD(356.22,19.01,,+$P($G(DATA(19)),U,2))
. . S DLN=DLN_": "_$G(DATA(20)) D SETDLN(DLN)
. F X=2,3 I $L($G(DATA(19+X))) D ;[356.22,21-22]
. . S DLN="",$E(DLN,19)=$$EXTERNAL^DILFD(356.22,(19+(X*.01)),,+$P($G(DATA(19)),U,X))
. . S DLN=DLN_": "_$G(DATA(20+X)) D SETDLN(DLN)
. D SETDLN("")
I $TR($G(DATA(19)),"^","")="" S DLN=" No UMO Contact Information" D SETDLN(DLN)
Q
;
GETPAT() ; Get the Patient Event Detail
N DLN,GOTONE,PRVPTR,PRVDATA,SQ,SQCNT,TAXNMY,VAL1,VAL3
Q:'$G(IBTRIEN)
S $E(DLN,32)="PATIENT EVENT DETAIL" D SETDLN(DLN)
I $G(DATA(105))'="" D
. S DLN=" Patient Event Trace Number: "
. S SQ=0 F S SQ=$O(DATA(105,SQ)) Q:SQ="" D
. . S $E(DLN,32)=$P(DATA(105,SQ,0),U,4) D SETDLN(DLN) S DLN="" ;[356.22105,.04]
D SETDLN("")
; - Health Care Services Review info -
S DLN=" Health Care Services Review" D SETDLN(DLN,"B")
I $TR($G(DATA(103,0)),"^","")'="" D
. S VAL1=$P($G(DATA(103,0)),U,1)_",",VAL3=$P($G(DATA(103,0)),U,3)_","
. S DLN=" Certification Action: "
. I $L($$GET1^DIQ(356.02,VAL1,.01)) S DLN=DLN_$$GET1^DIQ(356.02,VAL1,.01)_" - "_$$GET1^DIQ(356.02,VAL1,.02) ;[356.22,103.01]
. D SETDLN(DLN)
. S DLN=" Certification/Authorization #: " S DLN=DLN_$P($G(DATA(103,0)),U,2) D SETDLN(DLN) ;[356.22,103.02]
. S DLN=" Review Decision Reason: "
. I $L($$GET1^DIQ(356.021,VAL3,.01)) S DLN=DLN_$$GET1^DIQ(356.021,VAL3,.01)_" - "_$E($$GET1^DIQ(356.021,VAL3,.02),1,45) ;[356.22,103.03]
. D SETDLN(DLN)
. S DLN=" Second Surgical Opinion Ind: " S DLN=DLN_$P($G(DATA(103,0)),U,4) D SETDLN(DLN) ;[356.22,103.04]
. D SETDLN("")
S DLN=" Previous Admin Ref #: " S DLN=DLN_$P($G(DATA(17)),U,2) D SETDLN(DLN) ;[356.22,17.02]
S DLN=" Previous Review Autho #: " S DLN=DLN_$P($G(DATA(17)),U,1) D SETDLN(DLN) ;[356.22,17.01]
S DLN=" Proposed/Actual "_$S($P($G(DATA(0)),U,4)="I":"Admission",1:"Appointment")_" Date: " ;[356.22,.04]
S DLN=DLN_$$FMTE^XLFDT($P($G(DATA(0)),U,7)) D SETDLN(DLN) ;[356.22,.07]
S DLN=" Proposed or Discharge Date: " S DLN=DLN_$$FMTE^XLFDT($P($G(DATA(2)),U,22)) D SETDLN(DLN) ;[356.22,2.22]
S DLN=" Cert. Effective Date: " S DLN=DLN_$$FMTE^XLFDT($P($G(DATA(2)),U,25))
I $P($G(DATA(2)),U,26)'="" S DLN=DLN_" - "_$$FMTE^XLFDT($P($G(DATA(2)),U,26))
D SETDLN(DLN) ;[356.22,2.25] - [356.22,2.26]
S DLN=" Cert. Issue Date: " S DLN=DLN_$$FMTE^XLFDT($P($G(DATA(2)),U,23)) ;[356.22,2.23]
S $E(DLN,44)="Cert. Expiration Date: " S DLN=DLN_$$FMTE^XLFDT($P($G(DATA(2)),U,24)) D SETDLN(DLN) ;[356.22,2.24]
D SETDLN("")
; - Health Care Services Delivery info -
S DLN=" Health Care Services Delivery" D SETDLN(DLN,"B")
I $TR($G(DATA(4)),"^","")'="" D
. S DLN=" Quantity Qualifier: " S DLN=DLN_$$GET1^DIQ(365.016,+$P($G(DATA(4)),U,1),.02) ;[356.22,4.01]
. S $E(DLN,44)="Service Unit Count: " S DLN=DLN_$P($G(DATA(4)),U,2) D SETDLN(DLN) ;[356.22,4.02]
. S DLN=" Unit/Basis for Measure Code: " S DLN=DLN_$$EXTERNAL^DILFD(356.22,4.03,,$P($G(DATA(4)),U,3)) ;[356.22,4.03]
. S $E(DLN,44)="Sample Selection Modulus: " S DLN=DLN_$P($G(DATA(4)),U,4) D SETDLN(DLN) ;[356.22,4.04]
. S DLN=" Time Period Qualifier: " S DLN=DLN_$$GET1^DIQ(365.015,+$P($G(DATA(4)),U,5),.02) ;[356.22,4.05]
. S $E(DLN,44)=" Period Count: " S DLN=DLN_$P($G(DATA(4)),U,6) D SETDLN(DLN) ;[356.22,4.06]
. S DLN=" Delivery Frequency: " S DLN=DLN_$$GET1^DIQ(365.025,+$P($G(DATA(4)),U,7),.02) D SETDLN(DLN) ;[356.22,4.07]
. S DLN=" Delivery Pattern: " S DLN=DLN_$$GET1^DIQ(356.007,+$P($G(DATA(4)),U,8),.02) D SETDLN(DLN) ;[356.22,4.08]
I $G(DATA(4))="" S DLN=" No Health Care Services Delivery Information" D SETDLN(DLN)
D SETDLN("")
; - Patient Diagnosis info -
S DLN=" Patient Diagnosis Information" D SETDLN(DLN,"B") ; Up to 12 Dx Code(s) & Date(s)
S GOTONE=0
S SQ="" F S SQ=$O(DATA(3,SQ)) Q:SQ="" D
. I '+SQ Q
. S GOTONE=1
. S DLN=" Diagnosis Type: "_$$GET1^DIQ(356.006,+$P($G(DATA(3,SQ,0)),U,1),.02) D SETDLN(DLN) ;[356.223,.01]
. S DLN=" Diagnosis Code: "_$$EXTERNAL^DILFD(356.223,.02,,$P($G(DATA(3,SQ,0)),U,2)) D SETDLN(DLN) ;[356.223,.02]
. S DLN=" Diagnosis Date: "_$$FMTE^XLFDT($P($G(DATA(3,SQ,0)),U,3)) D SETDLN(DLN) ;[356.223,.03]
. D SETDLN("")
I 'GOTONE S DLN=" No Diagnosis Information" D SETDLN(DLN),SETDLN("")
;
; - Institutional Claim Code info -
I $P($G(DATA(7)),U,3)'="" D
. S DLN=" Institutional Claim Code" D SETDLN(DLN,"B")
. S DLN=" Admission Type Code:" S DLN=DLN_$$EXTERNAL^DILFD(356.22,7.01,,$P($G(DATA(7)),U,1)) ;[356.22,7.01]
. S $E(DLN,44)=" Admission Source Code: " S DLN=DLN_$$GET1^DIQ(356.009,+$P($G(DATA(7)),U,1),.02) D SETDLN(DLN) ;[356.22,7.02]
. S DLN=" Patient Status Code: " S DLN=DLN_$$EXTERNAL^DILFD(356.22,.04,,$P($G(DATA(0)),U,4)) D SETDLN(DLN) ;[356.22,.04]
. D SETDLN("")
;
; - Ambulance Transport info -
S DLN=" Ambulance Transport Information" D SETDLN(DLN,"B")
I $TR($G(DATA(18)),"^","")'=""!($P($G(DATA(4)),U,3)'="") D
. S DLN=" Ambulance Transport Code: " S DLN=DLN_$$EXTERNAL^DILFD(356.22,18.03,,$P($G(DATA(18)),U,3)) ;[356.22,18.03]
. S $E(DLN,44)="Unit/Basis for Measure Code: " S DLN=DLN_$$EXTERNAL^DILFD(356.22,18.01,,$P($G(DATA(4)),U,3)) D SETDLN(DLN) ;[356.22,18.01]
. S DLN=" Transport Distance: " S DLN=DLN_$P($G(DATA(18)),U,6) D SETDLN(DLN) ;[356.22,18.06]
I $TR($G(DATA(18)),"^","")="",$P($G(DATA(4)),U,3)="" S DLN=" No Ambulance Transport Information" D SETDLN(DLN)
D SETDLN("")
; - Spinal Manipulation Service info -
S DLN=" Spinal Manipulation Service Information" D SETDLN(DLN,"B")
I $TR($G(DATA(7)),"^","")'="" D
. S DLN=" Treatment Series Number: "_$P(DATA(7),U,5) ;[356.22,7.05]
. S $E(DLN,44)="Treatment Count: "_$P(DATA(7),U,6) D SETDLN(DLN) ;[356.22,7.06]
. S DLN=" Subluxation Level Code 1: "_$$GET1^DIQ(356.012,+$P(DATA(7),U,7),.02) D SETDLN(DLN) ;[356.22,7.07]
. S DLN=" Subluxation Level Code 2: "_$$GET1^DIQ(356.012,+$P(DATA(7),U,8),.02) D SETDLN(DLN) ;[356.22,7.08]
I $TR($G(DATA(7)),"^","")="" S DLN=" No Spinal Manipulation Service Information" D SETDLN(DLN)
D SETDLN("")
; - Home Oxygen Therapy info -
S DLN=" Home Oxygen Therapy Information" D SETDLN(DLN,"B")
I $TR($G(DATA(8)),"^","")'=""!($TR($G(DATA(9)),"^","")'="") D
. S DLN=" Oxygen Equipment Type Code 1: "_$$GET1^DIQ(356.013,+$P($G(DATA(8)),U,1),.02) D SETDLN(DLN) ;[356.22,8.01]
. S DLN=" Oxygen Equipment Type Code 2: "_$$GET1^DIQ(356.013,+$P($G(DATA(8)),U,2),.02) D SETDLN(DLN) ;[356.22,8.02]
. S DLN=" Oxygen Equipment Type Code 3: "_$$GET1^DIQ(356.013,+$P($G(DATA(8)),U,3),.02) D SETDLN(DLN) ;[356.22,8.03]
. S DLN=" Oxygen Flow Rate: "_$P($G(DATA(8)),U,5) ;[356.22,8.05]
. S $E(DLN,44)="Daily Oxygen Use Count: "_$P($G(DATA(8)),U,6) D SETDLN(DLN) ;[356.22,8.06]
. S DLN=" Oxygen Use Period Hour Count: "_$P($G(DATA(8)),U,7) D SETDLN(DLN) ;[356.22,8.07]
. S DLN=" Respiratory Therapist Order Text: "_$P($G(DATA(8)),U,8) D SETDLN(DLN) ;[356.22,8.08]
. S DLN=" Arterial Blood Gas Quantity: "_$P($G(DATA(9)),U,1) D SETDLN(DLN) ;[356.22,9.01]
. S DLN=" Oxygen Saturation Quantity: "_$P($G(DATA(9)),U,2) D SETDLN(DLN) ;[356.22,9.02]
. S DLN=" Oxygen Test Condition: "_$$GET1^DIQ(356.014,+$P($G(DATA(9)),U,3),.02) D SETDLN(DLN) ;[356.22,9.03]
. S DLN=" Oxygen Test Findings #1: "_$E($$GET1^DIQ(356.015,+$P($G(DATA(9)),U,4),.02),1,50) D SETDLN(DLN) ;[356.22,9.04]
. S DLN=" Oxygen Test Findings #2: "_$E($$GET1^DIQ(356.015,+$P($G(DATA(9)),U,5),.02),1,50) D SETDLN(DLN) ;[356.22,9.05]
. S DLN=" Oxygen Test Findings #3: "_$E($$GET1^DIQ(356.015,+$P($G(DATA(9)),U,6),.02),1,50) D SETDLN(DLN) ;[356.22,9.06]
. S DLN=" Portable Oxygen System Flow Rate: "_$P($G(DATA(9)),U,7) D SETDLN(DLN) ;[356.22,9.07]
. S DLN=" Oxygen Delivery System Code: "_$E($$GET1^DIQ(356.016,+$P($G(DATA(9)),U,8),.02),1,40) D SETDLN(DLN) ;[356.22,9.08]
I $TR($G(DATA(8)),"^","")="",$TR($G(DATA(9)),"^","")="" S DLN=" No Home Oxygen Therapy Information" D SETDLN(DLN)
D SETDLN("")
; - Home Health Care info -
S DLN=" Home Health Care Information" D SETDLN(DLN,"B")
I $P($G(DATA(2)),U,15)'=""!($TR($P($G(DATA(10)),U,1,3),"^","")'="") D
. S DLN=" Prognosis Code: "_$$GET1^DIQ(356.004,+$P($G(DATA(2)),U,15),.02) D SETDLN(DLN) ;[356.22,2.15]
. S DLN=" Home Health Start Date: "_$$FMTE^XLFDT($P($G(DATA(10)),U,1)) D SETDLN(DLN) ;[356.22,10.01]
. S DLN=" Home Health Certification Period: "
. I $L($P($G(DATA(10)),U,2))!($L($P($G(DATA(10)),U,3))) D
. . S DLN=DLN_$$FMTE^XLFDT($P($G(DATA(10)),U,2)) ;[356.22,10.02]
. . S DLN=DLN_" - "_$$FMTE^XLFDT($P($G(DATA(10)),U,3)) ;[356.22,10.03]
. D SETDLN(DLN)
. S DLN=" Medicare Coverage Indicator: "_$$EXTERNAL^DILFD(356.22,10.04,,$P($G(DATA(10)),U,4)) D SETDLN(DLN) ;[356.22,10.04]
. S DLN=" Certification Type Code: "_$$GET1^DIQ(356.002,+$P($G(DATA(2)),U,2),.02) D SETDLN(DLN) ;[356.22,2.02]
I $P($G(DATA(2)),U,15)="",$TR($P($G(DATA(10)),U,1,3),"^","")="" S DLN=" No Home Health Care Information" D SETDLN(DLN)
D SETDLN("")
; - Additional Patient info -
S DLN=" Additional Patient Information" D SETDLN(DLN,"B")
I $D(DATA(11)) D
. S SQ=0
. F S SQ=$O(DATA(11,SQ)) Q:SQ="" D
. . S DLN=" Report Type: "_$P($G(^IBT(356.018,+$P($G(DATA(11,SQ,0)),U,1),0)),U,2) D SETDLN(DLN) ;[356.22,11.01] ptr to ^IBT(356.018)]
. . S DLN=" Report Transmission Code: "_$P($G(DATA(11,SQ,0)),U,2) D SETDLN(DLN) ;[356.22,11.02]
. . S DLN=" Attachment Control #: "_$E($P($G(DATA(11,SQ,0)),U,3),1,50) D SETDLN(DLN) ;[356.22,11.03]
. . S DLN=" Attachment Description: "_$E($P($G(DATA(11,SQ,0)),U,4),1,50) D SETDLN(DLN) ;[356.22,11.04]
. . D SETDLN("")
I '$D(DATA(11)) S DLN=" No Additional Patient Information" D SETDLN(DLN),SETDLN("")
; - Message Text -
S DLN=" Message Text: " D SETDLN(DLN,"B")
I +$G(DATA(12,0)) D
. S SQCNT=+$G(DATA(12,0))
. F SQ=1:1:SQCNT S DLN=" "_$G(DATA(12,SQ)) D SETDLN(DLN) ;[356.22,12]
I '+$G(DATA(12,0)) S DLN=" No Message Text" D SETDLN(DLN)
D SETDLN("")
; - Additional Patient Information Contact Data -
S DLN=" Additional Patient Information Contact Data" D SETDLN(DLN,"B")
S GOTONE=0
I $D(DATA(13)) D
.S SQ="" F S SQ=$O(DATA(13,SQ)) Q:SQ="" D
..I $G(DATA(13,SQ,4))="",$G(DATA(13,SQ,5))="" Q
..S GOTONE=1
..S DLN=" Response Contact Name: "_$P($G(DATA(13,SQ,4)),U,4) ;Last Name-[356.2213,4.04]
..S DLN=DLN_", "_$P($G(DATA(13,SQ,4)),U,5) ;First Name-[356.2213,4.05]
..S DLN=DLN_" "_$P($G(DATA(13,SQ,4)),U,6) ;Middle Name-[356.2213,4.06]
..S DLN=DLN_" "_$P($G(DATA(13,SQ,4)),U,7) D SETDLN(DLN) ;Suffix-[356.2213,4.07]
..S DLN=" Identification Code Qualifier: "_$$GET1^DIQ(365.023,+$P($G(DATA(13,SQ,4)),U,8),.02) D SETDLN(DLN) ;[356.2213,4.08]
..S DLN=" Response Contact Identifier: "_$P($G(DATA(13,SQ,4)),U,9) D SETDLN(DLN) ;[356.2213,4.09]
..S DLN=" Response Contact Address:"
..S DLN=DLN_" "_$P($G(DATA(13,SQ,5)),U,1) D SETDLN(DLN) ;[356.2213,5]
..I $L($P($G(DATA(13,SQ,5)),U,2)) S DLN="",$E(DLN,30)=$P(DATA(13,SQ,5),U,2) D SETDLN(DLN) ;[356.2213,5.01]
..S DLN="",$E(DLN,30)=$P($G(DATA(13,SQ,5)),U,3) ;[356.2213,5.02]
..S DLN=DLN_", " I +$P($G(DATA(13,SQ,5)),U,4) S DLN=DLN_$$GET1^DIQ(5,$P(^DIC(5,+$P($G(DATA(13,SQ,5)),U,4),0),U,2)_",",1) ;[356.2213,5.03]
..S DLN=DLN_" "_$P($G(DATA(13,SQ,5)),U,5) D SETDLN(DLN) ;[356.2213,5.04]
..I +$P($G(DATA(13,SQ,5)),U,6) S DLN="",$E(DLN,30)=$$GET1^DIQ(779.004,$P($G(DATA(13,SQ,5)),U,6),.01) ;[356.2213,5.05]
..S DLN=DLN_" "_$P($G(DATA(13,SQ,5)),U,7) D SETDLN(DLN) ;[356.2213,5.06]
..D SETDLN("")
..S DLN=" Response Contact Name: "_$P($G(DATA(13,SQ,0)),U,6) D SETDLN(DLN) ;[356.2213,.06]
..S DLN=" Response Contact #: "
..I $P($G(DATA(13,SQ,0)),U,7)'=""!($L($G(DATA(13,SQ,1)))) D ;[356.2213,1]
...S DLN=DLN_$$EXTERNAL^DILFD(356.2213,.07,,+$P($G(DATA(13,SQ,0)),U,7))
...S DLN=DLN_": "_$G(DATA(13,SQ,1)) D SETDLN(DLN)
..F X=2,3 I $L($G(DATA(13,SQ,X))) D ;[356.2213,2-3]
...S DLN="",$E(DLN,19)=$$EXTERNAL^DILFD(356.2213,(.06+(X*.01)),,+$P($G(DATA(13,SQ,0)),U,(6+X)))
...S DLN=DLN_": "_$G(DATA(13,SQ,X)) D SETDLN(DLN)
..D SETDLN("")
I '+GOTONE S DLN=" No Additional Patient Information Contact" D SETDLN(DLN),SETDLN("")
; - Pat Event Prov Info (repeats up to 14 times)-[356.2213]
S DLN=" Patient Event Provider Information" D SETDLN(DLN,"B")
S GOTONE=0
I $D(DATA(13)) D
.S SQ="" F S SQ=$O(DATA(13,SQ)) Q:SQ="" D
..I $G(DATA(13,SQ,0))="" Q
..S GOTONE=1,TAXNMY=""
..S DLN=" Entity Provider Code: "_$$GET1^DIQ(365.022,+$P($G(DATA(13,SQ,0)),U,1),.02) D SETDLN(DLN) ;[356.2213,.01]
..S PRVPTR=$P($G(DATA(13,SQ,0)),U,3)
..S PRVDATA=$$PRVDATA^IBTRHLO2(+$P(PRVPTR,";"),$P($P(PRVPTR,"(",2),","))
..; PRVDATA = name ^ line 1 ^ line 2 ^ city ^ state ^ zip ^ NPI
..S DLN=" Provider ID: "_$P(PRVDATA,U,7) ;[356.2213,.03] ptr to Provider File ^VA(200), ^IBA(355.93) or ^DIC(4)]
..S TAXNMY=$$GTXNMY^IBTRH3(PRVPTR) ; Get the Taxonomy Code and Person Class Description.
..S $E(DLN,44)="Provider Taxonomy: "_$P(TAXNMY,U,1) D SETDLN(DLN) ; Taxonomy code.
..S DLN=" Person Class: "_$P(TAXNMY,U,2) ; Person Class Description.
..S DLN=" Provider Name: "_$P(PRVDATA,U,1) D SETDLN(DLN) ;[^VA(200,.01), ^IBA(355.93,.01), or ^DIC(4,.01)]
..S DLN=" Provider Address: "_$P(PRVDATA,U,2) D SETDLN(DLN) ;[^IBA(355.93,.05) or ^VA(200,.111)]
..I $L($P(PRVDATA,U,3)) S DLN="",$E(DLN,22)=$P(PRVDATA,U,3) D SETDLN(DLN) ;[^IBA(355.93,.06) or ^VA(200,.112)]
..S DLN="",$E(DLN,22)=$P(PRVDATA,U,4)_$S($P(PRVDATA,U,4)'="":", ",1:"")_$$GET1^DIQ(5,$P(PRVDATA,U,5)_",",1)_" "_$P(PRVDATA,U,6) D SETDLN(DLN) ;[^IBA(355.93,.07-.09) or ^VA(200,.113-.115)]
..D SETDLN("")
I '+GOTONE S DLN=" No Patient Event Provider Information" D SETDLN(DLN),SETDLN("")
S DLN=" Patient Event Transport Information" D SETDLN(DLN,"B")
S GOTONE=0
I $D(DATA(14)) D
.S SQ="" F S SQ=$O(DATA(14,SQ)) Q:SQ="" D
..I $G(DATA(14,SQ,0))="" Q
..S GOTONE=1
..S DLN=" Entity Identifier Code: "_$P($G(DATA(14,SQ,0)),U,1) D SETDLN(DLN) ;[356.2214,.01]
..S DLN=" Transport Location Name: "_$P($G(DATA(14,SQ,0)),U,2) D SETDLN(DLN) ;[356.2214,.02]
..S DLN=" Transport Location Address: "_$P($G(DATA(14,SQ,0)),U,3) D SETDLN(DLN) ;[356.2214,.03]
..I $L($P($G(DATA(14,SQ,0)),U,4)) S DLN="",$E(DLN,33)=$P(DATA(14,SQ,0),U,4) D SETDLN(DLN) ;[356.2214,.04]
..S DLN="",$E(DLN,33)=$P($G(DATA(14,SQ,0)),U,5) ;[356.2214,.05]
..S DLN=DLN_", " I +$P($G(DATA(14,SQ,0)),U,6) S DLN=DLN_$$GET1^DIQ(5,$P(^DIC(5,+$P($G(DATA(14,SQ,0)),U,6),0),U,2)_",",1) ;[356.2214,5.03]
..S DLN=DLN_" "_$P($G(DATA(14,SQ,0)),U,7) D SETDLN(DLN) ;[356.2214,.07]
..D SETDLN("")
I '+GOTONE S DLN=" No Patient Event Transport Information" D SETDLN(DLN),SETDLN("")
Q
;
SETDLN(DLN,SPEC) ; Add Display Line to ^TMP global.
S VALMCNT=VALMCNT+1
S ^TMP(IBTRNM,$J,VALMCNT,0)=DLN
I $G(SPEC)="B" D CNTRL^VALM10(VALMCNT,1,80,IOINHI,IOINORM)
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBTRH3A 15695 printed Oct 16, 2024@18:28:42 Page 2
IBTRH3A ;ALB/VAD - IBT HCSR RESPONSE VIEW - Display set up ;02-JUN-2014
+1 ;;2.0;INTEGRATED BILLING;**517**;21-MAR-94;Build 240
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 QUIT
+5 ;
GETINFO(IBTRNM,IBTRIEN) ; Get data items, as they would display on the bill
+1 NEW DLN
+2 DO GETUMO()
DO GETPAT()
DO GETSVC^IBTRH3B()
+3 QUIT
+4 ;
GETUMO() ; Get the UMO Contact Information
+1 NEW GOTONE,SQ,X
+2 if '$GET(IBTRIEN)
QUIT
+3 DO SETDLN("")
+4 SET DLN=" UMO Contact Information"
DO SETDLN(DLN,"B")
+5 IF $TRANSLATE($GET(DATA(19)),"^","")'=""
Begin DoDot:1
+6 ;[356.2219,.01]
SET DLN=" UMO Name: "_$PIECE($GET(DATA(19)),U,1)
DO SETDLN(DLN)
+7 SET DLN=" UMO Contact #: "
+8 ;[356.2219,2]
IF $PIECE($GET(DATA(19)),U,2)'=""!($LENGTH($GET(DATA(20))))
Begin DoDot:2
+9 SET DLN=DLN_$$EXTERNAL^DILFD(356.22,19.01,,+$PIECE($GET(DATA(19)),U,2))
+10 SET DLN=DLN_": "_$GET(DATA(20))
DO SETDLN(DLN)
End DoDot:2
+11 ;[356.22,21-22]
FOR X=2,3
IF $LENGTH($GET(DATA(19+X)))
Begin DoDot:2
+12 SET DLN=""
SET $EXTRACT(DLN,19)=$$EXTERNAL^DILFD(356.22,(19+(X*.01)),,+$PIECE($GET(DATA(19)),U,X))
+13 SET DLN=DLN_": "_$GET(DATA(20+X))
DO SETDLN(DLN)
End DoDot:2
+14 DO SETDLN("")
End DoDot:1
+15 IF $TRANSLATE($GET(DATA(19)),"^","")=""
SET DLN=" No UMO Contact Information"
DO SETDLN(DLN)
+16 QUIT
+17 ;
GETPAT() ; Get the Patient Event Detail
+1 NEW DLN,GOTONE,PRVPTR,PRVDATA,SQ,SQCNT,TAXNMY,VAL1,VAL3
+2 if '$GET(IBTRIEN)
QUIT
+3 SET $EXTRACT(DLN,32)="PATIENT EVENT DETAIL"
DO SETDLN(DLN)
+4 IF $GET(DATA(105))'=""
Begin DoDot:1
+5 SET DLN=" Patient Event Trace Number: "
+6 SET SQ=0
FOR
SET SQ=$ORDER(DATA(105,SQ))
if SQ=""
QUIT
Begin DoDot:2
+7 ;[356.22105,.04]
SET $EXTRACT(DLN,32)=$PIECE(DATA(105,SQ,0),U,4)
DO SETDLN(DLN)
SET DLN=""
End DoDot:2
End DoDot:1
+8 DO SETDLN("")
+9 ; - Health Care Services Review info -
+10 SET DLN=" Health Care Services Review"
DO SETDLN(DLN,"B")
+11 IF $TRANSLATE($GET(DATA(103,0)),"^","")'=""
Begin DoDot:1
+12 SET VAL1=$PIECE($GET(DATA(103,0)),U,1)_","
SET VAL3=$PIECE($GET(DATA(103,0)),U,3)_","
+13 SET DLN=" Certification Action: "
+14 ;[356.22,103.01]
IF $LENGTH($$GET1^DIQ(356.02,VAL1,.01))
SET DLN=DLN_$$GET1^DIQ(356.02,VAL1,.01)_" - "_$$GET1^DIQ(356.02,VAL1,.02)
+15 DO SETDLN(DLN)
+16 ;[356.22,103.02]
SET DLN=" Certification/Authorization #: "
SET DLN=DLN_$PIECE($GET(DATA(103,0)),U,2)
DO SETDLN(DLN)
+17 SET DLN=" Review Decision Reason: "
+18 ;[356.22,103.03]
IF $LENGTH($$GET1^DIQ(356.021,VAL3,.01))
SET DLN=DLN_$$GET1^DIQ(356.021,VAL3,.01)_" - "_$EXTRACT($$GET1^DIQ(356.021,VAL3,.02),1,45)
+19 DO SETDLN(DLN)
+20 ;[356.22,103.04]
SET DLN=" Second Surgical Opinion Ind: "
SET DLN=DLN_$PIECE($GET(DATA(103,0)),U,4)
DO SETDLN(DLN)
+21 DO SETDLN("")
End DoDot:1
+22 ;[356.22,17.02]
SET DLN=" Previous Admin Ref #: "
SET DLN=DLN_$PIECE($GET(DATA(17)),U,2)
DO SETDLN(DLN)
+23 ;[356.22,17.01]
SET DLN=" Previous Review Autho #: "
SET DLN=DLN_$PIECE($GET(DATA(17)),U,1)
DO SETDLN(DLN)
+24 ;[356.22,.04]
SET DLN=" Proposed/Actual "_$SELECT($PIECE($GET(DATA(0)),U,4)="I":"Admission",1:"Appointment")_" Date: "
+25 ;[356.22,.07]
SET DLN=DLN_$$FMTE^XLFDT($PIECE($GET(DATA(0)),U,7))
DO SETDLN(DLN)
+26 ;[356.22,2.22]
SET DLN=" Proposed or Discharge Date: "
SET DLN=DLN_$$FMTE^XLFDT($PIECE($GET(DATA(2)),U,22))
DO SETDLN(DLN)
+27 SET DLN=" Cert. Effective Date: "
SET DLN=DLN_$$FMTE^XLFDT($PIECE($GET(DATA(2)),U,25))
+28 IF $PIECE($GET(DATA(2)),U,26)'=""
SET DLN=DLN_" - "_$$FMTE^XLFDT($PIECE($GET(DATA(2)),U,26))
+29 ;[356.22,2.25] - [356.22,2.26]
DO SETDLN(DLN)
+30 ;[356.22,2.23]
SET DLN=" Cert. Issue Date: "
SET DLN=DLN_$$FMTE^XLFDT($PIECE($GET(DATA(2)),U,23))
+31 ;[356.22,2.24]
SET $EXTRACT(DLN,44)="Cert. Expiration Date: "
SET DLN=DLN_$$FMTE^XLFDT($PIECE($GET(DATA(2)),U,24))
DO SETDLN(DLN)
+32 DO SETDLN("")
+33 ; - Health Care Services Delivery info -
+34 SET DLN=" Health Care Services Delivery"
DO SETDLN(DLN,"B")
+35 IF $TRANSLATE($GET(DATA(4)),"^","")'=""
Begin DoDot:1
+36 ;[356.22,4.01]
SET DLN=" Quantity Qualifier: "
SET DLN=DLN_$$GET1^DIQ(365.016,+$PIECE($GET(DATA(4)),U,1),.02)
+37 ;[356.22,4.02]
SET $EXTRACT(DLN,44)="Service Unit Count: "
SET DLN=DLN_$PIECE($GET(DATA(4)),U,2)
DO SETDLN(DLN)
+38 ;[356.22,4.03]
SET DLN=" Unit/Basis for Measure Code: "
SET DLN=DLN_$$EXTERNAL^DILFD(356.22,4.03,,$PIECE($GET(DATA(4)),U,3))
+39 ;[356.22,4.04]
SET $EXTRACT(DLN,44)="Sample Selection Modulus: "
SET DLN=DLN_$PIECE($GET(DATA(4)),U,4)
DO SETDLN(DLN)
+40 ;[356.22,4.05]
SET DLN=" Time Period Qualifier: "
SET DLN=DLN_$$GET1^DIQ(365.015,+$PIECE($GET(DATA(4)),U,5),.02)
+41 ;[356.22,4.06]
SET $EXTRACT(DLN,44)=" Period Count: "
SET DLN=DLN_$PIECE($GET(DATA(4)),U,6)
DO SETDLN(DLN)
+42 ;[356.22,4.07]
SET DLN=" Delivery Frequency: "
SET DLN=DLN_$$GET1^DIQ(365.025,+$PIECE($GET(DATA(4)),U,7),.02)
DO SETDLN(DLN)
+43 ;[356.22,4.08]
SET DLN=" Delivery Pattern: "
SET DLN=DLN_$$GET1^DIQ(356.007,+$PIECE($GET(DATA(4)),U,8),.02)
DO SETDLN(DLN)
End DoDot:1
+44 IF $GET(DATA(4))=""
SET DLN=" No Health Care Services Delivery Information"
DO SETDLN(DLN)
+45 DO SETDLN("")
+46 ; - Patient Diagnosis info -
+47 ; Up to 12 Dx Code(s) & Date(s)
SET DLN=" Patient Diagnosis Information"
DO SETDLN(DLN,"B")
+48 SET GOTONE=0
+49 SET SQ=""
FOR
SET SQ=$ORDER(DATA(3,SQ))
if SQ=""
QUIT
Begin DoDot:1
+50 IF '+SQ
QUIT
+51 SET GOTONE=1
+52 ;[356.223,.01]
SET DLN=" Diagnosis Type: "_$$GET1^DIQ(356.006,+$PIECE($GET(DATA(3,SQ,0)),U,1),.02)
DO SETDLN(DLN)
+53 ;[356.223,.02]
SET DLN=" Diagnosis Code: "_$$EXTERNAL^DILFD(356.223,.02,,$PIECE($GET(DATA(3,SQ,0)),U,2))
DO SETDLN(DLN)
+54 ;[356.223,.03]
SET DLN=" Diagnosis Date: "_$$FMTE^XLFDT($PIECE($GET(DATA(3,SQ,0)),U,3))
DO SETDLN(DLN)
+55 DO SETDLN("")
End DoDot:1
+56 IF 'GOTONE
SET DLN=" No Diagnosis Information"
DO SETDLN(DLN)
DO SETDLN("")
+57 ;
+58 ; - Institutional Claim Code info -
+59 IF $PIECE($GET(DATA(7)),U,3)'=""
Begin DoDot:1
+60 SET DLN=" Institutional Claim Code"
DO SETDLN(DLN,"B")
+61 ;[356.22,7.01]
SET DLN=" Admission Type Code:"
SET DLN=DLN_$$EXTERNAL^DILFD(356.22,7.01,,$PIECE($GET(DATA(7)),U,1))
+62 ;[356.22,7.02]
SET $EXTRACT(DLN,44)=" Admission Source Code: "
SET DLN=DLN_$$GET1^DIQ(356.009,+$PIECE($GET(DATA(7)),U,1),.02)
DO SETDLN(DLN)
+63 ;[356.22,.04]
SET DLN=" Patient Status Code: "
SET DLN=DLN_$$EXTERNAL^DILFD(356.22,.04,,$PIECE($GET(DATA(0)),U,4))
DO SETDLN(DLN)
+64 DO SETDLN("")
End DoDot:1
+65 ;
+66 ; - Ambulance Transport info -
+67 SET DLN=" Ambulance Transport Information"
DO SETDLN(DLN,"B")
+68 IF $TRANSLATE($GET(DATA(18)),"^","")'=""!($PIECE($GET(DATA(4)),U,3)'="")
Begin DoDot:1
+69 ;[356.22,18.03]
SET DLN=" Ambulance Transport Code: "
SET DLN=DLN_$$EXTERNAL^DILFD(356.22,18.03,,$PIECE($GET(DATA(18)),U,3))
+70 ;[356.22,18.01]
SET $EXTRACT(DLN,44)="Unit/Basis for Measure Code: "
SET DLN=DLN_$$EXTERNAL^DILFD(356.22,18.01,,$PIECE($GET(DATA(4)),U,3))
DO SETDLN(DLN)
+71 ;[356.22,18.06]
SET DLN=" Transport Distance: "
SET DLN=DLN_$PIECE($GET(DATA(18)),U,6)
DO SETDLN(DLN)
End DoDot:1
+72 IF $TRANSLATE($GET(DATA(18)),"^","")=""
IF $PIECE($GET(DATA(4)),U,3)=""
SET DLN=" No Ambulance Transport Information"
DO SETDLN(DLN)
+73 DO SETDLN("")
+74 ; - Spinal Manipulation Service info -
+75 SET DLN=" Spinal Manipulation Service Information"
DO SETDLN(DLN,"B")
+76 IF $TRANSLATE($GET(DATA(7)),"^","")'=""
Begin DoDot:1
+77 ;[356.22,7.05]
SET DLN=" Treatment Series Number: "_$PIECE(DATA(7),U,5)
+78 ;[356.22,7.06]
SET $EXTRACT(DLN,44)="Treatment Count: "_$PIECE(DATA(7),U,6)
DO SETDLN(DLN)
+79 ;[356.22,7.07]
SET DLN=" Subluxation Level Code 1: "_$$GET1^DIQ(356.012,+$PIECE(DATA(7),U,7),.02)
DO SETDLN(DLN)
+80 ;[356.22,7.08]
SET DLN=" Subluxation Level Code 2: "_$$GET1^DIQ(356.012,+$PIECE(DATA(7),U,8),.02)
DO SETDLN(DLN)
End DoDot:1
+81 IF $TRANSLATE($GET(DATA(7)),"^","")=""
SET DLN=" No Spinal Manipulation Service Information"
DO SETDLN(DLN)
+82 DO SETDLN("")
+83 ; - Home Oxygen Therapy info -
+84 SET DLN=" Home Oxygen Therapy Information"
DO SETDLN(DLN,"B")
+85 IF $TRANSLATE($GET(DATA(8)),"^","")'=""!($TRANSLATE($GET(DATA(9)),"^","")'="")
Begin DoDot:1
+86 ;[356.22,8.01]
SET DLN=" Oxygen Equipment Type Code 1: "_$$GET1^DIQ(356.013,+$PIECE($GET(DATA(8)),U,1),.02)
DO SETDLN(DLN)
+87 ;[356.22,8.02]
SET DLN=" Oxygen Equipment Type Code 2: "_$$GET1^DIQ(356.013,+$PIECE($GET(DATA(8)),U,2),.02)
DO SETDLN(DLN)
+88 ;[356.22,8.03]
SET DLN=" Oxygen Equipment Type Code 3: "_$$GET1^DIQ(356.013,+$PIECE($GET(DATA(8)),U,3),.02)
DO SETDLN(DLN)
+89 ;[356.22,8.05]
SET DLN=" Oxygen Flow Rate: "_$PIECE($GET(DATA(8)),U,5)
+90 ;[356.22,8.06]
SET $EXTRACT(DLN,44)="Daily Oxygen Use Count: "_$PIECE($GET(DATA(8)),U,6)
DO SETDLN(DLN)
+91 ;[356.22,8.07]
SET DLN=" Oxygen Use Period Hour Count: "_$PIECE($GET(DATA(8)),U,7)
DO SETDLN(DLN)
+92 ;[356.22,8.08]
SET DLN=" Respiratory Therapist Order Text: "_$PIECE($GET(DATA(8)),U,8)
DO SETDLN(DLN)
+93 ;[356.22,9.01]
SET DLN=" Arterial Blood Gas Quantity: "_$PIECE($GET(DATA(9)),U,1)
DO SETDLN(DLN)
+94 ;[356.22,9.02]
SET DLN=" Oxygen Saturation Quantity: "_$PIECE($GET(DATA(9)),U,2)
DO SETDLN(DLN)
+95 ;[356.22,9.03]
SET DLN=" Oxygen Test Condition: "_$$GET1^DIQ(356.014,+$PIECE($GET(DATA(9)),U,3),.02)
DO SETDLN(DLN)
+96 ;[356.22,9.04]
SET DLN=" Oxygen Test Findings #1: "_$EXTRACT($$GET1^DIQ(356.015,+$PIECE($GET(DATA(9)),U,4),.02),1,50)
DO SETDLN(DLN)
+97 ;[356.22,9.05]
SET DLN=" Oxygen Test Findings #2: "_$EXTRACT($$GET1^DIQ(356.015,+$PIECE($GET(DATA(9)),U,5),.02),1,50)
DO SETDLN(DLN)
+98 ;[356.22,9.06]
SET DLN=" Oxygen Test Findings #3: "_$EXTRACT($$GET1^DIQ(356.015,+$PIECE($GET(DATA(9)),U,6),.02),1,50)
DO SETDLN(DLN)
+99 ;[356.22,9.07]
SET DLN=" Portable Oxygen System Flow Rate: "_$PIECE($GET(DATA(9)),U,7)
DO SETDLN(DLN)
+100 ;[356.22,9.08]
SET DLN=" Oxygen Delivery System Code: "_$EXTRACT($$GET1^DIQ(356.016,+$PIECE($GET(DATA(9)),U,8),.02),1,40)
DO SETDLN(DLN)
End DoDot:1
+101 IF $TRANSLATE($GET(DATA(8)),"^","")=""
IF $TRANSLATE($GET(DATA(9)),"^","")=""
SET DLN=" No Home Oxygen Therapy Information"
DO SETDLN(DLN)
+102 DO SETDLN("")
+103 ; - Home Health Care info -
+104 SET DLN=" Home Health Care Information"
DO SETDLN(DLN,"B")
+105 IF $PIECE($GET(DATA(2)),U,15)'=""!($TRANSLATE($PIECE($GET(DATA(10)),U,1,3),"^","")'="")
Begin DoDot:1
+106 ;[356.22,2.15]
SET DLN=" Prognosis Code: "_$$GET1^DIQ(356.004,+$PIECE($GET(DATA(2)),U,15),.02)
DO SETDLN(DLN)
+107 ;[356.22,10.01]
SET DLN=" Home Health Start Date: "_$$FMTE^XLFDT($PIECE($GET(DATA(10)),U,1))
DO SETDLN(DLN)
+108 SET DLN=" Home Health Certification Period: "
+109 IF $LENGTH($PIECE($GET(DATA(10)),U,2))!($LENGTH($PIECE($GET(DATA(10)),U,3)))
Begin DoDot:2
+110 ;[356.22,10.02]
SET DLN=DLN_$$FMTE^XLFDT($PIECE($GET(DATA(10)),U,2))
+111 ;[356.22,10.03]
SET DLN=DLN_" - "_$$FMTE^XLFDT($PIECE($GET(DATA(10)),U,3))
End DoDot:2
+112 DO SETDLN(DLN)
+113 ;[356.22,10.04]
SET DLN=" Medicare Coverage Indicator: "_$$EXTERNAL^DILFD(356.22,10.04,,$PIECE($GET(DATA(10)),U,4))
DO SETDLN(DLN)
+114 ;[356.22,2.02]
SET DLN=" Certification Type Code: "_$$GET1^DIQ(356.002,+$PIECE($GET(DATA(2)),U,2),.02)
DO SETDLN(DLN)
End DoDot:1
+115 IF $PIECE($GET(DATA(2)),U,15)=""
IF $TRANSLATE($PIECE($GET(DATA(10)),U,1,3),"^","")=""
SET DLN=" No Home Health Care Information"
DO SETDLN(DLN)
+116 DO SETDLN("")
+117 ; - Additional Patient info -
+118 SET DLN=" Additional Patient Information"
DO SETDLN(DLN,"B")
+119 IF $DATA(DATA(11))
Begin DoDot:1
+120 SET SQ=0
+121 FOR
SET SQ=$ORDER(DATA(11,SQ))
if SQ=""
QUIT
Begin DoDot:2
+122 ;[356.22,11.01] ptr to ^IBT(356.018)]
SET DLN=" Report Type: "_$PIECE($GET(^IBT(356.018,+$PIECE($GET(DATA(11,SQ,0)),U,1),0)),U,2)
DO SETDLN(DLN)
+123 ;[356.22,11.02]
SET DLN=" Report Transmission Code: "_$PIECE($GET(DATA(11,SQ,0)),U,2)
DO SETDLN(DLN)
+124 ;[356.22,11.03]
SET DLN=" Attachment Control #: "_$EXTRACT($PIECE($GET(DATA(11,SQ,0)),U,3),1,50)
DO SETDLN(DLN)
+125 ;[356.22,11.04]
SET DLN=" Attachment Description: "_$EXTRACT($PIECE($GET(DATA(11,SQ,0)),U,4),1,50)
DO SETDLN(DLN)
+126 DO SETDLN("")
End DoDot:2
End DoDot:1
+127 IF '$DATA(DATA(11))
SET DLN=" No Additional Patient Information"
DO SETDLN(DLN)
DO SETDLN("")
+128 ; - Message Text -
+129 SET DLN=" Message Text: "
DO SETDLN(DLN,"B")
+130 IF +$GET(DATA(12,0))
Begin DoDot:1
+131 SET SQCNT=+$GET(DATA(12,0))
+132 ;[356.22,12]
FOR SQ=1:1:SQCNT
SET DLN=" "_$GET(DATA(12,SQ))
DO SETDLN(DLN)
End DoDot:1
+133 IF '+$GET(DATA(12,0))
SET DLN=" No Message Text"
DO SETDLN(DLN)
+134 DO SETDLN("")
+135 ; - Additional Patient Information Contact Data -
+136 SET DLN=" Additional Patient Information Contact Data"
DO SETDLN(DLN,"B")
+137 SET GOTONE=0
+138 IF $DATA(DATA(13))
Begin DoDot:1
+139 SET SQ=""
FOR
SET SQ=$ORDER(DATA(13,SQ))
if SQ=""
QUIT
Begin DoDot:2
+140 IF $GET(DATA(13,SQ,4))=""
IF $GET(DATA(13,SQ,5))=""
QUIT
+141 SET GOTONE=1
+142 ;Last Name-[356.2213,4.04]
SET DLN=" Response Contact Name: "_$PIECE($GET(DATA(13,SQ,4)),U,4)
+143 ;First Name-[356.2213,4.05]
SET DLN=DLN_", "_$PIECE($GET(DATA(13,SQ,4)),U,5)
+144 ;Middle Name-[356.2213,4.06]
SET DLN=DLN_" "_$PIECE($GET(DATA(13,SQ,4)),U,6)
+145 ;Suffix-[356.2213,4.07]
SET DLN=DLN_" "_$PIECE($GET(DATA(13,SQ,4)),U,7)
DO SETDLN(DLN)
+146 ;[356.2213,4.08]
SET DLN=" Identification Code Qualifier: "_$$GET1^DIQ(365.023,+$PIECE($GET(DATA(13,SQ,4)),U,8),.02)
DO SETDLN(DLN)
+147 ;[356.2213,4.09]
SET DLN=" Response Contact Identifier: "_$PIECE($GET(DATA(13,SQ,4)),U,9)
DO SETDLN(DLN)
+148 SET DLN=" Response Contact Address:"
+149 ;[356.2213,5]
SET DLN=DLN_" "_$PIECE($GET(DATA(13,SQ,5)),U,1)
DO SETDLN(DLN)
+150 ;[356.2213,5.01]
IF $LENGTH($PIECE($GET(DATA(13,SQ,5)),U,2))
SET DLN=""
SET $EXTRACT(DLN,30)=$PIECE(DATA(13,SQ,5),U,2)
DO SETDLN(DLN)
+151 ;[356.2213,5.02]
SET DLN=""
SET $EXTRACT(DLN,30)=$PIECE($GET(DATA(13,SQ,5)),U,3)
+152 ;[356.2213,5.03]
SET DLN=DLN_", "
IF +$PIECE($GET(DATA(13,SQ,5)),U,4)
SET DLN=DLN_$$GET1^DIQ(5,$PIECE(^DIC(5,+$PIECE($GET(DATA(13,SQ,5)),U,4),0),U,2)_",",1)
+153 ;[356.2213,5.04]
SET DLN=DLN_" "_$PIECE($GET(DATA(13,SQ,5)),U,5)
DO SETDLN(DLN)
+154 ;[356.2213,5.05]
IF +$PIECE($GET(DATA(13,SQ,5)),U,6)
SET DLN=""
SET $EXTRACT(DLN,30)=$$GET1^DIQ(779.004,$PIECE($GET(DATA(13,SQ,5)),U,6),.01)
+155 ;[356.2213,5.06]
SET DLN=DLN_" "_$PIECE($GET(DATA(13,SQ,5)),U,7)
DO SETDLN(DLN)
+156 DO SETDLN("")
+157 ;[356.2213,.06]
SET DLN=" Response Contact Name: "_$PIECE($GET(DATA(13,SQ,0)),U,6)
DO SETDLN(DLN)
+158 SET DLN=" Response Contact #: "
+159 ;[356.2213,1]
IF $PIECE($GET(DATA(13,SQ,0)),U,7)'=""!($LENGTH($GET(DATA(13,SQ,1))))
Begin DoDot:3
+160 SET DLN=DLN_$$EXTERNAL^DILFD(356.2213,.07,,+$PIECE($GET(DATA(13,SQ,0)),U,7))
+161 SET DLN=DLN_": "_$GET(DATA(13,SQ,1))
DO SETDLN(DLN)
End DoDot:3
+162 ;[356.2213,2-3]
FOR X=2,3
IF $LENGTH($GET(DATA(13,SQ,X)))
Begin DoDot:3
+163 SET DLN=""
SET $EXTRACT(DLN,19)=$$EXTERNAL^DILFD(356.2213,(.06+(X*.01)),,+$PIECE($GET(DATA(13,SQ,0)),U,(6+X)))
+164 SET DLN=DLN_": "_$GET(DATA(13,SQ,X))
DO SETDLN(DLN)
End DoDot:3
+165 DO SETDLN("")
End DoDot:2
End DoDot:1
+166 IF '+GOTONE
SET DLN=" No Additional Patient Information Contact"
DO SETDLN(DLN)
DO SETDLN("")
+167 ; - Pat Event Prov Info (repeats up to 14 times)-[356.2213]
+168 SET DLN=" Patient Event Provider Information"
DO SETDLN(DLN,"B")
+169 SET GOTONE=0
+170 IF $DATA(DATA(13))
Begin DoDot:1
+171 SET SQ=""
FOR
SET SQ=$ORDER(DATA(13,SQ))
if SQ=""
QUIT
Begin DoDot:2
+172 IF $GET(DATA(13,SQ,0))=""
QUIT
+173 SET GOTONE=1
SET TAXNMY=""
+174 ;[356.2213,.01]
SET DLN=" Entity Provider Code: "_$$GET1^DIQ(365.022,+$PIECE($GET(DATA(13,SQ,0)),U,1),.02)
DO SETDLN(DLN)
+175 SET PRVPTR=$PIECE($GET(DATA(13,SQ,0)),U,3)
+176 SET PRVDATA=$$PRVDATA^IBTRHLO2(+$PIECE(PRVPTR,";"),$PIECE($PIECE(PRVPTR,"(",2),","))
+177 ; PRVDATA = name ^ line 1 ^ line 2 ^ city ^ state ^ zip ^ NPI
+178 ;[356.2213,.03] ptr to Provider File ^VA(200), ^IBA(355.93) or ^DIC(4)]
SET DLN=" Provider ID: "_$PIECE(PRVDATA,U,7)
+179 ; Get the Taxonomy Code and Person Class Description.
SET TAXNMY=$$GTXNMY^IBTRH3(PRVPTR)
+180 ; Taxonomy code.
SET $EXTRACT(DLN,44)="Provider Taxonomy: "_$PIECE(TAXNMY,U,1)
DO SETDLN(DLN)
+181 ; Person Class Description.
SET DLN=" Person Class: "_$PIECE(TAXNMY,U,2)
+182 ;[^VA(200,.01), ^IBA(355.93,.01), or ^DIC(4,.01)]
SET DLN=" Provider Name: "_$PIECE(PRVDATA,U,1)
DO SETDLN(DLN)
+183 ;[^IBA(355.93,.05) or ^VA(200,.111)]
SET DLN=" Provider Address: "_$PIECE(PRVDATA,U,2)
DO SETDLN(DLN)
+184 ;[^IBA(355.93,.06) or ^VA(200,.112)]
IF $LENGTH($PIECE(PRVDATA,U,3))
SET DLN=""
SET $EXTRACT(DLN,22)=$PIECE(PRVDATA,U,3)
DO SETDLN(DLN)
+185 ;[^IBA(355.93,.07-.09) or ^VA(200,.113-.115)]
SET DLN=""
SET $EXTRACT(DLN,22)=$PIECE(PRVDATA,U,4)_$SELECT($PIECE(PRVDATA,U,4)'="":", ",1:"")_$$GET1^DIQ(5,$PIECE(PRVDATA,U,5)_",",1)_" "_$PIECE(PRVDATA,U,6)
DO SETDLN(DLN)
+186 DO SETDLN("")
End DoDot:2
End DoDot:1
+187 IF '+GOTONE
SET DLN=" No Patient Event Provider Information"
DO SETDLN(DLN)
DO SETDLN("")
+188 SET DLN=" Patient Event Transport Information"
DO SETDLN(DLN,"B")
+189 SET GOTONE=0
+190 IF $DATA(DATA(14))
Begin DoDot:1
+191 SET SQ=""
FOR
SET SQ=$ORDER(DATA(14,SQ))
if SQ=""
QUIT
Begin DoDot:2
+192 IF $GET(DATA(14,SQ,0))=""
QUIT
+193 SET GOTONE=1
+194 ;[356.2214,.01]
SET DLN=" Entity Identifier Code: "_$PIECE($GET(DATA(14,SQ,0)),U,1)
DO SETDLN(DLN)
+195 ;[356.2214,.02]
SET DLN=" Transport Location Name: "_$PIECE($GET(DATA(14,SQ,0)),U,2)
DO SETDLN(DLN)
+196 ;[356.2214,.03]
SET DLN=" Transport Location Address: "_$PIECE($GET(DATA(14,SQ,0)),U,3)
DO SETDLN(DLN)
+197 ;[356.2214,.04]
IF $LENGTH($PIECE($GET(DATA(14,SQ,0)),U,4))
SET DLN=""
SET $EXTRACT(DLN,33)=$PIECE(DATA(14,SQ,0),U,4)
DO SETDLN(DLN)
+198 ;[356.2214,.05]
SET DLN=""
SET $EXTRACT(DLN,33)=$PIECE($GET(DATA(14,SQ,0)),U,5)
+199 ;[356.2214,5.03]
SET DLN=DLN_", "
IF +$PIECE($GET(DATA(14,SQ,0)),U,6)
SET DLN=DLN_$$GET1^DIQ(5,$PIECE(^DIC(5,+$PIECE($GET(DATA(14,SQ,0)),U,6),0),U,2)_",",1)
+200 ;[356.2214,.07]
SET DLN=DLN_" "_$PIECE($GET(DATA(14,SQ,0)),U,7)
DO SETDLN(DLN)
+201 DO SETDLN("")
End DoDot:2
End DoDot:1
+202 IF '+GOTONE
SET DLN=" No Patient Event Transport Information"
DO SETDLN(DLN)
DO SETDLN("")
+203 QUIT
+204 ;
SETDLN(DLN,SPEC) ; Add Display Line to ^TMP global.
+1 SET VALMCNT=VALMCNT+1
+2 SET ^TMP(IBTRNM,$JOB,VALMCNT,0)=DLN
+3 IF $GET(SPEC)="B"
DO CNTRL^VALM10(VALMCNT,1,80,IOINHI,IOINORM)
+4 QUIT
+5 ;