cleanup html attachments.

fixing attachment titles.
This commit is contained in:
Jason Kulatunga 2023-08-11 16:51:07 -06:00
parent 9469e29657
commit f94f29da52
4 changed files with 5 additions and 5 deletions

View File

@ -1,3 +1 @@
<p>html works!</p>
<div [innerHTML]="contentMarkup"></div>

View File

@ -111,7 +111,7 @@
<strong>Tests and Examinations:</strong>
<ul>
<li class="cursor-pointer" [ngbPopover]="diagnosticReportPopoverContent" placement="top-left" popoverClass="card-fhir-resource-popover" *ngFor="let diagnosticReport of diagnosticReports">
{{diagnosticReport.title}}
{{diagnosticReport.sort_title || diagnosticReport.title}}
<ng-template #diagnosticReportPopoverContent>
<fhir-resource [displayModel]="diagnosticReport"></fhir-resource>
@ -124,7 +124,7 @@
<strong>Attachments:</strong>
<ul>
<li class="cursor-pointer" [ngbPopover]="documentReferencePopoverContent" placement="top-left" popoverClass="card-fhir-resource-popover" *ngFor="let documentReference of documentReferences">
{{documentReference.sort_title}}
{{documentReference.sort_title || documentReference.title}}
<ng-template #documentReferencePopoverContent>
<fhir-resource [displayModel]="documentReference"></fhir-resource>

View File

@ -29,7 +29,7 @@ export class DeviceModel extends FastenDisplayModel {
commonDTO(fhirResource:any){
this.code = _.get(fhirResource, 'type');
this.model = _.get(fhirResource, 'model') || _.get(fhirResource,"code.text", 'Device');
this.model = _.get(fhirResource, 'model') || _.get(fhirResource,"code.text") || _.get(fhirResource,"code.coding.0.display") || 'Unknown Device';
this.status = _.get(fhirResource, 'status', '');
this.get_type_coding = _.get(fhirResource, 'type.coding');
this.has_type_coding = Array.isArray(this.get_type_coding);

View File

@ -11,6 +11,7 @@ import {AttachmentModel} from '../datatypes/attachment-model';
export class DocumentReferenceModel extends FastenDisplayModel {
code: CodableConceptModel | undefined
title: string | undefined
description: string | undefined
status: string | undefined
category: CodableConceptModel | undefined
@ -37,6 +38,7 @@ export class DocumentReferenceModel extends FastenDisplayModel {
commonDTO(fhirResource:any){
this.code = _.get(fhirResource, 'type');
this.title = _.get(fhirResource, 'category.0.text') || _.get(fhirResource, 'category.0.coding.0.display') || _.get(fhirResource, 'type.text') || _.get(fhirResource, 'type.coding.0.display');
this.description = _.get(fhirResource, 'description');
this.status = _.get(fhirResource, 'status');
this.type_coding = _.get(fhirResource, 'type.coding[0]');