Skip to content

Commit

Permalink
feat: support worker's comp electronic claims (openemr#7207)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenwaite authored Feb 7, 2024
1 parent a7b6377 commit 7427945
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions src/Billing/X125010837P.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace OpenEMR\Billing;

use OpenEMR\Billing\BillingProcessor\BillingClaimBatchControlNumber;
use OpenEMR\Billing\Claim;

class X125010837P
Expand Down Expand Up @@ -678,8 +679,11 @@ public static function genX12837P(
"*" . "Y" .
"*" . ($claim->billingFacilityAssignment() ? 'A' : 'C') .
"*" . ($claim->billingFacilityAssignment() ? 'Y' : 'N') .
"*" . "Y" .
"~\n";
"*" . "Y" . "*" . "P"; // added patient signature source code CLM10
if ($claim->isRelatedEmployment()) {
$out .= "*" . "EM";
}
$out .= "~\n";

// above is for historical use of encounter onset date, now in misc_billing_options
// Segment DTP*431 (Onset of Current Symptoms or Illness)
Expand Down Expand Up @@ -764,9 +768,25 @@ public static function genX12837P(
// Segments DTP (Assumed and Relinquished Care Dates) omitted.
// Segment DTP*444 (Property and Casualty Date of First Contact) omitted.
// Segment DTP*050 (Repricer Received Date) omitted.
// Segment PWK (Claim Supplemental Information) omitted.
// Segment CN1 (Contract Information) omitted.

/* Segment PWK for medical attachments
* TODO: implement medical attachments :)
* Hardcode OZ, support data for claim, PWK01 report type code
* Hardcode EL, electronic, PWK02 report transmission code
* Hardcode AC, attachment control number
* Billing claim batch control number 9 digits for PWK06
*/
if ($claim->isRelatedEmployment()) {
$out .= "PWK" .
"*" . "OZ" .
"*" . "EL" .
"*" . "*" .
"*" . "AC" .
"*" . BillingClaimBatchControlNumber::getIsa13() .
"~";
}

$patientpaid = $claim->patientPaidAmount();
if ($patientpaid != 0) {
++$edicount;
Expand Down

0 comments on commit 7427945

Please sign in to comment.