-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement hct and tp dashboard workflows
- Loading branch information
1 parent
532817f
commit 29be08c
Showing
35 changed files
with
248 additions
and
765 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
15 changes: 15 additions & 0 deletions
15
packages/esm-commons-lib/src/utils/cohort-list-config-builder.ts
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,15 @@ | ||
import { extractSchemaValues, replaceWithConfigDefaults } from './schema-manipulation'; | ||
|
||
export const getCohortListTabsData = (cohortTabsSchema, config) => { | ||
const configDefaults = extractSchemaValues(config); | ||
const transformedSchemaConfig = replaceWithConfigDefaults(cohortTabsSchema, configDefaults); | ||
|
||
const tabs = transformedSchemaConfig.tabDefinitions?.map((tab) => { | ||
return { | ||
name: tab.tabName, | ||
cohortListData: tab.cohortContent, | ||
}; | ||
}); | ||
|
||
return tabs; | ||
}; |
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
41 changes: 41 additions & 0 deletions
41
packages/esm-commons-lib/src/utils/patient-list-tabs-config-builder.ts
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,41 @@ | ||
import { getObsFromEncounter } from './encounter-list-utils'; | ||
import { extractSchemaValues, replaceWithConfigDefaults } from './schema-manipulation'; | ||
|
||
export const getPatientListTabsData = (patientListTabsSchema, config) => { | ||
const configDefaults = extractSchemaValues(config); | ||
const transformedSchemaConfig = replaceWithConfigDefaults(patientListTabsSchema, configDefaults); | ||
|
||
const tabs = transformedSchemaConfig.tabDefinitions?.map((tab) => { | ||
const otherColumnsData = tab.otherColumns.map((column) => { | ||
return { | ||
key: column.id, | ||
header: column.title, | ||
index: column.index || null, | ||
getValue: (row) => { | ||
if (column.type === 'patientId') { | ||
return row.id; | ||
} | ||
|
||
if (column.type === 'lastDate') { | ||
return '13/01/2021'; | ||
} | ||
|
||
if (column.type === 'appointmentDate') { | ||
return '03/03/2021'; | ||
} | ||
|
||
const { encounter } = row; | ||
return getObsFromEncounter(encounter, column.concept, column.isDate); | ||
}, | ||
}; | ||
}); | ||
return { | ||
...tab, | ||
label: tab.tabName, | ||
queryParams: tab.hasQueryParams ? [`value1=${new Date().toISOString().split('T')[0]}`] : null, | ||
otherColumns: otherColumnsData, | ||
}; | ||
}); | ||
|
||
return tabs; | ||
}; |
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
62 changes: 0 additions & 62 deletions
62
...m-hiv-care-treatment-app/src/views/home-dashboard/lab-results/lab-results-form-viewer.tsx
This file was deleted.
Oops, something went wrong.
49 changes: 0 additions & 49 deletions
49
...reatment-app/src/views/home-dashboard/lab-results/lab-results-summary-tiles.component.tsx
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
...care-treatment-app/src/views/home-dashboard/lab-results/lab-results-summary.component.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.