IBINI05D ; ; 21-MAR-1994
;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
Q:'DIFQ(356) F I=1:2 S X=$T(Q+I) Q:X="" S Y=$E($T(Q+I+1),4,999),X=$E(X,4,999) S:$A(Y)=126 I=I+1,Y=$E(Y,2,999)_$E($T(Q+I+1),5,99) S:$A(Y)=61 Y=$E(Y,2,999) X NO E S @X=Y
Q Q
;;^DD(356,.02,21,5,0)
;;=
;;^DD(356,.02,"DT")
;;=2930831
;;^DD(356,.03,0)
;;=VISIT^P9000010'^AUPNVSIT(^0;3^Q
;;^DD(356,.03,1,0)
;;=^.1
;;^DD(356,.03,1,1,0)
;;=356^AVSIT
;;^DD(356,.03,1,1,1)
;;=S ^IBT(356,"AVSIT",$E(X,1,30),DA)=""
;;^DD(356,.03,1,1,2)
;;=K ^IBT(356,"AVSIT",$E(X,1,30),DA)
;;^DD(356,.03,1,1,"%D",0)
;;=^^1^1^2930712^
;;^DD(356,.03,1,1,"%D",1,0)
;;=Regular cross-reference of claim by visit.
;;^DD(356,.03,1,1,"DT")
;;=2930712
;;^DD(356,.03,3)
;;=
;;^DD(356,.03,21,0)
;;=^^4^4^2930709^
;;^DD(356,.03,21,1,0)
;;=This is the visit for the patient that is being tracked in this entry.
;;^DD(356,.03,21,2,0)
;;=
;;^DD(356,.03,21,3,0)
;;=This field is a place holder for when visit tracking is implemented. It
;;^DD(356,.03,21,4,0)
;;=will point to the visit that is being tracked.
;;^DD(356,.03,"DT")
;;=2930712
;;^DD(356,.04,0)
;;=OUTPATIENT ENCOUNTER^P409.68'^SCE(^0;4^Q
;;^DD(356,.04,1,0)
;;=^.1
;;^DD(356,.04,1,1,0)
;;=356^ASCE
;;^DD(356,.04,1,1,1)
;;=S ^IBT(356,"ASCE",$E(X,1,30),DA)=""
;;^DD(356,.04,1,1,2)
;;=K ^IBT(356,"ASCE",$E(X,1,30),DA)
;;^DD(356,.04,1,1,"%D",0)
;;=^^1^1^2930712^
;;^DD(356,.04,1,1,"%D",1,0)
;;=Regular cross-reference of claims by outpatient encounters.
;;^DD(356,.04,1,1,"DT")
;;=2930712
;;^DD(356,.04,1,2,0)
;;=356^AENC^MUMPS
;;^DD(356,.04,1,2,1)
;;=S:$P(^IBT(356,DA,0),U,2) ^IBT(356,"AENC",+$P(^(0),U,2),X,DA)=""
;;^DD(356,.04,1,2,2)
;;=K ^IBT(356,"AENC",+$P(^IBT(356,DA,0),U,2),X,DA)
;;^DD(356,.04,1,2,"%D",0)
;;=^^1^1^2930831^
;;^DD(356,.04,1,2,"%D",1,0)
;;=Cross reference of outpatient encounters by patient.
;;^DD(356,.04,1,2,"DT")
;;=2930831
;;^DD(356,.04,21,0)
;;=^^3^3^2930709^
;;^DD(356,.04,21,1,0)
;;=This is the outpatient encounter that is being tracked. If this is
;;^DD(356,.04,21,2,0)
;;=entered and the provider and/or diagnosis for the encounter are entered
;;^DD(356,.04,21,3,0)
;;=then the inforamation will be extracted from the encounter file.
;;^DD(356,.04,"DT")
;;=2930831
;;^DD(356,.05,0)
;;=ADMISSION^*P405'^DGPM(^0;5^S DIC("S")="I $P(^(0),U,2)=1" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
;;^DD(356,.05,1,0)
;;=^.1
;;^DD(356,.05,1,1,0)
;;=356^ADM^MUMPS
;;^DD(356,.05,1,1,1)
;;=S:$P(^IBT(356,DA,0),"^",2) ^IBT(356,"ADM",+$P(^(0),"^",2),X,DA)=""
;;^DD(356,.05,1,1,2)
;;=K ^IBT(356,"ADM",+$P(^IBT(356,DA,0),"^",2),X,DA)
;;^DD(356,.05,1,1,"%D",0)
;;=^^1^1^2940121^^^
;;^DD(356,.05,1,1,"%D",1,0)
;;=Cross reference of all admissions by patient.
;;^DD(356,.05,1,1,"DT")
;;=2930702
;;^DD(356,.05,1,2,0)
;;=356^AD
;;^DD(356,.05,1,2,1)
;;=S ^IBT(356,"AD",$E(X,1,30),DA)=""
;;^DD(356,.05,1,2,2)
;;=K ^IBT(356,"AD",$E(X,1,30),DA)
;;^DD(356,.05,1,2,"%D",0)
;;=^^1^1^2940121^^
;;^DD(356,.05,1,2,"%D",1,0)
;;=Regular x-ref of admission movement ifn
;;^DD(356,.05,1,2,"DT")
;;=2930804
;;^DD(356,.05,3)
;;=
;;^DD(356,.05,12)
;;=Only admissions for this patient.
;;^DD(356,.05,12.1)
;;=S DIC("S")="I $P(^(0),U,2)=1"
;;^DD(356,.05,21,0)
;;=^^4^4^2930709^
;;^DD(356,.05,21,1,0)
;;=This is the admission that is being tracked. When an entry is added for
;;^DD(356,.05,21,2,0)
;;=inpatient care for any date the software will find the current admission
;;^DD(356,.05,21,3,0)
;;=for that date and use the current admission from the patient movement
;;^DD(356,.05,21,4,0)
;;=file.
;;^DD(356,.05,"DT")
;;=2931018
;;^DD(356,.06,0)
;;=EPISODE DATE^D^^0;6^S %DT="ESTX" D ^%DT S X=Y K:Y<1 X
;;^DD(356,.06,1,0)
;;=^.1^^-1
;;^DD(356,.06,1,1,0)
;;=356^D
;;^DD(356,.06,1,1,1)
;;=S ^IBT(356,"D",$E(X,1,30),DA)=""
IBINI05D ; ; 21-MAR-1994
+1 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
+2 IF 'DIFQ(356)
QUIT
FOR I=1:2
SET X=$TEXT(Q+I)
IF X=""
QUIT
SET Y=$EXTRACT($TEXT(Q+I+1),4,999)
SET X=$EXTRACT(X,4,999)
IF $ASCII(Y)=126
SET I=I+1
SET Y=$EXTRACT(Y,2,999)_$EXTRACT($TEXT(Q+I+1),5,99)
IF $ASCII(Y)=61
SET Y=$EXTRACT(Y,2,999)
XECUTE NO
IF '$TEST
SET @X=Y
Q QUIT
+1 ;;^DD(356,.02,21,5,0)
+2 ;;=
+3 ;;^DD(356,.02,"DT")
+4 ;;=2930831
+5 ;;^DD(356,.03,0)
+6 ;;=VISIT^P9000010'^AUPNVSIT(^0;3^Q
+7 ;;^DD(356,.03,1,0)
+8 ;;=^.1
+9 ;;^DD(356,.03,1,1,0)
+10 ;;=356^AVSIT
+11 ;;^DD(356,.03,1,1,1)
+12 ;;=S ^IBT(356,"AVSIT",$E(X,1,30),DA)=""
+13 ;;^DD(356,.03,1,1,2)
+14 ;;=K ^IBT(356,"AVSIT",$E(X,1,30),DA)
+15 ;;^DD(356,.03,1,1,"%D",0)
+16 ;;=^^1^1^2930712^
+17 ;;^DD(356,.03,1,1,"%D",1,0)
+18 ;;=Regular cross-reference of claim by visit.
+19 ;;^DD(356,.03,1,1,"DT")
+20 ;;=2930712
+21 ;;^DD(356,.03,3)
+22 ;;=
+23 ;;^DD(356,.03,21,0)
+24 ;;=^^4^4^2930709^
+25 ;;^DD(356,.03,21,1,0)
+26 ;;=This is the visit for the patient that is being tracked in this entry.
+27 ;;^DD(356,.03,21,2,0)
+28 ;;=
+29 ;;^DD(356,.03,21,3,0)
+30 ;;=This field is a place holder for when visit tracking is implemented. It
+31 ;;^DD(356,.03,21,4,0)
+32 ;;=will point to the visit that is being tracked.
+33 ;;^DD(356,.03,"DT")
+34 ;;=2930712
+35 ;;^DD(356,.04,0)
+36 ;;=OUTPATIENT ENCOUNTER^P409.68'^SCE(^0;4^Q
+37 ;;^DD(356,.04,1,0)
+38 ;;=^.1
+39 ;;^DD(356,.04,1,1,0)
+40 ;;=356^ASCE
+41 ;;^DD(356,.04,1,1,1)
+42 ;;=S ^IBT(356,"ASCE",$E(X,1,30),DA)=""
+43 ;;^DD(356,.04,1,1,2)
+44 ;;=K ^IBT(356,"ASCE",$E(X,1,30),DA)
+45 ;;^DD(356,.04,1,1,"%D",0)
+46 ;;=^^1^1^2930712^
+47 ;;^DD(356,.04,1,1,"%D",1,0)
+48 ;;=Regular cross-reference of claims by outpatient encounters.
+49 ;;^DD(356,.04,1,1,"DT")
+50 ;;=2930712
+51 ;;^DD(356,.04,1,2,0)
+52 ;;=356^AENC^MUMPS
+53 ;;^DD(356,.04,1,2,1)
+54 ;;=S:$P(^IBT(356,DA,0),U,2) ^IBT(356,"AENC",+$P(^(0),U,2),X,DA)=""
+55 ;;^DD(356,.04,1,2,2)
+56 ;;=K ^IBT(356,"AENC",+$P(^IBT(356,DA,0),U,2),X,DA)
+57 ;;^DD(356,.04,1,2,"%D",0)
+58 ;;=^^1^1^2930831^
+59 ;;^DD(356,.04,1,2,"%D",1,0)
+60 ;;=Cross reference of outpatient encounters by patient.
+61 ;;^DD(356,.04,1,2,"DT")
+62 ;;=2930831
+63 ;;^DD(356,.04,21,0)
+64 ;;=^^3^3^2930709^
+65 ;;^DD(356,.04,21,1,0)
+66 ;;=This is the outpatient encounter that is being tracked. If this is
+67 ;;^DD(356,.04,21,2,0)
+68 ;;=entered and the provider and/or diagnosis for the encounter are entered
+69 ;;^DD(356,.04,21,3,0)
+70 ;;=then the inforamation will be extracted from the encounter file.
+71 ;;^DD(356,.04,"DT")
+72 ;;=2930831
+73 ;;^DD(356,.05,0)
+74 ;;=ADMISSION^*P405'^DGPM(^0;5^S DIC("S")="I $P(^(0),U,2)=1" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
+75 ;;^DD(356,.05,1,0)
+76 ;;=^.1
+77 ;;^DD(356,.05,1,1,0)
+78 ;;=356^ADM^MUMPS
+79 ;;^DD(356,.05,1,1,1)
+80 ;;=S:$P(^IBT(356,DA,0),"^",2) ^IBT(356,"ADM",+$P(^(0),"^",2),X,DA)=""
+81 ;;^DD(356,.05,1,1,2)
+82 ;;=K ^IBT(356,"ADM",+$P(^IBT(356,DA,0),"^",2),X,DA)
+83 ;;^DD(356,.05,1,1,"%D",0)
+84 ;;=^^1^1^2940121^^^
+85 ;;^DD(356,.05,1,1,"%D",1,0)
+86 ;;=Cross reference of all admissions by patient.
+87 ;;^DD(356,.05,1,1,"DT")
+88 ;;=2930702
+89 ;;^DD(356,.05,1,2,0)
+90 ;;=356^AD
+91 ;;^DD(356,.05,1,2,1)
+92 ;;=S ^IBT(356,"AD",$E(X,1,30),DA)=""
+93 ;;^DD(356,.05,1,2,2)
+94 ;;=K ^IBT(356,"AD",$E(X,1,30),DA)
+95 ;;^DD(356,.05,1,2,"%D",0)
+96 ;;=^^1^1^2940121^^
+97 ;;^DD(356,.05,1,2,"%D",1,0)
+98 ;;=Regular x-ref of admission movement ifn
+99 ;;^DD(356,.05,1,2,"DT")
+100 ;;=2930804
+101 ;;^DD(356,.05,3)
+102 ;;=
+103 ;;^DD(356,.05,12)
+104 ;;=Only admissions for this patient.
+105 ;;^DD(356,.05,12.1)
+106 ;;=S DIC("S")="I $P(^(0),U,2)=1"
+107 ;;^DD(356,.05,21,0)
+108 ;;=^^4^4^2930709^
+109 ;;^DD(356,.05,21,1,0)
+110 ;;=This is the admission that is being tracked. When an entry is added for
+111 ;;^DD(356,.05,21,2,0)
+112 ;;=inpatient care for any date the software will find the current admission
+113 ;;^DD(356,.05,21,3,0)
+114 ;;=for that date and use the current admission from the patient movement
+115 ;;^DD(356,.05,21,4,0)
+116 ;;=file.
+117 ;;^DD(356,.05,"DT")
+118 ;;=2931018
+119 ;;^DD(356,.06,0)
+120 ;;=EPISODE DATE^D^^0;6^S %DT="ESTX" D ^%DT S X=Y K:Y<1 X
+121 ;;^DD(356,.06,1,0)
+122 ;;=^.1^^-1
+123 ;;^DD(356,.06,1,1,0)
+124 ;;=356^D
+125 ;;^DD(356,.06,1,1,1)
+126 ;;=S ^IBT(356,"D",$E(X,1,30),DA)=""