Skip to content

Commit

Permalink
Merge pull request openemr#7728 from stephenwaite/iss7714-rel-702
Browse files Browse the repository at this point in the history
feat: allow 1 char first names for insurance subscriber (openemr#7715) for rel-702
  • Loading branch information
stephenwaite authored Sep 18, 2024
2 parents b759180 + 704bfd0 commit 0878c9b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Billing/X125010837P.php
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ public static function genX12837P(
$proccount = $claim->procCount();
$clm_total_charges = 0;
for ($prockey = 0; $prockey < $proccount; ++$prockey) {
$clm_total_charges += $claim->cptCharges($prockey);
$clm_total_charges += floatval($claim->cptCharges($prockey));
}
if (!$clm_total_charges) {
$log .= "*** This claim has no charges!\n";
Expand Down
2 changes: 1 addition & 1 deletion src/Validators/CoverageValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function (Validator $context) {
$context->optional('group_number')->lengthBetween(2, 255);
$context->required('subscriber_lname')->lengthBetween(2, 255);
$context->optional('subscriber_mname')->lengthBetween(1, 255);
$context->required('subscriber_fname')->lengthBetween(2, 255);
$context->required('subscriber_fname')->lengthBetween(1, 255);
$context->required('subscriber_relationship')->listOption('sub_relation')
->callback(function ($value, $values) {
if (
Expand Down
2 changes: 1 addition & 1 deletion src/Validators/PatientValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected function configureValidator()
$this->validator->context(
self::DATABASE_INSERT_CONTEXT,
function (Validator $context) {
$context->required("fname", "First Name")->lengthBetween(2, 255);
$context->required("fname", "First Name")->lengthBetween(1, 255);
$context->required("lname", 'Last Name')->lengthBetween(2, 255);
$context->required("sex", 'Gender')->lengthBetween(4, 30);
$context->required("DOB", 'Date of Birth')->datetime('Y-m-d');
Expand Down
4 changes: 2 additions & 2 deletions tests/Tests/Services/PatientServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function testGetFreshPid()
*/
public function testInsertFailure()
{
$this->patientFixture["fname"] = "A";
$this->patientFixture["fname"] = "";
$this->patientFixture["DOB"] = "12/27/2017";
unset($this->patientFixture["sex"]);

Expand Down Expand Up @@ -93,7 +93,7 @@ public function testUpdateFailure()
{
$this->patientService->insert($this->patientFixture);

$this->patientFixture["fname"] = "A";
$this->patientFixture["fname"] = "";

$actualResult = $this->patientService->update("not-a-uuid", $this->patientFixture);

Expand Down
2 changes: 1 addition & 1 deletion tests/Tests/Validators/PatientValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function testValidationInsertSuccess()
public function testValidationUpdateFailure()
{
$this->patientFixture["uuid"] = $this->fixtureManager->getUnregisteredUuid();
$this->patientFixture["fname"] = "A";
$this->patientFixture["fname"] = "";
$this->patientFixture["sex"] = "M";

$actualResult = $this->patientValidator->validate($this->patientFixture, PatientValidator::DATABASE_UPDATE_CONTEXT);
Expand Down

0 comments on commit 0878c9b

Please sign in to comment.