fixing breadcrumbs
make sure patient is sent with SourceSummary.
This commit is contained in:
parent
3e8b0aaffb
commit
61ed115dae
|
@ -332,6 +332,21 @@ func (sr *sqliteRepository) GetSourceSummary(ctx context.Context, sourceId strin
|
|||
|
||||
sourceSummary.ResourceTypeCounts = resourceTypeCounts
|
||||
|
||||
//set patient
|
||||
var wrappedPatientResourceModel models.ResourceFhir
|
||||
results := sr.gormClient.WithContext(ctx).
|
||||
Where(models.OriginBase{
|
||||
UserID: sr.GetCurrentUser(ctx).ID,
|
||||
SourceResourceType: "Patient",
|
||||
SourceID: sourceUUID,
|
||||
}).
|
||||
First(&wrappedPatientResourceModel)
|
||||
|
||||
if results.Error != nil {
|
||||
return nil, result.Error
|
||||
}
|
||||
sourceSummary.Patient = &wrappedPatientResourceModel
|
||||
|
||||
return sourceSummary, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -3,4 +3,5 @@ package models
|
|||
type SourceSummary struct {
|
||||
Source *Source `json:"source,omitempty"`
|
||||
ResourceTypeCounts []map[string]interface{} `json:"resource_type_counts,omitempty"`
|
||||
Patient *ResourceFhir `json:"patient"`
|
||||
}
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
<div class="az-content az-content-app pd-b-0">
|
||||
<div class="container">
|
||||
<div class="az-content-body">
|
||||
<div class="az-content-breadcrumb">
|
||||
<span>Resource</span>
|
||||
<span>{{resource.source_resource_type}}</span>
|
||||
<span>{{resource.source_resource_id}}</span>
|
||||
</div>
|
||||
|
||||
<pre *ngIf="resource"><code [highlight]="resource.payload | json"></code></pre>
|
||||
|
||||
</div><!-- az-content-body -->
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
<div class="container">
|
||||
<div class="az-content-left">
|
||||
<div class="az-content-breadcrumb">
|
||||
<span>Sources</span>
|
||||
<span>{{selectedSource.source_type}}</span>
|
||||
<span>Details</span>
|
||||
</div>
|
||||
|
||||
<ul class="list-group">
|
||||
<li *ngFor="let resourceGroup of resourceTypeCounts | keyvalue" (click)="selectResourceType(resourceGroup.key)" class="list-group-item d-flex justify-content-between align-items-center">
|
||||
{{resourceGroup.key}} <span class="badge badge-primary badge-pill">{{resourceGroup.value}}</span>
|
||||
|
@ -9,11 +15,6 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="az-content-body pd-lg-l-40 d-flex flex-column">
|
||||
<div class="az-content-breadcrumb">
|
||||
<span>Sources</span>
|
||||
<span>{{selectedSource.source_type}}</span>
|
||||
<span>Details</span>
|
||||
</div>
|
||||
|
||||
<source-resource-list [source]="selectedSource" [resourceListType]="selectedResourceType"></source-resource-list>
|
||||
|
||||
|
|
Loading…
Reference in New Issue