adding Organization Practitioner explore table data.
This commit is contained in:
parent
d9564eb31c
commit
c063c654df
|
@ -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-organization',
|
||||
templateUrl: './list-generic-resource.component.html',
|
||||
styleUrls: ['./list-generic-resource.component.scss']
|
||||
})
|
||||
export class ListOrganizationComponent extends ListGenericResourceComponent {
|
||||
columnDefinitions: GenericColumnDefn[] = [
|
||||
{ title: 'Name', versions: '*', getter: d => d.name || d.alias?.[0] },
|
||||
{ title: 'Address', versions: '*', format: 'address', getter: d => d.address?.[0] },
|
||||
{ title: 'Contact', versions: '*', format: 'contact', getter: d => d.telecom?.[0] },
|
||||
]
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {attributeXTime} from './utils';
|
||||
import {GenericColumnDefn, ListGenericResourceComponent} from './list-generic-resource.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-list-practitioner',
|
||||
templateUrl: './list-generic-resource.component.html',
|
||||
styleUrls: ['./list-generic-resource.component.scss']
|
||||
})
|
||||
export class ListPractitionerComponent extends ListGenericResourceComponent {
|
||||
columnDefinitions: GenericColumnDefn[] = [
|
||||
{ title: 'Name', versions: '*', format: 'humanName', getter: p => p.name?.[0] },
|
||||
{ title: 'Address', versions: '*', format: 'address', getter: p => p.address?.[0] },
|
||||
{ title: 'Contact', versions: '*', format: 'contact', getter: p => p.telecom?.[0] },
|
||||
]
|
||||
}
|
|
@ -24,6 +24,33 @@ export const FORMATTERS = {
|
|||
if(codeableConcept.text) return codeableConcept.text
|
||||
return codeableConcept.coding && codeableConcept.coding[0] ? `${codeableConcept.coding[0].code}: ${codeableConcept.coding[0].display ? codeableConcept.coding[0].display : ''}` : ''
|
||||
},
|
||||
address: (address) => {
|
||||
if(!address) return ''
|
||||
var addressParts = []
|
||||
if(address.line) addressParts.push(address.line.join(', '))
|
||||
if(address.city) addressParts.push(address.city)
|
||||
if(address.state) addressParts.push(address.state)
|
||||
if(address.postalCode) addressParts.push(address.postalCode)
|
||||
if(address.country) addressParts.push(address.country)
|
||||
return addressParts.join(', ')
|
||||
},
|
||||
humanName: (humanName) => {
|
||||
if(!humanName) return ''
|
||||
var nameParts = []
|
||||
if(humanName.prefix) nameParts.push(humanName.prefix.join(', '))
|
||||
if(humanName.given) nameParts.push(humanName.given.join(' '))
|
||||
if(humanName.family) nameParts.push(humanName.family)
|
||||
if(humanName.suffix) nameParts.push(humanName.suffix.join(', '))
|
||||
return nameParts.join(' ')
|
||||
},
|
||||
contact: (contact) => {
|
||||
if (!contact) return ''
|
||||
var contactParts = []
|
||||
if (contact.system) contactParts.push(contact.system)
|
||||
if (contact.value) contactParts.push(contact.value)
|
||||
if (contact.use) contactParts.push(`(${contact.use})`)
|
||||
return contactParts.join(' ')
|
||||
},
|
||||
period: (period) => period ? `${moment(period.start).format('YYYY-MM-DD - h:mm a')} -> ${moment(period.end).format('YYYY-MM-DD - h:mm a')}` : ''
|
||||
};
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@ import {ListMedicationDispenseComponent} from '../list-generic-resource/list-med
|
|||
import {ListMedicationRequestComponent} from '../list-generic-resource/list-medication-request.component';
|
||||
import {ListNutritionOrderComponent} from '../list-generic-resource/list-nutrition-order.component';
|
||||
import {ListObservationComponent} from '../list-generic-resource/list-observation.component';
|
||||
import {ListOrganizationComponent} from '../list-generic-resource/list-organization.component';
|
||||
import {ListPractitionerComponent} from '../list-generic-resource/list-practitioner.component';
|
||||
import {ListProcedureComponent} from '../list-generic-resource/list-procedure.component';
|
||||
import {ListServiceRequestComponent} from '../list-generic-resource/list-service-request.component';
|
||||
import {ResourceListOutletDirective} from './resource-list-outlet.directive';
|
||||
|
@ -150,6 +152,12 @@ export class ResourceListComponent implements OnInit, OnChanges {
|
|||
case "Observation": {
|
||||
return ListObservationComponent;
|
||||
}
|
||||
case "Organization": {
|
||||
return ListOrganizationComponent;
|
||||
}
|
||||
case "Practitioner": {
|
||||
return ListPractitionerComponent;
|
||||
}
|
||||
case "Procedure": {
|
||||
return ListProcedureComponent;
|
||||
}
|
||||
|
|
|
@ -74,6 +74,8 @@ import {ListMedicationDispenseComponent} from './list-generic-resource/list-medi
|
|||
import {ListMedicationRequestComponent} from './list-generic-resource/list-medication-request.component'
|
||||
import {ListNutritionOrderComponent} from './list-generic-resource/list-nutrition-order.component';
|
||||
import {ListObservationComponent} from './list-generic-resource/list-observation.component'
|
||||
import {ListOrganizationComponent} from './list-generic-resource/list-organization.component'
|
||||
import {ListPractitionerComponent} from './list-generic-resource/list-practitioner.component'
|
||||
import {ListProcedureComponent} from './list-generic-resource/list-procedure.component'
|
||||
import {ListServiceRequestComponent} from './list-generic-resource/list-service-request.component';
|
||||
import {NgbCollapseModule, NgbModule} from '@ng-bootstrap/ng-bootstrap';
|
||||
|
@ -146,7 +148,9 @@ import {ResourceListOutletDirective} from './resource-list/resource-list-outlet.
|
|||
ListMedicationRequestComponent,
|
||||
ListNutritionOrderComponent,
|
||||
ListObservationComponent,
|
||||
ListOrganizationComponent,
|
||||
ListPatientComponent,
|
||||
ListPractitionerComponent,
|
||||
ListProcedureComponent,
|
||||
ListServiceRequestComponent,
|
||||
ResourceListComponent,
|
||||
|
@ -206,7 +210,9 @@ import {ResourceListOutletDirective} from './resource-list/resource-list-outlet.
|
|||
ListMedicationRequestComponent,
|
||||
ListNutritionOrderComponent,
|
||||
ListObservationComponent,
|
||||
ListOrganizationComponent,
|
||||
ListPatientComponent,
|
||||
ListPractitionerComponent,
|
||||
ListProcedureComponent,
|
||||
ListServiceRequestComponent,
|
||||
MedicalSourcesFilterComponent,
|
||||
|
|
Loading…
Reference in New Issue