From 126765d50607a172ca0395b257414e91661f6b46 Mon Sep 17 00:00:00 2001 From: Marcelle <53578688+m-goggins@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:34:38 -0400 Subject: [PATCH] Add internal data model for ValueSet (#35) --- query-connector/src/app/constants.ts | 45 +++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/query-connector/src/app/constants.ts b/query-connector/src/app/constants.ts index 46ae1880e..5abe63ee5 100644 --- a/query-connector/src/app/constants.ts +++ b/query-connector/src/app/constants.ts @@ -287,6 +287,14 @@ export const stateOptions = [ /* Mode that pages can be in; determines what is displayed to the user */ export type Mode = "search" | "results" | "select-query" | "patient-results"; +export const metadata = { + title: "Query Connector", + description: "Try out TEFCA with queries for public health use cases.", +}; + +// TODO: Remove ValueSetItem, ValueSet, and valueSetTypeToClincalServiceTypeMap once +// ticket #2789 is resolved + /*Type to specify the expected components for each item in a value set that will be displayed in the CustomizeQuery component*/ export interface ValueSetItem { @@ -314,8 +322,37 @@ export const valueSetTypeToClincalServiceTypeMap = { medications: ["mrtc"], conditions: ["dxtc", "sdtc"], }; +/// TODO: Remove the above once ticket #2789 is resolved -export const metadata = { - title: "Query Connector", - description: "Try out TEFCA with queries for public health use cases.", -}; +/* + * The expected type of a ValueSet concept. + */ +export interface Concept { + code: string; + display: string; + include: boolean; +} + +/* + * The expected type of a ValueSet. + */ +// export interface ValueSet { +// valueset_id: string; +// valueset_version: string; +// valueset_name: string; +// author: string; +// system: string; +// ersdConceptType?: string; +// dibbsConceptType: string; +// includeValueSet: boolean; +// concepts: Concept[]; +// } + +/* + * The expected type of ValueSets grouped by dibbsConceptType for the purpose of display. + */ +export interface ValueSetDisplay { + labs: ValueSet[]; + medications: ValueSet[]; + conditions: ValueSet[]; +}