-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TEFCA Viewer Conditions table (#1764)
* Import CodeableConcept in format-service * Remove additional eCR carryover files * Update next.config.js for tefca-viewer * Allow for self-signed certifcates * Condtions table working implementation * Exploring to address build issues
- Loading branch information
1 parent
df3b688
commit 14c28da
Showing
11 changed files
with
129 additions
and
82 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
44 changes: 44 additions & 0 deletions
44
containers/tefca-viewer/src/app/query/components/ConditionsTable.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,44 @@ | ||
import React from "react"; | ||
import { Table } from "@trussworks/react-uswds"; | ||
import { Condition } from "fhir/r4"; | ||
import { formatCodeableConcept } from "../../format-service"; | ||
|
||
/** | ||
* The props for the ConditionTable component. | ||
*/ | ||
export interface ConditionTableProps { | ||
conditions: Condition[]; | ||
} | ||
|
||
/** | ||
* Displays a table of data from array of Condition resources. | ||
* @param props - Condition table props. | ||
* @param props.conditions - The array of Condition resources. | ||
* @returns - The ConditionTable component. | ||
*/ | ||
const ConditionsTable: React.FC<ConditionTableProps> = ({ conditions }) => { | ||
return ( | ||
<Table> | ||
<thead> | ||
<tr> | ||
<th>Condition</th> | ||
<th>Status</th> | ||
<th>Onset</th> | ||
<th>Resolution</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{conditions.map((condition) => ( | ||
<tr key={condition.id}> | ||
<td>{formatCodeableConcept(condition.code ?? {})}</td> | ||
<td>{formatCodeableConcept(condition.clinicalStatus ?? {})}</td> | ||
<td>{condition.onsetDateTime}</td> | ||
<td>{condition.abatementDateTime}</td> | ||
</tr> | ||
))} | ||
</tbody> | ||
</Table> | ||
); | ||
}; | ||
|
||
export default ConditionsTable; |
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 |
---|---|---|
|
@@ -268,4 +268,8 @@ body { | |
margin-top: 2.0rem; | ||
margin-bottom: 4.0rem; | ||
max-width: 11em; | ||
} | ||
|
||
.usa-table { | ||
width: 100%; | ||
} |
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