added more components.

This commit is contained in:
Jason Kulatunga 2022-09-17 09:07:49 -07:00
parent 8b9a59afbf
commit 54016c0168
5 changed files with 95 additions and 27 deletions

View File

@ -0,0 +1,16 @@
import {Component} from '@angular/core';
import {GenericColumnDefn, ListGenericResourceComponent} from './list-generic-resource.component';
import {attributeXTime} from './utils';
@Component({
selector: 'app-list-device',
templateUrl: './list-generic-resource.component.html',
styleUrls: ['./list-generic-resource.component.scss']
})
export class ListDeviceComponent extends ListGenericResourceComponent {
columnDefinitions: GenericColumnDefn[] = [
{ title: 'Device', versions: '*', getter: d => d.model },
{ title: 'Type', versions: '*', format: 'date', getter: d => d.type.coding[0] },
{ title: 'Unique ID', versions: '*', getter: d => d.udi?.name || d.udiCarrier?.deviceIdentifier },
]
}

View File

@ -0,0 +1,16 @@
import {Component} from '@angular/core';
import {GenericColumnDefn, ListGenericResourceComponent} from './list-generic-resource.component';
import {attributeXTime} from './utils';
@Component({
selector: 'app-list-diagnostic-report',
templateUrl: './list-generic-resource.component.html',
styleUrls: ['./list-generic-resource.component.scss']
})
export class ListDiagnosticReportComponent extends ListGenericResourceComponent {
columnDefinitions: GenericColumnDefn[] = [
{ title: 'Code', versions: '*', format: 'code', getter: d => d.code.coding[0] },
{ title: 'Issued', versions: '*', format: 'date', getter: d => d.issued },
{ title: 'Performer', versions: '*', getter: d => d.performer.display },
]
}

View File

@ -0,0 +1,15 @@
import {Component, OnChanges, OnInit} from '@angular/core';
import {GenericColumnDefn, ListGenericResourceComponent, ResourceListComponentInterface} from './list-generic-resource.component';
@Component({
selector: 'app-list-goal',
templateUrl: './list-generic-resource.component.html',
styleUrls: ['./list-generic-resource.component.scss']
})
export class ListGoalComponent extends ListGenericResourceComponent {
columnDefinitions: GenericColumnDefn[] = [
{ title: 'Description', versions: '*', getter: e => e.description.text },
{ title: 'Status', versions: '*', getter: e => e.lifecycleStatus },
{ title: 'Status Reason', versions: '*', getter: e => e.statusReason },
]
}

View File

@ -26,6 +26,9 @@ import {ListCarePlanComponent} from '../list-generic-resource/list-care-plan.com
import {ListAllergyIntoleranceComponent} from '../list-generic-resource/list-allergy-intolerance.component';
import {ResourceListOutletDirective} from './resource-list-outlet.directive';
import {ListAppointmentComponent} from '../list-generic-resource/list-appointment.component';
import {ListDeviceComponent} from '../list-generic-resource/list-device.component';
import {ListDiagnosticReportComponent} from '../list-generic-resource/list-diagnostic-report.component';
import {ListGoalComponent} from '../list-generic-resource/list-goal.component';
@Component({
selector: 'source-resource-list',
@ -110,15 +113,24 @@ export class ResourceListComponent implements OnInit, OnChanges {
case "Coverage": {
return ListCoverageComponent;
}
case "Device": {
return ListDeviceComponent;
}
case "DeviceRequest": {
return ListDeviceRequestComponent;
}
case "DiagnosticReport": {
return ListDiagnosticReportComponent;
}
case "DocumentReference": {
return ListDocumentReferenceComponent;
}
case "Encounter": {
return ListEncounterComponent;
}
case "Goal": {
return ListGoalComponent;
}
case "Immunization": {
return ListImmunizationComponent;
}

View File

@ -27,6 +27,9 @@ import {ListCarePlanComponent} from './list-generic-resource/list-care-plan.comp
import {ListAllergyIntoleranceComponent} from './list-generic-resource/list-allergy-intolerance.component';
import {ResourceListOutletDirective} from './resource-list/resource-list-outlet.directive';
import {ListAppointmentComponent} from './list-generic-resource/list-appointment.component';
import {ListDeviceComponent} from './list-generic-resource/list-device.component';
import {ListDiagnosticReportComponent} from './list-generic-resource/list-diagnostic-report.component';
import {ListGoalComponent} from './list-generic-resource/list-goal.component';
@NgModule({
imports: [
@ -58,36 +61,42 @@ import {ListAppointmentComponent} from './list-generic-resource/list-appointment
ListServiceRequestComponent,
ListDocumentReferenceComponent,
ListAppointmentComponent,
ListDeviceComponent,
ListDiagnosticReportComponent,
ListGoalComponent,
ResourceListComponent,
ResourceListOutletDirective,
],
exports: [
ComponentsSidebarComponent,
ListAllergyIntoleranceComponent,
ListAdverseEventComponent,
ListCarePlanComponent,
ListCommunicationComponent,
ListConditionComponent,
ListEncounterComponent,
ListAppointmentComponent,
ListGenericResourceComponent,
ListImmunizationComponent,
ListMedicationAdministrationComponent,
ListMedicationComponent,
ListMedicationDispenseComponent,
ListMedicationRequestComponent,
ListNutritionOrderComponent,
ListObservationComponent,
ListPatientComponent,
ListProcedureComponent,
ListDeviceRequestComponent,
UtilitiesSidebarComponent,
ListCoverageComponent,
ListServiceRequestComponent,
ListDocumentReferenceComponent,
ResourceListComponent,
ResourceListOutletDirective
]
exports: [
ComponentsSidebarComponent,
ListAllergyIntoleranceComponent,
ListAdverseEventComponent,
ListCarePlanComponent,
ListCommunicationComponent,
ListConditionComponent,
ListEncounterComponent,
ListAppointmentComponent,
ListGenericResourceComponent,
ListImmunizationComponent,
ListMedicationAdministrationComponent,
ListMedicationComponent,
ListMedicationDispenseComponent,
ListMedicationRequestComponent,
ListNutritionOrderComponent,
ListObservationComponent,
ListPatientComponent,
ListProcedureComponent,
ListDeviceRequestComponent,
UtilitiesSidebarComponent,
ListCoverageComponent,
ListServiceRequestComponent,
ListDocumentReferenceComponent,
ListDeviceComponent,
ListDiagnosticReportComponent,
ListGoalComponent,
ResourceListComponent,
ResourceListOutletDirective
]
})
export class SharedModule { }