Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OICI-35: Add a new field Referral code #181

Merged
merged 8 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading