Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinlinlee committed Feb 6, 2024
2 parents 10f02d4 + a772f95 commit 74e1964
Show file tree
Hide file tree
Showing 6 changed files with 324 additions and 369 deletions.
13 changes: 11 additions & 2 deletions api/FHIRApiService/services/base.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,17 @@ class BaseFhirApiService {
item = handleError.processing(item);
}

if ((this.response.getHeader("content-type").includes("xml") ||
this.request.get("accept").includes("xml")) ||
const xmlContentTypes = [
"application/fhir+xml",
"application/xml",
"xml"
];
let firstAcceptType = this.request.headers.accept.split(",").pop();

if ((
this.response.getHeader("content-type").includes("xml") ||
xmlContentTypes.includes(firstAcceptType)
) ||
this.response.locals?._format?.toLowerCase() === "xml"
) {
let fhir = new FHIR();
Expand Down
2 changes: 1 addition & 1 deletion api/FHIRApiService/services/update.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class UpdateService extends BaseFhirApiService {
return {
status: true,
code: 200,
result: newDoc.value.getFHIRField()
result: newDoc.getFHIRField()
};
}

Expand Down
Loading

0 comments on commit 74e1964

Please sign in to comment.