Merge pull request #1243 from hapifhir/do-20230428-subscriptionstatus-conv
Add missing elements to SubscriptionStatus conversion
This commit is contained in:
commit
bdca931757
|
@ -1,9 +1,12 @@
|
||||||
package org.hl7.fhir.convertors.conv43_50.resources43_50;
|
package org.hl7.fhir.convertors.conv43_50.resources43_50;
|
||||||
|
|
||||||
import org.hl7.fhir.convertors.context.ConversionContext43_50;
|
import org.hl7.fhir.convertors.context.ConversionContext43_50;
|
||||||
|
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableConcept43_50;
|
||||||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Canonical43_50;
|
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Canonical43_50;
|
||||||
|
|
||||||
|
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Instant43_50;
|
||||||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Integer64_43_50;
|
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Integer64_43_50;
|
||||||
|
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Time43_50;
|
||||||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50;
|
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50;
|
||||||
|
|
||||||
public class SubscriptionStatus43_50 {
|
public class SubscriptionStatus43_50 {
|
||||||
|
@ -37,6 +40,11 @@ public class SubscriptionStatus43_50 {
|
||||||
if (src.hasTopic()) {
|
if (src.hasTopic()) {
|
||||||
tgt.setTopicElement(Canonical43_50.convertCanonical(src.getTopicElement()));
|
tgt.setTopicElement(Canonical43_50.convertCanonical(src.getTopicElement()));
|
||||||
}
|
}
|
||||||
|
if (src.hasError()) {
|
||||||
|
for (org.hl7.fhir.r5.model.CodeableConcept srcError : src.getError()) {
|
||||||
|
tgt.addError(CodeableConcept43_50.convertCodeableConcept(srcError));
|
||||||
|
}
|
||||||
|
}
|
||||||
return tgt;
|
return tgt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,9 +53,17 @@ public class SubscriptionStatus43_50 {
|
||||||
if (src.hasEventNumber()) {
|
if (src.hasEventNumber()) {
|
||||||
tgt.setEventNumberElement(Integer64_43_50.convertInteger64ToString(src.getEventNumberElement()));
|
tgt.setEventNumberElement(Integer64_43_50.convertInteger64ToString(src.getEventNumberElement()));
|
||||||
}
|
}
|
||||||
|
if (src.hasTimestamp()) {
|
||||||
|
tgt.setTimestampElement(Instant43_50.convertInstant(src.getTimestampElement()));
|
||||||
|
}
|
||||||
if (src.hasFocus()) {
|
if (src.hasFocus()) {
|
||||||
tgt.setFocus(Reference43_50.convertReference(src.getFocus()));
|
tgt.setFocus(Reference43_50.convertReference(src.getFocus()));
|
||||||
}
|
}
|
||||||
|
if (src.hasAdditionalContext()) {
|
||||||
|
for (org.hl7.fhir.r5.model.Reference ref : src.getAdditionalContext()) {
|
||||||
|
tgt.addAdditionalContext(Reference43_50.convertReference(ref));
|
||||||
|
}
|
||||||
|
}
|
||||||
return tgt;
|
return tgt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,6 +124,11 @@ public class SubscriptionStatus43_50 {
|
||||||
if (src.hasTopic()) {
|
if (src.hasTopic()) {
|
||||||
tgt.setTopicElement(Canonical43_50.convertCanonical(src.getTopicElement()));
|
tgt.setTopicElement(Canonical43_50.convertCanonical(src.getTopicElement()));
|
||||||
}
|
}
|
||||||
|
if (src.hasError()) {
|
||||||
|
for (org.hl7.fhir.r4b.model.CodeableConcept srcError : src.getError()) {
|
||||||
|
tgt.addError(CodeableConcept43_50.convertCodeableConcept(srcError));
|
||||||
|
}
|
||||||
|
}
|
||||||
return tgt;
|
return tgt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,9 +137,17 @@ public class SubscriptionStatus43_50 {
|
||||||
if (src.hasEventNumber()) {
|
if (src.hasEventNumber()) {
|
||||||
tgt.setEventNumberElement(Integer64_43_50.convertStringToInteger64(src.getEventNumberElement()));
|
tgt.setEventNumberElement(Integer64_43_50.convertStringToInteger64(src.getEventNumberElement()));
|
||||||
}
|
}
|
||||||
|
if (src.hasTimestamp()) {
|
||||||
|
tgt.setTimestampElement(Instant43_50.convertInstant(src.getTimestampElement()));
|
||||||
|
}
|
||||||
if (src.hasFocus()) {
|
if (src.hasFocus()) {
|
||||||
tgt.setFocus(Reference43_50.convertReference(src.getFocus()));
|
tgt.setFocus(Reference43_50.convertReference(src.getFocus()));
|
||||||
}
|
}
|
||||||
|
if (src.hasAdditionalContext()) {
|
||||||
|
for (org.hl7.fhir.r4b.model.Reference ref : src.getAdditionalContext()) {
|
||||||
|
tgt.addAdditionalContext(Reference43_50.convertReference(ref));
|
||||||
|
}
|
||||||
|
}
|
||||||
return tgt;
|
return tgt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,28 @@
|
||||||
"type" : "event-notification",
|
"type" : "event-notification",
|
||||||
"eventsSinceSubscriptionStart" : "1000",
|
"eventsSinceSubscriptionStart" : "1000",
|
||||||
"notificationEvent" : [{
|
"notificationEvent" : [{
|
||||||
"eventNumber" : "1000"
|
"eventNumber" : "1000",
|
||||||
|
"timestamp" : "2022-02-10T15:12:28-05:00",
|
||||||
|
"additionalContext": [
|
||||||
|
{
|
||||||
|
"reference": "http://example.org/FHIR/R5/Patient/ABC"
|
||||||
|
}
|
||||||
|
]
|
||||||
}],
|
}],
|
||||||
"subscription" : {
|
"subscription" : {
|
||||||
"reference" : "http://example.org/FHIR/R5/Subscription/123"
|
"reference" : "http://example.org/FHIR/R5/Subscription/123"
|
||||||
},
|
},
|
||||||
"topic" : "http://example.org/FHIR/R5/SubscriptionTopic/admission"
|
"topic" : "http://example.org/FHIR/R5/SubscriptionTopic/admission",
|
||||||
|
"error": [
|
||||||
|
{
|
||||||
|
"code": {
|
||||||
|
"coding": [
|
||||||
|
{
|
||||||
|
"code": "no-response ",
|
||||||
|
"system": "http://terminology.hl7.org/CodeSystem/subscription-error"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue