diff --git a/claim/gql_mutations.py b/claim/gql_mutations.py index 3dc16b3..50ed80a 100644 --- a/claim/gql_mutations.py +++ b/claim/gql_mutations.py @@ -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) diff --git a/claim/migrations/0033_claim_care_type_claim_refer_from_claim_refer_to_and_more.py b/claim/migrations/0033_claim_care_type_claim_refer_from_claim_refer_to_and_more.py new file mode 100644 index 0000000..6d2ce92 --- /dev/null +++ b/claim/migrations/0033_claim_care_type_claim_refer_from_claim_refer_to_and_more.py @@ -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), + ), + ] diff --git a/claim/migrations/0034_merge_20241004_1020.py b/claim/migrations/0034_merge_20241004_1020.py new file mode 100644 index 0000000..65438eb --- /dev/null +++ b/claim/migrations/0034_merge_20241004_1020.py @@ -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 = [ + ] diff --git a/claim/models.py b/claim/models.py index a3e2a04..e2b107a 100644 --- a/claim/models.py +++ b/claim/models.py @@ -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) diff --git a/claim/tests/tests.py b/claim/tests/tests.py index 7702cb7..33f5cef 100644 --- a/claim/tests/tests.py +++ b/claim/tests/tests.py @@ -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 } } } @@ -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 } } } @@ -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: [ {{ @@ -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: [ {{