Skip to content

Commit

Permalink
Finish feature/OICI-35
Browse files Browse the repository at this point in the history
OICI-35: Add a new field Referral code
  • Loading branch information
dragos-dobre authored Oct 4, 2024
2 parents f6e52e1 + c5a7224 commit bafb0f9
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 4 deletions.
1 change: 1 addition & 0 deletions claim/gql_mutations.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ class ClaimInputType(OpenIMISMutation.Input):
care_type = graphene.String(required=False)
pre_authorization = graphene.Boolean(required=False)
patient_condition = graphene.String(required=False)
referral_code = graphene.String(required=False)

items = graphene.List(ClaimItemInputType, required=False)
services = graphene.List(ClaimServiceInputType, required=False)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 4.2.15 on 2024-08-22 15:14

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('location', '0018_auto_20230925_2243'),
('claim', '0032_claim_care_type_claim_patient_condition_and_more'),
]

operations = [
migrations.AddField(
model_name='claim',
name='referral_code',
field=models.CharField(blank=True, max_length=50, null=True),
),
]
14 changes: 14 additions & 0 deletions claim/migrations/0034_merge_20241004_1020.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated by Django 4.2.13 on 2024-10-04 10:20

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('claim', '0032_alter_claimdedrem_policy'),
('claim', '0033_claim_care_type_claim_refer_from_claim_refer_to_and_more'),
]

operations = [
]
1 change: 1 addition & 0 deletions claim/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ class Claim(core_models.VersionedModel, core_models.ExtendableModel):
pre_authorization = models.BooleanField(
default=False, blank=True, null=True)
patient_condition = models.CharField(max_length=2, null=True, blank=True)
referral_code = models.CharField(max_length=50, null=True, blank=True)

# row_id = models.BinaryField(db_column='RowID', blank=True, null=True)

Expand Down
10 changes: 6 additions & 4 deletions claim/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_claims_query(self):
{
node
{
uuid,code,jsonExt,dateClaimed,dateProcessed,feedbackStatus,reviewStatus,claimed,approved,status,restoreId,healthFacility { id uuid name code },insuree{id, uuid, chfId, lastName, otherNames, dob},attachmentsCount, preAuthorization, patientCondition
uuid,code,jsonExt,dateClaimed,dateProcessed,feedbackStatus,reviewStatus,claimed,approved,status,restoreId,healthFacility { id uuid name code },insuree{id, uuid, chfId, lastName, otherNames, dob},attachmentsCount, preAuthorization, patientCondition, referralCode
}
}
}
Expand Down Expand Up @@ -113,7 +113,7 @@ def test_query_with_variables(self):
{
node
{
uuid,code,jsonExt,dateClaimed,dateProcessed,feedbackStatus,reviewStatus,claimed,approved,status,restoreId,healthFacility { id uuid name code },insuree{id, uuid, chfId, lastName, otherNames, dob},attachmentsCount, preAuthorization, patientCondition
uuid,code,jsonExt,dateClaimed,dateProcessed,feedbackStatus,reviewStatus,claimed,approved,status,restoreId,healthFacility { id uuid name code },insuree{id, uuid, chfId, lastName, otherNames, dob},attachmentsCount, preAuthorization, patientCondition, referralCode
}
}
}
Expand Down Expand Up @@ -155,7 +155,8 @@ def test_mutation_create_claim(self):
healthFacilityId: {self.claim_admin.health_facility.id}
visitType: "O"
preAuthorization: false
patientCondition: "H"
patientCondition: "R"
referralCode: "REF1"
services: [
{{
Expand Down Expand Up @@ -204,7 +205,8 @@ def test_mutation_create_claim(self):
healthFacilityId: {self.claim_admin.health_facility.id}
visitType: "O"
preAuthorization: false
patientCondition: "H"
patientCondition: "R"
referralCode: "REF1"
services: [
{{
Expand Down

0 comments on commit bafb0f9

Please sign in to comment.