-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add immunization query backend (#292)
Co-authored-by: m-goggins <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Nick Clyde <[email protected]> Co-authored-by: Marcelle <[email protected]>
- Loading branch information
1 parent
7766fcf
commit 706daa1
Showing
13 changed files
with
142 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
query-connector/flyway/sql/V04_01__add_fhir_server_disable_cert_validation.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ALTER TABLE fhir_servers | ||
ADD COLUMN disable_cert_validation BOOLEAN DEFAULT FALSE; | ||
|
||
-- Update rows with eHealthExchange in the server name to have disable_cert_validation set to true | ||
UPDATE fhir_servers | ||
SET disable_cert_validation = TRUE | ||
WHERE name LIKE '%eHealthExchange%'; | ||
|
||
-- Update rows with eHealthExchange in the server name to strip the trailing slash from the hostname | ||
UPDATE fhir_servers | ||
SET hostname = regexp_replace(hostname, '/$', '') | ||
WHERE name LIKE '%eHealthExchange%'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
query-connector/src/app/query/components/resultsView/tableComponents/ImmunizationTable.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import React from "react"; | ||
import Table from "@/app/query/designSystem/table/Table"; | ||
import { Immunization } from "fhir/r4"; | ||
import { | ||
formatDate, | ||
formatImmunizationRoute, | ||
} from "../../../../format-service"; | ||
import styles from "./resultsTables.module.scss"; | ||
|
||
/** | ||
* The props for the ImmunizationTable component. | ||
*/ | ||
export interface ImmunizationTableProps { | ||
immunizations: Immunization[]; | ||
} | ||
|
||
/** | ||
* Displays a table of data from array of Immunization resources. | ||
* @param props - Immunization table props. | ||
* @param props.immunizations - The array of Immunization resources. | ||
* @returns - The ImmunizationTable component. | ||
*/ | ||
const ImmunizationTable: React.FC<ImmunizationTableProps> = ({ | ||
immunizations, | ||
}) => { | ||
return ( | ||
<Table bordered={false} className="margin-top-0-important"> | ||
<thead> | ||
<tr className={styles.immunizationRow}> | ||
<th>Date</th> | ||
<th>Vaccine name</th> | ||
<th>Dose</th> | ||
<th>Route</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{immunizations.map((immunization) => ( | ||
<tr className={styles.immunizationRow} key={immunization.id}> | ||
<td>{formatDate(immunization.occurrenceDateTime)}</td> | ||
<td>{immunization.vaccineCode.coding?.[0].display}</td> | ||
<td> | ||
{immunization.doseQuantity?.value}{" "} | ||
{immunization.doseQuantity?.code} | ||
</td> | ||
<td>{formatImmunizationRoute(immunization)}</td> | ||
</tr> | ||
))} | ||
</tbody> | ||
</Table> | ||
); | ||
}; | ||
|
||
export default ImmunizationTable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -574,4 +574,8 @@ ul.usa-sidenav | |
flex: 1 1 0%; | ||
} | ||
} | ||
|
||
.usa-checkbox { | ||
background-color: transparent; | ||
} | ||
} |