Skip to content

Commit

Permalink
fixed import errors and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
khavinshankar committed Aug 3, 2023
1 parent b97b517 commit b5418b6
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 39 deletions.
9 changes: 6 additions & 3 deletions care/hcx/api/viewsets/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
from care.facility.models.patient import PatientRegistration
from care.facility.models.patient_consultation import PatientConsultation
from care.facility.static_data.icd11 import ICDDiseases
from care.facility.tasks.patient.discharge_report import generate_discharge_report
from care.facility.utils.reports.discharge_summary import (
generate_discharge_report_signed_url,
)
from care.hcx.api.serializers.claim import ClaimSerializer
from care.hcx.api.serializers.communication import CommunicationSerializer
from care.hcx.api.serializers.gateway import (
Expand All @@ -35,7 +37,8 @@
from care.hcx.models.communication import Communication
from care.hcx.models.policy import Policy
from care.hcx.utils.fhir import Fhir
from care.hcx.utils.hcx import Hcx, HcxOperations
from care.hcx.utils.hcx import Hcx
from care.hcx.utils.hcx.operations import HcxOperations
from care.utils.queryset.communications import get_communications


Expand Down Expand Up @@ -204,7 +207,7 @@ def make_claim(self, request):
)

if UseEnum[claim["use"]].value == "claim":
discharge_summary_url = generate_discharge_report(
discharge_summary_url = generate_discharge_report_signed_url(
PatientRegistration.objects.get(
external_id=claim["policy_object"]["patient_object"]["id"]
).id,
Expand Down
164 changes: 128 additions & 36 deletions care/hcx/migrations/0006_auto_20230324_1328.py
Original file line number Diff line number Diff line change
@@ -1,70 +1,162 @@
# Generated by Django 2.2.11 on 2023-03-24 07:58

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


class Migration(migrations.Migration):

dependencies = [
('hcx', '0005_auto_20230222_2217'),
("hcx", "0005_auto_20230222_2217"),
]

operations = [
migrations.AlterField(
model_name='claim',
name='last_modified_by',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='claim_last_modified_by', to=settings.AUTH_USER_MODEL),
model_name="claim",
name="last_modified_by",
field=models.ForeignKey(
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="claim_last_modified_by",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name='claim',
name='outcome',
field=models.CharField(blank=True, choices=[('queued', 'QUEUED'), ('complete', 'COMPLETE'), ('error', 'ERROR'), ('partial', 'PARTIAL_PROCESSING')], default=None, max_length=20, null=True),
model_name="claim",
name="outcome",
field=models.CharField(
blank=True,
choices=[
("queued", "QUEUED"),
("complete", "COMPLETE"),
("error", "ERROR"),
("partial", "PARTIAL_PROCESSING"),
],
default=None,
max_length=20,
null=True,
),
),
migrations.AlterField(
model_name='claim',
name='priority',
field=models.CharField(choices=[('stat', 'IMMEDIATE'), ('normal', 'NORMAL'), ('deferred', 'DEFERRED')], default='normal', max_length=20),
model_name="claim",
name="priority",
field=models.CharField(
choices=[
("stat", "IMMEDIATE"),
("normal", "NORMAL"),
("deferred", "DEFERRED"),
],
default="normal",
max_length=20,
),
),
migrations.AlterField(
model_name='claim',
name='status',
field=models.CharField(choices=[('active', 'ACTIVE'), ('cancelled', 'CANCELLED'), ('draft', 'DRAFT'), ('entered-in-error', 'ENTERED_IN_ERROR')], default='active', max_length=20),
model_name="claim",
name="status",
field=models.CharField(
choices=[
("active", "ACTIVE"),
("cancelled", "CANCELLED"),
("draft", "DRAFT"),
("entered-in-error", "ENTERED_IN_ERROR"),
],
default="active",
max_length=20,
),
),
migrations.AlterField(
model_name='claim',
name='type',
field=models.CharField(choices=[('institutional', 'INSTITUTIONAL'), ('oral', 'ORAL'), ('pharmacy', 'PHARMACY'), ('professional', 'PROFESSIONAL'), ('vision', 'VISION')], default='institutional', max_length=20),
model_name="claim",
name="type",
field=models.CharField(
choices=[
("institutional", "INSTITUTIONAL"),
("oral", "ORAL"),
("pharmacy", "PHARMACY"),
("professional", "PROFESSIONAL"),
("vision", "VISION"),
],
default="institutional",
max_length=20,
),
),
migrations.AlterField(
model_name='claim',
name='use',
field=models.CharField(choices=[('claim', 'CLAIM'), ('preauthorization', 'PRE_AUTHORIZATION'), ('predetermination', 'PRE_DETERMINATION')], default='claim', max_length=20),
model_name="claim",
name="use",
field=models.CharField(
choices=[
("claim", "CLAIM"),
("preauthorization", "PRE_AUTHORIZATION"),
("predetermination", "PRE_DETERMINATION"),
],
default="claim",
max_length=20,
),
),
migrations.AlterField(
model_name='policy',
name='last_modified_by',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='policy_last_modified_by', to=settings.AUTH_USER_MODEL),
model_name="policy",
name="last_modified_by",
field=models.ForeignKey(
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="policy_last_modified_by",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name='policy',
name='outcome',
field=models.CharField(blank=True, choices=[('queued', 'QUEUED'), ('complete', 'COMPLETE'), ('error', 'ERROR'), ('partial', 'PARTIAL_PROCESSING')], default=None, max_length=20, null=True),
model_name="policy",
name="outcome",
field=models.CharField(
blank=True,
choices=[
("queued", "QUEUED"),
("complete", "COMPLETE"),
("error", "ERROR"),
("partial", "PARTIAL_PROCESSING"),
],
default=None,
max_length=20,
null=True,
),
),
migrations.AlterField(
model_name='policy',
name='priority',
field=models.CharField(choices=[('stat', 'IMMEDIATE'), ('normal', 'NORMAL'), ('deferred', 'DEFERRED')], default='normal', max_length=20),
model_name="policy",
name="priority",
field=models.CharField(
choices=[
("stat", "IMMEDIATE"),
("normal", "NORMAL"),
("deferred", "DEFERRED"),
],
default="normal",
max_length=20,
),
),
migrations.AlterField(
model_name='policy',
name='purpose',
field=models.CharField(choices=[('auth-requirements', 'AUTH_REQUIREMENTS'), ('benefits', 'BENEFITS'), ('discovery', 'DISCOVERY'), ('validation', 'VALIDATION')], default='benefits', max_length=20),
model_name="policy",
name="purpose",
field=models.CharField(
choices=[
("auth-requirements", "AUTH_REQUIREMENTS"),
("benefits", "BENEFITS"),
("discovery", "DISCOVERY"),
("validation", "VALIDATION"),
],
default="benefits",
max_length=20,
),
),
migrations.AlterField(
model_name='policy',
name='status',
field=models.CharField(choices=[('active', 'ACTIVE'), ('cancelled', 'CANCELLED'), ('draft', 'DRAFT'), ('entered-in-error', 'ENTERED_IN_ERROR')], default='active', max_length=20),
model_name="policy",
name="status",
field=models.CharField(
choices=[
("active", "ACTIVE"),
("cancelled", "CANCELLED"),
("draft", "DRAFT"),
("entered-in-error", "ENTERED_IN_ERROR"),
],
default="active",
max_length=20,
),
),
]

0 comments on commit b5418b6

Please sign in to comment.