Skip to content

Commit

Permalink
Remove demoQueries + cleanup (#2737)
Browse files Browse the repository at this point in the history
remove demoQueries + cleanup
  • Loading branch information
m-goggins authored Oct 9, 2024
1 parent b2d65b1 commit f40a735
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 90 deletions.
13 changes: 0 additions & 13 deletions containers/tefca-viewer/src/app/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import * as dq from "./demoQueries";

/**
* The use cases that can be used in the app
*/
Expand All @@ -24,17 +22,6 @@ export const UseCaseToQueryName: {
cancer: "Cancer (Leukemia)",
};

export const UseCaseToStructMap: {
[key in USE_CASES]: dq.QueryStruct;
} = {
"social-determinants": dq.SOCIAL_DETERMINANTS_QUERY,
"newborn-screening": dq.NEWBORN_SCREENING_QUERY,
syphilis: dq.SYPHILIS_QUERY,
gonorrhea: dq.GONORRHEA_QUERY,
chlamydia: dq.CHLAMYDIA_QUERY,
cancer: dq.CANCER_QUERY,
};

/**
* Labels and values for the query options dropdown on the query page
*/
Expand Down
66 changes: 0 additions & 66 deletions containers/tefca-viewer/src/app/demoQueries.ts

This file was deleted.

2 changes: 1 addition & 1 deletion containers/tefca-viewer/src/app/format-service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Identifier,
} from "fhir/r4";
import { ValueSetItem } from "./constants";
import { QueryStruct } from "./demoQueries";
import { QueryStruct } from "./query-service";

/**
* Formats a string.
Expand Down
19 changes: 9 additions & 10 deletions containers/tefca-viewer/src/app/query-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {

import FHIRClient from "./fhir-servers";
import { USE_CASES, FHIR_SERVERS, ValueSetItem } from "./constants";
import * as dq from "./demoQueries";
import { CustomQuery } from "./CustomQuery";
import { GetPhoneQueryFormats } from "./format-service";
import { formatValueSetItemsAsQuerySpec } from "./format-service";
Expand Down Expand Up @@ -45,15 +44,15 @@ export type UseCaseQueryRequest = {
phone?: string;
};

const UseCaseToStructMap: {
[key in USE_CASES]: dq.QueryStruct;
} = {
"social-determinants": dq.SOCIAL_DETERMINANTS_QUERY,
"newborn-screening": dq.NEWBORN_SCREENING_QUERY,
syphilis: dq.SYPHILIS_QUERY,
gonorrhea: dq.GONORRHEA_QUERY,
chlamydia: dq.CHLAMYDIA_QUERY,
cancer: dq.CANCER_QUERY,
/**
* Expected structure of a query object
*/
export type QueryStruct = {
labCodes: string[];
snomedCodes: string[];
rxnormCodes: string[];
classTypeCodes: string[];
hasSecondEncounterQuery: boolean;
};

// Expected responses from the FHIR server
Expand Down

0 comments on commit f40a735

Please sign in to comment.