Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/gradle/develop/org.flywaydb.fl…
Browse files Browse the repository at this point in the history
…yway-10.2.0
  • Loading branch information
chengjie8 authored Dec 14, 2023
2 parents a75a319 + 59059d3 commit b5367b3
Show file tree
Hide file tree
Showing 28 changed files with 272 additions and 709 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,54 @@
ALTER TABLE "bie_contention_event"
ADD COLUMN "date_added" TIMESTAMP,
ADD COLUMN "date_completed" TIMESTAMP,
ADD COLUMN "date_updated" TIMESTAMP,
ADD COLUMN "actor_station" VARCHAR(255),
ADD COLUMN "automation_indicator" boolean,
ADD COLUMN "benefit_claim_type_code" VARCHAR(255),
ADD COLUMN "contention_status_type_code" VARCHAR(255),
ADD COLUMN "current_lifecycle_status" VARCHAR(255),
ADD COLUMN "clmnt_txt" VARCHAR(255),
ADD COLUMN "details" VARCHAR(255),
ADD COLUMN "event_time" TIMESTAMP,
ADD COLUMN "journal_status_type_code" VARCHAR(255),
ADD COLUMN "veteran_participant_id" VARCHAR(255),
ADD COLUMN "event_details" JSON;
DO $$
BEGIN
IF NOT EXISTS (SELECT FROM information_schema.columns WHERE table_name = 'bie_contention_event' AND column_name = 'date_added') THEN
ALTER TABLE "bie_contention_event" ADD COLUMN "date_added" TIMESTAMP;
END IF;

IF NOT EXISTS (SELECT FROM information_schema.columns WHERE table_name = 'bie_contention_event' AND column_name = 'date_completed') THEN
ALTER TABLE "bie_contention_event" ADD COLUMN "date_completed" TIMESTAMP;
END IF;

IF NOT EXISTS (SELECT FROM information_schema.columns WHERE table_name = 'bie_contention_event' AND column_name = 'date_updated') THEN
ALTER TABLE "bie_contention_event" ADD COLUMN "date_updated" TIMESTAMP;
END IF;

IF NOT EXISTS (SELECT FROM information_schema.columns WHERE table_name = 'bie_contention_event' AND column_name = 'actor_station') THEN
ALTER TABLE "bie_contention_event" ADD COLUMN "actor_station" VARCHAR(255);
END IF;

IF NOT EXISTS (SELECT FROM information_schema.columns WHERE table_name = 'bie_contention_event' AND column_name = 'automation_indicator') THEN
ALTER TABLE "bie_contention_event" ADD COLUMN "automation_indicator" boolean;
END IF;

IF NOT EXISTS (SELECT FROM information_schema.columns WHERE table_name = 'bie_contention_event' AND column_name = 'benefit_claim_type_code') THEN
ALTER TABLE "bie_contention_event" ADD COLUMN "benefit_claim_type_code" VARCHAR(255);
END IF;

IF NOT EXISTS (SELECT FROM information_schema.columns WHERE table_name = 'bie_contention_event' AND column_name = 'contention_status_type_code') THEN
ALTER TABLE "bie_contention_event" ADD COLUMN "contention_status_type_code" VARCHAR(255);
END IF;

IF NOT EXISTS (SELECT FROM information_schema.columns WHERE table_name = 'bie_contention_event' AND column_name = 'current_lifecycle_status') THEN
ALTER TABLE "bie_contention_event" ADD COLUMN "current_lifecycle_status" VARCHAR(255);
END IF;

IF NOT EXISTS (SELECT FROM information_schema.columns WHERE table_name = 'bie_contention_event' AND column_name = 'clmnt_txt') THEN
ALTER TABLE "bie_contention_event" ADD COLUMN "clmnt_txt" VARCHAR(255);
END IF;

IF NOT EXISTS (SELECT FROM information_schema.columns WHERE table_name = 'bie_contention_event' AND column_name = 'details') THEN
ALTER TABLE "bie_contention_event" ADD COLUMN "details" VARCHAR(255);
END IF;

IF NOT EXISTS (SELECT FROM information_schema.columns WHERE table_name = 'bie_contention_event' AND column_name = 'journal_status_type_code') THEN
ALTER TABLE "bie_contention_event" ADD COLUMN "journal_status_type_code" VARCHAR(255);
END IF;

IF NOT EXISTS (SELECT FROM information_schema.columns WHERE table_name = 'bie_contention_event' AND column_name = 'veteran_participant_id') THEN
ALTER TABLE "bie_contention_event" ADD COLUMN "veteran_participant_id" VARCHAR(255);
END IF;

IF NOT EXISTS (SELECT FROM information_schema.columns WHERE table_name = 'bie_contention_event' AND column_name = 'event_time') THEN
ALTER TABLE "bie_contention_event" ADD COLUMN "event_time" TIMESTAMP;
END IF;
END $$;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE "bie_contention_event"
RENAME COLUMN "clmnt_txt" TO "description";
4 changes: 2 additions & 2 deletions domain-cc/cc-app/src/python_src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@

from .pydantic_models import Claim, PredictedClassification
from .util.brd_classification_codes import get_classification_name
from .util.data.reduced_dropdown_list import DROPDOWN_OPTIONS
from .util.logging_dropdown_selections import build_logging_table
from .util.lookup_table import ConditionDropdownLookupTable, DiagnosticCodeLookupTable

dc_lookup_table = DiagnosticCodeLookupTable()
dropdown_lookup_table = ConditionDropdownLookupTable()
dropdown_values = build_logging_table()


app = FastAPI(
Expand Down Expand Up @@ -58,7 +59,6 @@ def get_classification(claim: Claim) -> Optional[PredictedClassification]:

if claim.contention_text and not classification_code:
classification_code = dropdown_lookup_table.get(claim.contention_text, None)
dropdown_values = [term.strip().lower() for term in DROPDOWN_OPTIONS.values()]
is_in_dropdown = claim.contention_text.strip().lower() in dropdown_values
log_contention_text = (
claim.contention_text if is_in_dropdown else "Not in dropdown"
Expand Down
Loading

0 comments on commit b5367b3

Please sign in to comment.