- ABMECS2 ; IHS/ASDST/DMJ - ELECTRONIC CLAIMS SUBMISSION ;
- ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
- ;Original;DMJ;01/02/96 4:18 PM
- ;
- ; IHS/ASDS/DMJ - 03/01/01 - V2.4 P5 - NOIS HQW-0301-100010
- ; Modified to accommodate new Envoy electronic format
- ;
- ; This routine is called from the EMC Create a Batch Menu option.
- ; It will show you a summary of bills ready to export grouped by
- ; bill type and export type. The user is asked to select one
- ; group. An entry is then made in 3P TX STATUS file and a file
- ; is created in unix as specified by the user.
- ;
- START ;
- K ABME,ABMER
- ; Display summary of bills ready to export and ask user to select
- ; one group. The ABMER array and ABMSEQ are undefined going into
- ; EMCREAT^ABMECDSP but are needed upon return.
- D EMCREAT^ABMECDSP(.ABMER,.ABMSEQ)
- Q:'+ABMSEQ ; Quit if no group selected.
- S DIR(0)="Y"
- S DIR("A")="Proceed"
- S DIR("B")="YES"
- D ^DIR
- K DIR
- I Y'=1 K ABME Q
- D FILE ; Make entry in 3P TX STATUS and create a file
- S DIR(0)="E"
- D ^DIR
- K DIR
- K ABMER,ABMP,ABMSEQ
- Q
- ;
- FILE ;
- ; File bills to 3P TX STATUS FILE
- S ABMINS("IEN")=$P(ABMER(ABMSEQ),U) ; Active Insurer IEN
- S ABMITYP=$P(^AUTNINS(ABMINS("IEN"),2),U) ; Insurance type
- S ABMBTYPE=$P(ABMER(ABMSEQ),U,2) ; Bill type
- ; Loop through locations in TMP global created by EMCREAT^ABMECDSP
- S ABMLOC=""
- F S ABMLOC=$O(^TMP($J,"D",ABMINS("IEN"),ABMLOC)) Q:ABMLOC="" D
- .Q:$D(^TMP($J,"D",ABMINS("IEN"),ABMLOC,ABMBTYPE))<2
- .D NEWB ; Create a new batch in 3P TX STATUS
- .I $G(Y)<0 D MSG^ABMERUTL("Could not enter batch in 3P TX STATUS file.") Q
- .; Add bill to detail in 3P TX STATUS for this batch
- .S ^ABMDTXST(DUZ(2),DA(1),2,0)="^9002274.61P^^"
- .S DIC="^ABMDTXST(DUZ(2),DA(1),2,"
- .S DIC(0)="LXNE"
- .S ABMDA=0
- .F S ABMDA=$O(^TMP($J,"D",ABMINS("IEN"),ABMLOC,ABMBTYPE,ABMEXP,ABMDA)) Q:'+ABMDA D
- ..S X=ABMDA
- ..K DD,DO D FILE^DICN
- ..Q:+Y<0
- ..S ABMAPRV=$O(^ABMDBILL(DUZ(2),ABMDA,41,"C","A",0))
- ..Q:'ABMAPRV
- ..S ABMAPRV=$P(^ABMDBILL(DUZ(2),ABMDA,41,ABMAPRV,0),U)
- ..S DA=+Y
- ..S DIE=DIC
- ..S DR=".02///`"_ABMAPRV
- ..D ^DIE
- .; Write record (Create EMC unix file)
- .D @("^ABMEF"_$P(ABMER(ABMSEQ),U,3))
- Q
- ;
- NEWB ;
- ; Create a new batch (Make entry in 3P TX STATUS)
- H 1
- D NOW^%DTC
- S X=%
- S DIC="^ABMDTXST(DUZ(2),"
- S DIC(0)="LX"
- D ^DIC
- Q:Y<0
- S ABMP("XMIT")=+Y
- S DIE=DIC
- S DA=+Y
- S DR=".02///"_$P(ABMER(ABMSEQ),U,3)_";.04///`"_ABMINS("IEN")_";.03///"_ABMITYP_";.05////"_DUZ_";.09///"_$P(ABMER(ABMSEQ),U,4)_";.11///"_$J($P(ABMER(ABMSEQ),U,5),1,2)
- D ^DIE
- S DA(1)=DA
- W !,"ENTRY CREATED IN 3P TX STATUS FILE."
- W !,"LOCATION: ",ABMLOC
- W !,"BILL TYPE: ",ABMBTYPE,!
- Q
- ABMECS2 ; IHS/ASDST/DMJ - ELECTRONIC CLAIMS SUBMISSION ;
- +1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
- +2 ;Original;DMJ;01/02/96 4:18 PM
- +3 ;
- +4 ; IHS/ASDS/DMJ - 03/01/01 - V2.4 P5 - NOIS HQW-0301-100010
- +5 ; Modified to accommodate new Envoy electronic format
- +6 ;
- +7 ; This routine is called from the EMC Create a Batch Menu option.
- +8 ; It will show you a summary of bills ready to export grouped by
- +9 ; bill type and export type. The user is asked to select one
- +10 ; group. An entry is then made in 3P TX STATUS file and a file
- +11 ; is created in unix as specified by the user.
- +12 ;
- START ;
- +1 KILL ABME,ABMER
- +2 ; Display summary of bills ready to export and ask user to select
- +3 ; one group. The ABMER array and ABMSEQ are undefined going into
- +4 ; EMCREAT^ABMECDSP but are needed upon return.
- +5 DO EMCREAT^ABMECDSP(.ABMER,.ABMSEQ)
- +6 ; Quit if no group selected.
- IF '+ABMSEQ
- QUIT
- +7 SET DIR(0)="Y"
- +8 SET DIR("A")="Proceed"
- +9 SET DIR("B")="YES"
- +10 DO ^DIR
- +11 KILL DIR
- +12 IF Y'=1
- KILL ABME
- QUIT
- +13 ; Make entry in 3P TX STATUS and create a file
- DO FILE
- +14 SET DIR(0)="E"
- +15 DO ^DIR
- +16 KILL DIR
- +17 KILL ABMER,ABMP,ABMSEQ
- +18 QUIT
- +19 ;
- FILE ;
- +1 ; File bills to 3P TX STATUS FILE
- +2 ; Active Insurer IEN
- SET ABMINS("IEN")=$PIECE(ABMER(ABMSEQ),U)
- +3 ; Insurance type
- SET ABMITYP=$PIECE(^AUTNINS(ABMINS("IEN"),2),U)
- +4 ; Bill type
- SET ABMBTYPE=$PIECE(ABMER(ABMSEQ),U,2)
- +5 ; Loop through locations in TMP global created by EMCREAT^ABMECDSP
- +6 SET ABMLOC=""
- +7 FOR
- SET ABMLOC=$ORDER(^TMP($JOB,"D",ABMINS("IEN"),ABMLOC))
- IF ABMLOC=""
- QUIT
- Begin DoDot:1
- +8 IF $DATA(^TMP($JOB,"D",ABMINS("IEN"),ABMLOC,ABMBTYPE))<2
- QUIT
- +9 ; Create a new batch in 3P TX STATUS
- DO NEWB
- +10 IF $GET(Y)<0
- DO MSG^ABMERUTL("Could not enter batch in 3P TX STATUS file.")
- QUIT
- +11 ; Add bill to detail in 3P TX STATUS for this batch
- +12 SET ^ABMDTXST(DUZ(2),DA(1),2,0)="^9002274.61P^^"
- +13 SET DIC="^ABMDTXST(DUZ(2),DA(1),2,"
- +14 SET DIC(0)="LXNE"
- +15 SET ABMDA=0
- +16 FOR
- SET ABMDA=$ORDER(^TMP($JOB,"D",ABMINS("IEN"),ABMLOC,ABMBTYPE,ABMEXP,ABMDA))
- IF '+ABMDA
- QUIT
- Begin DoDot:2
- +17 SET X=ABMDA
- +18 KILL DD,DO
- DO FILE^DICN
- +19 IF +Y<0
- QUIT
- +20 SET ABMAPRV=$ORDER(^ABMDBILL(DUZ(2),ABMDA,41,"C","A",0))
- +21 IF 'ABMAPRV
- QUIT
- +22 SET ABMAPRV=$PIECE(^ABMDBILL(DUZ(2),ABMDA,41,ABMAPRV,0),U)
- +23 SET DA=+Y
- +24 SET DIE=DIC
- +25 SET DR=".02///`"_ABMAPRV
- +26 DO ^DIE
- End DoDot:2
- +27 ; Write record (Create EMC unix file)
- +28 DO @("^ABMEF"_$PIECE(ABMER(ABMSEQ),U,3))
- End DoDot:1
- +29 QUIT
- +30 ;
- NEWB ;
- +1 ; Create a new batch (Make entry in 3P TX STATUS)
- +2 HANG 1
- +3 DO NOW^%DTC
- +4 SET X=%
- +5 SET DIC="^ABMDTXST(DUZ(2),"
- +6 SET DIC(0)="LX"
- +7 DO ^DIC
- +8 IF Y<0
- QUIT
- +9 SET ABMP("XMIT")=+Y
- +10 SET DIE=DIC
- +11 SET DA=+Y
- +12 SET DR=".02///"_$PIECE(ABMER(ABMSEQ),U,3)_";.04///`"_ABMINS("IEN")_";.03///"_ABMITYP_";.05////"_DUZ_";.09///"_$PIECE(ABMER(ABMSEQ),U,4)_";.11///"_$JUSTIFY($PIECE(ABMER(ABMSEQ),U,5),1,2)
- +13 DO ^DIE
- +14 SET DA(1)=DA
- +15 WRITE !,"ENTRY CREATED IN 3P TX STATUS FILE."
- +16 WRITE !,"LOCATION: ",ABMLOC
- +17 WRITE !,"BILL TYPE: ",ABMBTYPE,!
- +18 QUIT