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

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 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
2 changes: 2 additions & 0 deletions claim/gql_mutations.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ class ClaimInputType(OpenIMISMutation.Input):
feedback = graphene.Field(FeedbackInputType, required=False)
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 10:54

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


class Migration(migrations.Migration):

dependencies = [
('location', '0018_auto_20230925_2243'),
('claim', '0031_claim_care_type_claim_pre_authorization_and_more'),
]

operations = [
migrations.AddField(
model_name='claim',
name='patient_condition',
field=models.CharField(blank=True, max_length=2, null=True),
)
]
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),
),
]
4 changes: 3 additions & 1 deletion claim/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,10 @@ class Claim(core_models.VersionedModel, core_models.ExtendableModel):
db_column='CareType', max_length=4, blank=True, null=True)
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)

class Meta:
managed = True
Expand Down
8 changes: 6 additions & 2 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
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
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,6 +155,8 @@ def test_mutation_create_claim(self):
healthFacilityId: {self.claim_admin.health_facility.id}
visitType: "O"
preAuthorization: false
patientCondition: "R"
referralCode: "REF1"
services: [
{{

Expand Down Expand Up @@ -202,6 +204,8 @@ def test_mutation_create_claim(self):
healthFacilityId: {self.claim_admin.health_facility.id}
visitType: "O"
preAuthorization: false
patientCondition: "R"
referralCode: "REF1"
services: [
{{

Expand Down
Loading