feat(sp10): 277CA parser + Payer-Rejected Inbox lane
- Add cyclone.parsers.models_277ca + parse_277ca (X12 005010X214)
- Per-Patient HL ClaimStatus with REF*1K (PCN), REF*EJ (tax ID),
STC category code, amount, service date
- STC classifier: A1-A3 accepted, A4/A6/A7 rejected, A8/A9 pended,
P1-P5 paid, anything else unknown
- Multiple STCs per Patient HL: last wins (canonical pattern for
'first pended, then paid' acknowledgments)
- Subscriber-level STCs surface in unscoped_statuses
- Add apply_277ca_rejections — stamps Claim.payer_rejected_* fields on
matching rows (lookup by patient_control_number, mirrors 999 path)
- New /api/parse-277ca, /api/277ca-acks, /api/277ca-acks/{id} endpoints
- New two77ca_acks table + Two77caAck ORM model
- New Claim columns: payer_rejected_at, _reason, _status_code, _by_277ca_id
- New payer_rejected lane in /api/inbox/lanes (distinct from 999
envelope rejected lane)
- New PayerConfig277CA block in config/payers.yaml + Pydantic model
- Migration 0008 bumps user_version to 8
Tests: 654 -> 688 (parser 22 + apply 6 + API 8 + config 6 + adjustments).
All 688 backend tests pass; 1 pre-existing skipped test class unaffected.
This commit is contained in:
+42
@@ -0,0 +1,42 @@
|
||||
ISA*00* *00* *ZZ*COMEDICAID *ZZ*DZINESCO *240620*1200*^*00501*000000123*0*P*:~
|
||||
GS*HN*COMEDICAID*DZINESCO*20240620*1200*1*X*005010X214~
|
||||
ST*277CA*0001*005010X214~
|
||||
BHT*0085*08*REFNUM001*20240620*1200*TH~
|
||||
HL*1**20*1~
|
||||
NM1*PR*2*COLORADO MEDICAL ASSIST*****PI*COMEDICAID~
|
||||
TRN*2*REFNUM001~
|
||||
DTP*050*RD8*20240601-20240630~
|
||||
DTP*009*RD8*20240601-20240630~
|
||||
HL*2*1*21*1~
|
||||
NM1*41*2*DZINESCO*****46*11525703~
|
||||
TRN*2*REFNUM001~
|
||||
HL*3*2*19*1~
|
||||
NM1*IL*1*DOE*JOHN****MI*MEMBERID001~
|
||||
TRN*2*TRACE001~
|
||||
HL*4*3*PT~
|
||||
NM1*QC*1*DOE*JANE~
|
||||
REF*1K*CLAIM001~
|
||||
REF*EJ*721587149~
|
||||
STC*A3:19:PR*20240620*WQ*100.00~
|
||||
QTY*90*1~
|
||||
AMT*YU*100.00~
|
||||
DTP*472*RD8*20240615-20240615~
|
||||
HL*5*3*PT~
|
||||
NM1*QC*1*SMITH*ROBERT~
|
||||
REF*1K*CLAIM002~
|
||||
REF*EJ*721587149~
|
||||
STC*A6:19:PR*20240620*U*250.00~
|
||||
QTY*90*1~
|
||||
AMT*YU*250.00~
|
||||
DTP*472*D8*20240610~
|
||||
HL*6*3*PT~
|
||||
NM1*QC*1*GARCIA*MARIA~
|
||||
REF*1K*CLAIM003~
|
||||
REF*EJ*721587149~
|
||||
STC*A8:19:PR*20240620*U*175.50~
|
||||
QTY*90*1~
|
||||
AMT*YU*175.50~
|
||||
DTP*472*RD8*20240612-20240612~
|
||||
SE*40*0001~
|
||||
GE*1*1~
|
||||
IEA*1*000000123~
|
||||
@@ -0,0 +1,14 @@
|
||||
ISA*00* *00* *ZZ*COMEDICAID *ZZ*DZINESCO *240620*1200*^*00501*000000789*0*P*:~
|
||||
GS*HN*COMEDICAID*DZINESCO*20240620*1200*3*X*005010X214~
|
||||
ST*277CA*0001*005010X214~
|
||||
BHT*0085*08*REFNUM003*20240620*1200*TH~
|
||||
HL*1**20*1~
|
||||
HL*2*1*21*1~
|
||||
HL*3*2*19*1~
|
||||
HL*4*3*PT~
|
||||
REF*1K*CLAIM099~
|
||||
REF*EJ*721587149~
|
||||
STC*A7:19:PR*20240620*U*99.99~
|
||||
SE*8*0001~
|
||||
GE*1*1~
|
||||
IEA*1*000000789~
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
ISA*00* *00* *ZZ*COMEDICAID *ZZ*DZINESCO *240620*1200*^*00501*000000456*0*P*:~
|
||||
GS*HN*COMEDICAID*DZINESCO*20240620*1200*2*X*005010X214~
|
||||
ST*277*0001*005010X214~
|
||||
BHT*0085*08*REFNUM002*20240620*1200*TH~
|
||||
HL*1**20*1~
|
||||
NM1*PR*2*COLORADO MEDICAL ASSIST*****PI*COMEDICAID~
|
||||
HL*2*1*21*1~
|
||||
HL*3*2*19*1~
|
||||
HL*4*3*PT~
|
||||
REF*1K*CLAIM004~
|
||||
REF*EJ*721587149~
|
||||
STC*A3:19:PR*20240620*WQ*300.00~
|
||||
SE*10*0001~
|
||||
GE*1*1~
|
||||
IEA*1*000000456~
|
||||
Reference in New Issue
Block a user