@Test public void testObservationOnIce() throws Exception { Observation obs = FhirDevice.createObservation(rosetta.MDC_CO2_RESP_RATE.VALUE, Math.random(), new Date()); FhirDevice.ObservationConverter converter = new FhirDevice.ObservationConverter() { AbstractDevice.InstanceHolder<Numeric> getInstanceHolderForCode(String code) { return null; } }; FhirDevice.ObservationConverter.NumericObservation ice = converter.observationOnIce(obs); Assert.assertNotNull("Failed to convert observation to ice", ice); }
public static Observation createObservation(String metricId, Number value, Date asOf) { Observation obs = new Observation(); obs.setValue(new QuantityDt(value.doubleValue()).setUnits(MDC_DIM_DIMLESS.VALUE).setCode(metricId).setSystem("OpenICE")); obs.setApplies(new DateTimeDt(asOf, TemporalPrecisionEnum.SECOND, TimeZone.getTimeZone("UTC"))); obs.setStatus(ObservationStatusEnum.PRELIMINARY); return obs; }
FhirDevice extends AbstractConnectedDevice { public static Observation createObservation(String metricId, Number value, Date asOf) { Observation obs = new Observation(); obs.setValue(new QuantityDt(value.doubleValue()).setUnits(MDC_DIM_DIMLESS.VALUE).setCode(metricId).setSystem("OpenICE")); obs.setApplies(new DateTimeDt(asOf, TemporalPrecisionEnum.SECOND, TimeZone.getTimeZone("UTC"))); obs.setStatus(ObservationStatusEnum.PRELIMINARY); return obs; } }
FhirDevice extends AbstractConnectedDevice { public static Observation createObservation(String metricId, Number value, Date asOf) { Observation obs = new Observation(); obs.setValue(new QuantityDt(value.doubleValue()).setUnits(MDC_DIM_DIMLESS.VALUE).setCode(metricId).setSystem("OpenICE")); obs.setApplies(new DateTimeDt(asOf, TemporalPrecisionEnum.SECOND, TimeZone.getTimeZone("UTC"))); obs.setStatus(ObservationStatusEnum.PRELIMINARY); return obs; } FhirDevice(Subscriber subscriber, Publisher publisher, EventLoop eventLoop); }
FhirDevice extends AbstractConnectedDevice { public static Observation createObservation(String metricId, Number value, Date asOf) { Observation obs = new Observation(); obs.setValue(new QuantityDt(value.doubleValue()).setUnits(MDC_DIM_DIMLESS.VALUE).setCode(metricId).setSystem("OpenICE")); obs.setApplies(new DateTimeDt(asOf, TemporalPrecisionEnum.SECOND, TimeZone.getTimeZone("UTC"))); obs.setStatus(ObservationStatusEnum.PRELIMINARY); return obs; } FhirDevice(Subscriber subscriber, Publisher publisher, EventLoop eventLoop); static Observation createObservation(String metricId, Number value, Date asOf); boolean connect(String address); void connect(ScheduledExecutorService executor); void disconnect(); }
FhirDevice extends AbstractConnectedDevice { public static Observation createObservation(String metricId, Number value, Date asOf) { Observation obs = new Observation(); obs.setValue(new QuantityDt(value.doubleValue()).setUnits(MDC_DIM_DIMLESS.VALUE).setCode(metricId).setSystem("OpenICE")); obs.setApplies(new DateTimeDt(asOf, TemporalPrecisionEnum.SECOND, TimeZone.getTimeZone("UTC"))); obs.setStatus(ObservationStatusEnum.PRELIMINARY); return obs; } FhirDevice(Subscriber subscriber, Publisher publisher, EventLoop eventLoop); static Observation createObservation(String metricId, Number value, Date asOf); boolean connect(String address); void connect(ScheduledExecutorService executor); void disconnect();  }