Add timestamp conversion

This commit is contained in:
dotasek 2023-04-28 16:38:20 -04:00
parent 718cd5e369
commit 6a0efdfe0b
2 changed files with 10 additions and 1 deletions

View File

@ -3,7 +3,9 @@ package org.hl7.fhir.convertors.conv43_50.resources43_50;
import org.hl7.fhir.convertors.context.ConversionContext43_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.Time43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50;
public class SubscriptionStatus43_50 {
@ -45,6 +47,9 @@ public class SubscriptionStatus43_50 {
if (src.hasEventNumber()) {
tgt.setEventNumberElement(Integer64_43_50.convertInteger64ToString(src.getEventNumberElement()));
}
if (src.hasTimestamp()) {
tgt.setTimestampElement(Instant43_50.convertInstant(src.getTimestampElement()));
}
if (src.hasFocus()) {
tgt.setFocus(Reference43_50.convertReference(src.getFocus()));
}
@ -116,6 +121,9 @@ public class SubscriptionStatus43_50 {
if (src.hasEventNumber()) {
tgt.setEventNumberElement(Integer64_43_50.convertStringToInteger64(src.getEventNumberElement()));
}
if (src.hasTimestamp()) {
tgt.setTimestampElement(Instant43_50.convertInstant(src.getTimestampElement()));
}
if (src.hasFocus()) {
tgt.setFocus(Reference43_50.convertReference(src.getFocus()));
}

View File

@ -9,7 +9,8 @@
"type" : "event-notification",
"eventsSinceSubscriptionStart" : "1000",
"notificationEvent" : [{
"eventNumber" : "1000"
"eventNumber" : "1000",
"timestamp" : "2022-02-10T15:12:28-05:00"
}],
"subscription" : {
"reference" : "http://example.org/FHIR/R5/Subscription/123"