001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * Describes a measurement, calculation or setting capability of a device.  The DeviceMetric resource is derived from the ISO/IEEE 11073-10201 Domain Information Model standard, but is more widely applicable. 
052 */
053@ResourceDef(name="DeviceMetric", profile="http://hl7.org/fhir/StructureDefinition/DeviceMetric")
054public class DeviceMetric extends DomainResource {
055
056    public enum DeviceMetricCalibrationState {
057        /**
058         * The metric has not been calibrated.
059         */
060        NOTCALIBRATED, 
061        /**
062         * The metric needs to be calibrated.
063         */
064        CALIBRATIONREQUIRED, 
065        /**
066         * The metric has been calibrated.
067         */
068        CALIBRATED, 
069        /**
070         * The state of calibration of this metric is unspecified.
071         */
072        UNSPECIFIED, 
073        /**
074         * added to help the parsers with the generic types
075         */
076        NULL;
077        public static DeviceMetricCalibrationState fromCode(String codeString) throws FHIRException {
078            if (codeString == null || "".equals(codeString))
079                return null;
080        if ("not-calibrated".equals(codeString))
081          return NOTCALIBRATED;
082        if ("calibration-required".equals(codeString))
083          return CALIBRATIONREQUIRED;
084        if ("calibrated".equals(codeString))
085          return CALIBRATED;
086        if ("unspecified".equals(codeString))
087          return UNSPECIFIED;
088        if (Configuration.isAcceptInvalidEnums())
089          return null;
090        else
091          throw new FHIRException("Unknown DeviceMetricCalibrationState code '"+codeString+"'");
092        }
093        public String toCode() {
094          switch (this) {
095            case NOTCALIBRATED: return "not-calibrated";
096            case CALIBRATIONREQUIRED: return "calibration-required";
097            case CALIBRATED: return "calibrated";
098            case UNSPECIFIED: return "unspecified";
099            case NULL: return null;
100            default: return "?";
101          }
102        }
103        public String getSystem() {
104          switch (this) {
105            case NOTCALIBRATED: return "http://hl7.org/fhir/metric-calibration-state";
106            case CALIBRATIONREQUIRED: return "http://hl7.org/fhir/metric-calibration-state";
107            case CALIBRATED: return "http://hl7.org/fhir/metric-calibration-state";
108            case UNSPECIFIED: return "http://hl7.org/fhir/metric-calibration-state";
109            case NULL: return null;
110            default: return "?";
111          }
112        }
113        public String getDefinition() {
114          switch (this) {
115            case NOTCALIBRATED: return "The metric has not been calibrated.";
116            case CALIBRATIONREQUIRED: return "The metric needs to be calibrated.";
117            case CALIBRATED: return "The metric has been calibrated.";
118            case UNSPECIFIED: return "The state of calibration of this metric is unspecified.";
119            case NULL: return null;
120            default: return "?";
121          }
122        }
123        public String getDisplay() {
124          switch (this) {
125            case NOTCALIBRATED: return "Not Calibrated";
126            case CALIBRATIONREQUIRED: return "Calibration Required";
127            case CALIBRATED: return "Calibrated";
128            case UNSPECIFIED: return "Unspecified";
129            case NULL: return null;
130            default: return "?";
131          }
132        }
133    }
134
135  public static class DeviceMetricCalibrationStateEnumFactory implements EnumFactory<DeviceMetricCalibrationState> {
136    public DeviceMetricCalibrationState fromCode(String codeString) throws IllegalArgumentException {
137      if (codeString == null || "".equals(codeString))
138            if (codeString == null || "".equals(codeString))
139                return null;
140        if ("not-calibrated".equals(codeString))
141          return DeviceMetricCalibrationState.NOTCALIBRATED;
142        if ("calibration-required".equals(codeString))
143          return DeviceMetricCalibrationState.CALIBRATIONREQUIRED;
144        if ("calibrated".equals(codeString))
145          return DeviceMetricCalibrationState.CALIBRATED;
146        if ("unspecified".equals(codeString))
147          return DeviceMetricCalibrationState.UNSPECIFIED;
148        throw new IllegalArgumentException("Unknown DeviceMetricCalibrationState code '"+codeString+"'");
149        }
150        public Enumeration<DeviceMetricCalibrationState> fromType(PrimitiveType<?> code) throws FHIRException {
151          if (code == null)
152            return null;
153          if (code.isEmpty())
154            return new Enumeration<DeviceMetricCalibrationState>(this, DeviceMetricCalibrationState.NULL, code);
155          String codeString = ((PrimitiveType) code).asStringValue();
156          if (codeString == null || "".equals(codeString))
157            return new Enumeration<DeviceMetricCalibrationState>(this, DeviceMetricCalibrationState.NULL, code);
158        if ("not-calibrated".equals(codeString))
159          return new Enumeration<DeviceMetricCalibrationState>(this, DeviceMetricCalibrationState.NOTCALIBRATED, code);
160        if ("calibration-required".equals(codeString))
161          return new Enumeration<DeviceMetricCalibrationState>(this, DeviceMetricCalibrationState.CALIBRATIONREQUIRED, code);
162        if ("calibrated".equals(codeString))
163          return new Enumeration<DeviceMetricCalibrationState>(this, DeviceMetricCalibrationState.CALIBRATED, code);
164        if ("unspecified".equals(codeString))
165          return new Enumeration<DeviceMetricCalibrationState>(this, DeviceMetricCalibrationState.UNSPECIFIED, code);
166        throw new FHIRException("Unknown DeviceMetricCalibrationState code '"+codeString+"'");
167        }
168    public String toCode(DeviceMetricCalibrationState code) {
169      if (code == DeviceMetricCalibrationState.NOTCALIBRATED)
170        return "not-calibrated";
171      if (code == DeviceMetricCalibrationState.CALIBRATIONREQUIRED)
172        return "calibration-required";
173      if (code == DeviceMetricCalibrationState.CALIBRATED)
174        return "calibrated";
175      if (code == DeviceMetricCalibrationState.UNSPECIFIED)
176        return "unspecified";
177      return "?";
178      }
179    public String toSystem(DeviceMetricCalibrationState code) {
180      return code.getSystem();
181      }
182    }
183
184    public enum DeviceMetricCalibrationType {
185        /**
186         * Metric calibration method has not been identified.
187         */
188        UNSPECIFIED, 
189        /**
190         * Offset metric calibration method.
191         */
192        OFFSET, 
193        /**
194         * Gain metric calibration method.
195         */
196        GAIN, 
197        /**
198         * Two-point metric calibration method.
199         */
200        TWOPOINT, 
201        /**
202         * added to help the parsers with the generic types
203         */
204        NULL;
205        public static DeviceMetricCalibrationType fromCode(String codeString) throws FHIRException {
206            if (codeString == null || "".equals(codeString))
207                return null;
208        if ("unspecified".equals(codeString))
209          return UNSPECIFIED;
210        if ("offset".equals(codeString))
211          return OFFSET;
212        if ("gain".equals(codeString))
213          return GAIN;
214        if ("two-point".equals(codeString))
215          return TWOPOINT;
216        if (Configuration.isAcceptInvalidEnums())
217          return null;
218        else
219          throw new FHIRException("Unknown DeviceMetricCalibrationType code '"+codeString+"'");
220        }
221        public String toCode() {
222          switch (this) {
223            case UNSPECIFIED: return "unspecified";
224            case OFFSET: return "offset";
225            case GAIN: return "gain";
226            case TWOPOINT: return "two-point";
227            case NULL: return null;
228            default: return "?";
229          }
230        }
231        public String getSystem() {
232          switch (this) {
233            case UNSPECIFIED: return "http://hl7.org/fhir/metric-calibration-type";
234            case OFFSET: return "http://hl7.org/fhir/metric-calibration-type";
235            case GAIN: return "http://hl7.org/fhir/metric-calibration-type";
236            case TWOPOINT: return "http://hl7.org/fhir/metric-calibration-type";
237            case NULL: return null;
238            default: return "?";
239          }
240        }
241        public String getDefinition() {
242          switch (this) {
243            case UNSPECIFIED: return "Metric calibration method has not been identified.";
244            case OFFSET: return "Offset metric calibration method.";
245            case GAIN: return "Gain metric calibration method.";
246            case TWOPOINT: return "Two-point metric calibration method.";
247            case NULL: return null;
248            default: return "?";
249          }
250        }
251        public String getDisplay() {
252          switch (this) {
253            case UNSPECIFIED: return "Unspecified";
254            case OFFSET: return "Offset";
255            case GAIN: return "Gain";
256            case TWOPOINT: return "Two Point";
257            case NULL: return null;
258            default: return "?";
259          }
260        }
261    }
262
263  public static class DeviceMetricCalibrationTypeEnumFactory implements EnumFactory<DeviceMetricCalibrationType> {
264    public DeviceMetricCalibrationType fromCode(String codeString) throws IllegalArgumentException {
265      if (codeString == null || "".equals(codeString))
266            if (codeString == null || "".equals(codeString))
267                return null;
268        if ("unspecified".equals(codeString))
269          return DeviceMetricCalibrationType.UNSPECIFIED;
270        if ("offset".equals(codeString))
271          return DeviceMetricCalibrationType.OFFSET;
272        if ("gain".equals(codeString))
273          return DeviceMetricCalibrationType.GAIN;
274        if ("two-point".equals(codeString))
275          return DeviceMetricCalibrationType.TWOPOINT;
276        throw new IllegalArgumentException("Unknown DeviceMetricCalibrationType code '"+codeString+"'");
277        }
278        public Enumeration<DeviceMetricCalibrationType> fromType(PrimitiveType<?> code) throws FHIRException {
279          if (code == null)
280            return null;
281          if (code.isEmpty())
282            return new Enumeration<DeviceMetricCalibrationType>(this, DeviceMetricCalibrationType.NULL, code);
283          String codeString = ((PrimitiveType) code).asStringValue();
284          if (codeString == null || "".equals(codeString))
285            return new Enumeration<DeviceMetricCalibrationType>(this, DeviceMetricCalibrationType.NULL, code);
286        if ("unspecified".equals(codeString))
287          return new Enumeration<DeviceMetricCalibrationType>(this, DeviceMetricCalibrationType.UNSPECIFIED, code);
288        if ("offset".equals(codeString))
289          return new Enumeration<DeviceMetricCalibrationType>(this, DeviceMetricCalibrationType.OFFSET, code);
290        if ("gain".equals(codeString))
291          return new Enumeration<DeviceMetricCalibrationType>(this, DeviceMetricCalibrationType.GAIN, code);
292        if ("two-point".equals(codeString))
293          return new Enumeration<DeviceMetricCalibrationType>(this, DeviceMetricCalibrationType.TWOPOINT, code);
294        throw new FHIRException("Unknown DeviceMetricCalibrationType code '"+codeString+"'");
295        }
296    public String toCode(DeviceMetricCalibrationType code) {
297      if (code == DeviceMetricCalibrationType.UNSPECIFIED)
298        return "unspecified";
299      if (code == DeviceMetricCalibrationType.OFFSET)
300        return "offset";
301      if (code == DeviceMetricCalibrationType.GAIN)
302        return "gain";
303      if (code == DeviceMetricCalibrationType.TWOPOINT)
304        return "two-point";
305      return "?";
306      }
307    public String toSystem(DeviceMetricCalibrationType code) {
308      return code.getSystem();
309      }
310    }
311
312    public enum DeviceMetricCategory {
313        /**
314         * Observations generated for this DeviceMetric are measured.
315         */
316        MEASUREMENT, 
317        /**
318         * Observations generated for this DeviceMetric is a setting that will influence the behavior of the Device.
319         */
320        SETTING, 
321        /**
322         * Observations generated for this DeviceMetric are calculated.
323         */
324        CALCULATION, 
325        /**
326         * The category of this DeviceMetric is unspecified.
327         */
328        UNSPECIFIED, 
329        /**
330         * added to help the parsers with the generic types
331         */
332        NULL;
333        public static DeviceMetricCategory fromCode(String codeString) throws FHIRException {
334            if (codeString == null || "".equals(codeString))
335                return null;
336        if ("measurement".equals(codeString))
337          return MEASUREMENT;
338        if ("setting".equals(codeString))
339          return SETTING;
340        if ("calculation".equals(codeString))
341          return CALCULATION;
342        if ("unspecified".equals(codeString))
343          return UNSPECIFIED;
344        if (Configuration.isAcceptInvalidEnums())
345          return null;
346        else
347          throw new FHIRException("Unknown DeviceMetricCategory code '"+codeString+"'");
348        }
349        public String toCode() {
350          switch (this) {
351            case MEASUREMENT: return "measurement";
352            case SETTING: return "setting";
353            case CALCULATION: return "calculation";
354            case UNSPECIFIED: return "unspecified";
355            case NULL: return null;
356            default: return "?";
357          }
358        }
359        public String getSystem() {
360          switch (this) {
361            case MEASUREMENT: return "http://hl7.org/fhir/metric-category";
362            case SETTING: return "http://hl7.org/fhir/metric-category";
363            case CALCULATION: return "http://hl7.org/fhir/metric-category";
364            case UNSPECIFIED: return "http://hl7.org/fhir/metric-category";
365            case NULL: return null;
366            default: return "?";
367          }
368        }
369        public String getDefinition() {
370          switch (this) {
371            case MEASUREMENT: return "Observations generated for this DeviceMetric are measured.";
372            case SETTING: return "Observations generated for this DeviceMetric is a setting that will influence the behavior of the Device.";
373            case CALCULATION: return "Observations generated for this DeviceMetric are calculated.";
374            case UNSPECIFIED: return "The category of this DeviceMetric is unspecified.";
375            case NULL: return null;
376            default: return "?";
377          }
378        }
379        public String getDisplay() {
380          switch (this) {
381            case MEASUREMENT: return "Measurement";
382            case SETTING: return "Setting";
383            case CALCULATION: return "Calculation";
384            case UNSPECIFIED: return "Unspecified";
385            case NULL: return null;
386            default: return "?";
387          }
388        }
389    }
390
391  public static class DeviceMetricCategoryEnumFactory implements EnumFactory<DeviceMetricCategory> {
392    public DeviceMetricCategory fromCode(String codeString) throws IllegalArgumentException {
393      if (codeString == null || "".equals(codeString))
394            if (codeString == null || "".equals(codeString))
395                return null;
396        if ("measurement".equals(codeString))
397          return DeviceMetricCategory.MEASUREMENT;
398        if ("setting".equals(codeString))
399          return DeviceMetricCategory.SETTING;
400        if ("calculation".equals(codeString))
401          return DeviceMetricCategory.CALCULATION;
402        if ("unspecified".equals(codeString))
403          return DeviceMetricCategory.UNSPECIFIED;
404        throw new IllegalArgumentException("Unknown DeviceMetricCategory code '"+codeString+"'");
405        }
406        public Enumeration<DeviceMetricCategory> fromType(PrimitiveType<?> code) throws FHIRException {
407          if (code == null)
408            return null;
409          if (code.isEmpty())
410            return new Enumeration<DeviceMetricCategory>(this, DeviceMetricCategory.NULL, code);
411          String codeString = ((PrimitiveType) code).asStringValue();
412          if (codeString == null || "".equals(codeString))
413            return new Enumeration<DeviceMetricCategory>(this, DeviceMetricCategory.NULL, code);
414        if ("measurement".equals(codeString))
415          return new Enumeration<DeviceMetricCategory>(this, DeviceMetricCategory.MEASUREMENT, code);
416        if ("setting".equals(codeString))
417          return new Enumeration<DeviceMetricCategory>(this, DeviceMetricCategory.SETTING, code);
418        if ("calculation".equals(codeString))
419          return new Enumeration<DeviceMetricCategory>(this, DeviceMetricCategory.CALCULATION, code);
420        if ("unspecified".equals(codeString))
421          return new Enumeration<DeviceMetricCategory>(this, DeviceMetricCategory.UNSPECIFIED, code);
422        throw new FHIRException("Unknown DeviceMetricCategory code '"+codeString+"'");
423        }
424    public String toCode(DeviceMetricCategory code) {
425      if (code == DeviceMetricCategory.MEASUREMENT)
426        return "measurement";
427      if (code == DeviceMetricCategory.SETTING)
428        return "setting";
429      if (code == DeviceMetricCategory.CALCULATION)
430        return "calculation";
431      if (code == DeviceMetricCategory.UNSPECIFIED)
432        return "unspecified";
433      return "?";
434      }
435    public String toSystem(DeviceMetricCategory code) {
436      return code.getSystem();
437      }
438    }
439
440    public enum DeviceMetricOperationalStatus {
441        /**
442         * The DeviceMetric is operating and will generate Observations.
443         */
444        ON, 
445        /**
446         * The DeviceMetric is not operating.
447         */
448        OFF, 
449        /**
450         * The DeviceMetric is operating, but will not generate any Observations.
451         */
452        STANDBY, 
453        /**
454         * The DeviceMetric was entered in error.
455         */
456        ENTEREDINERROR, 
457        /**
458         * added to help the parsers with the generic types
459         */
460        NULL;
461        public static DeviceMetricOperationalStatus fromCode(String codeString) throws FHIRException {
462            if (codeString == null || "".equals(codeString))
463                return null;
464        if ("on".equals(codeString))
465          return ON;
466        if ("off".equals(codeString))
467          return OFF;
468        if ("standby".equals(codeString))
469          return STANDBY;
470        if ("entered-in-error".equals(codeString))
471          return ENTEREDINERROR;
472        if (Configuration.isAcceptInvalidEnums())
473          return null;
474        else
475          throw new FHIRException("Unknown DeviceMetricOperationalStatus code '"+codeString+"'");
476        }
477        public String toCode() {
478          switch (this) {
479            case ON: return "on";
480            case OFF: return "off";
481            case STANDBY: return "standby";
482            case ENTEREDINERROR: return "entered-in-error";
483            case NULL: return null;
484            default: return "?";
485          }
486        }
487        public String getSystem() {
488          switch (this) {
489            case ON: return "http://hl7.org/fhir/metric-operational-status";
490            case OFF: return "http://hl7.org/fhir/metric-operational-status";
491            case STANDBY: return "http://hl7.org/fhir/metric-operational-status";
492            case ENTEREDINERROR: return "http://hl7.org/fhir/metric-operational-status";
493            case NULL: return null;
494            default: return "?";
495          }
496        }
497        public String getDefinition() {
498          switch (this) {
499            case ON: return "The DeviceMetric is operating and will generate Observations.";
500            case OFF: return "The DeviceMetric is not operating.";
501            case STANDBY: return "The DeviceMetric is operating, but will not generate any Observations.";
502            case ENTEREDINERROR: return "The DeviceMetric was entered in error.";
503            case NULL: return null;
504            default: return "?";
505          }
506        }
507        public String getDisplay() {
508          switch (this) {
509            case ON: return "On";
510            case OFF: return "Off";
511            case STANDBY: return "Standby";
512            case ENTEREDINERROR: return "Entered In Error";
513            case NULL: return null;
514            default: return "?";
515          }
516        }
517    }
518
519  public static class DeviceMetricOperationalStatusEnumFactory implements EnumFactory<DeviceMetricOperationalStatus> {
520    public DeviceMetricOperationalStatus fromCode(String codeString) throws IllegalArgumentException {
521      if (codeString == null || "".equals(codeString))
522            if (codeString == null || "".equals(codeString))
523                return null;
524        if ("on".equals(codeString))
525          return DeviceMetricOperationalStatus.ON;
526        if ("off".equals(codeString))
527          return DeviceMetricOperationalStatus.OFF;
528        if ("standby".equals(codeString))
529          return DeviceMetricOperationalStatus.STANDBY;
530        if ("entered-in-error".equals(codeString))
531          return DeviceMetricOperationalStatus.ENTEREDINERROR;
532        throw new IllegalArgumentException("Unknown DeviceMetricOperationalStatus code '"+codeString+"'");
533        }
534        public Enumeration<DeviceMetricOperationalStatus> fromType(PrimitiveType<?> code) throws FHIRException {
535          if (code == null)
536            return null;
537          if (code.isEmpty())
538            return new Enumeration<DeviceMetricOperationalStatus>(this, DeviceMetricOperationalStatus.NULL, code);
539          String codeString = ((PrimitiveType) code).asStringValue();
540          if (codeString == null || "".equals(codeString))
541            return new Enumeration<DeviceMetricOperationalStatus>(this, DeviceMetricOperationalStatus.NULL, code);
542        if ("on".equals(codeString))
543          return new Enumeration<DeviceMetricOperationalStatus>(this, DeviceMetricOperationalStatus.ON, code);
544        if ("off".equals(codeString))
545          return new Enumeration<DeviceMetricOperationalStatus>(this, DeviceMetricOperationalStatus.OFF, code);
546        if ("standby".equals(codeString))
547          return new Enumeration<DeviceMetricOperationalStatus>(this, DeviceMetricOperationalStatus.STANDBY, code);
548        if ("entered-in-error".equals(codeString))
549          return new Enumeration<DeviceMetricOperationalStatus>(this, DeviceMetricOperationalStatus.ENTEREDINERROR, code);
550        throw new FHIRException("Unknown DeviceMetricOperationalStatus code '"+codeString+"'");
551        }
552    public String toCode(DeviceMetricOperationalStatus code) {
553      if (code == DeviceMetricOperationalStatus.ON)
554        return "on";
555      if (code == DeviceMetricOperationalStatus.OFF)
556        return "off";
557      if (code == DeviceMetricOperationalStatus.STANDBY)
558        return "standby";
559      if (code == DeviceMetricOperationalStatus.ENTEREDINERROR)
560        return "entered-in-error";
561      return "?";
562      }
563    public String toSystem(DeviceMetricOperationalStatus code) {
564      return code.getSystem();
565      }
566    }
567
568    @Block()
569    public static class DeviceMetricCalibrationComponent extends BackboneElement implements IBaseBackboneElement {
570        /**
571         * Describes the type of the calibration method.
572         */
573        @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false)
574        @Description(shortDefinition="unspecified | offset | gain | two-point", formalDefinition="Describes the type of the calibration method." )
575        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/metric-calibration-type")
576        protected Enumeration<DeviceMetricCalibrationType> type;
577
578        /**
579         * Describes the state of the calibration.
580         */
581        @Child(name = "state", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false)
582        @Description(shortDefinition="not-calibrated | calibration-required | calibrated | unspecified", formalDefinition="Describes the state of the calibration." )
583        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/metric-calibration-state")
584        protected Enumeration<DeviceMetricCalibrationState> state;
585
586        /**
587         * Describes the time last calibration has been performed.
588         */
589        @Child(name = "time", type = {InstantType.class}, order=3, min=0, max=1, modifier=false, summary=false)
590        @Description(shortDefinition="Describes the time last calibration has been performed", formalDefinition="Describes the time last calibration has been performed." )
591        protected InstantType time;
592
593        private static final long serialVersionUID = 1163986578L;
594
595    /**
596     * Constructor
597     */
598      public DeviceMetricCalibrationComponent() {
599        super();
600      }
601
602        /**
603         * @return {@link #type} (Describes the type of the calibration method.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
604         */
605        public Enumeration<DeviceMetricCalibrationType> getTypeElement() { 
606          if (this.type == null)
607            if (Configuration.errorOnAutoCreate())
608              throw new Error("Attempt to auto-create DeviceMetricCalibrationComponent.type");
609            else if (Configuration.doAutoCreate())
610              this.type = new Enumeration<DeviceMetricCalibrationType>(new DeviceMetricCalibrationTypeEnumFactory()); // bb
611          return this.type;
612        }
613
614        public boolean hasTypeElement() { 
615          return this.type != null && !this.type.isEmpty();
616        }
617
618        public boolean hasType() { 
619          return this.type != null && !this.type.isEmpty();
620        }
621
622        /**
623         * @param value {@link #type} (Describes the type of the calibration method.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
624         */
625        public DeviceMetricCalibrationComponent setTypeElement(Enumeration<DeviceMetricCalibrationType> value) { 
626          this.type = value;
627          return this;
628        }
629
630        /**
631         * @return Describes the type of the calibration method.
632         */
633        public DeviceMetricCalibrationType getType() { 
634          return this.type == null ? null : this.type.getValue();
635        }
636
637        /**
638         * @param value Describes the type of the calibration method.
639         */
640        public DeviceMetricCalibrationComponent setType(DeviceMetricCalibrationType value) { 
641          if (value == null)
642            this.type = null;
643          else {
644            if (this.type == null)
645              this.type = new Enumeration<DeviceMetricCalibrationType>(new DeviceMetricCalibrationTypeEnumFactory());
646            this.type.setValue(value);
647          }
648          return this;
649        }
650
651        /**
652         * @return {@link #state} (Describes the state of the calibration.). This is the underlying object with id, value and extensions. The accessor "getState" gives direct access to the value
653         */
654        public Enumeration<DeviceMetricCalibrationState> getStateElement() { 
655          if (this.state == null)
656            if (Configuration.errorOnAutoCreate())
657              throw new Error("Attempt to auto-create DeviceMetricCalibrationComponent.state");
658            else if (Configuration.doAutoCreate())
659              this.state = new Enumeration<DeviceMetricCalibrationState>(new DeviceMetricCalibrationStateEnumFactory()); // bb
660          return this.state;
661        }
662
663        public boolean hasStateElement() { 
664          return this.state != null && !this.state.isEmpty();
665        }
666
667        public boolean hasState() { 
668          return this.state != null && !this.state.isEmpty();
669        }
670
671        /**
672         * @param value {@link #state} (Describes the state of the calibration.). This is the underlying object with id, value and extensions. The accessor "getState" gives direct access to the value
673         */
674        public DeviceMetricCalibrationComponent setStateElement(Enumeration<DeviceMetricCalibrationState> value) { 
675          this.state = value;
676          return this;
677        }
678
679        /**
680         * @return Describes the state of the calibration.
681         */
682        public DeviceMetricCalibrationState getState() { 
683          return this.state == null ? null : this.state.getValue();
684        }
685
686        /**
687         * @param value Describes the state of the calibration.
688         */
689        public DeviceMetricCalibrationComponent setState(DeviceMetricCalibrationState value) { 
690          if (value == null)
691            this.state = null;
692          else {
693            if (this.state == null)
694              this.state = new Enumeration<DeviceMetricCalibrationState>(new DeviceMetricCalibrationStateEnumFactory());
695            this.state.setValue(value);
696          }
697          return this;
698        }
699
700        /**
701         * @return {@link #time} (Describes the time last calibration has been performed.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value
702         */
703        public InstantType getTimeElement() { 
704          if (this.time == null)
705            if (Configuration.errorOnAutoCreate())
706              throw new Error("Attempt to auto-create DeviceMetricCalibrationComponent.time");
707            else if (Configuration.doAutoCreate())
708              this.time = new InstantType(); // bb
709          return this.time;
710        }
711
712        public boolean hasTimeElement() { 
713          return this.time != null && !this.time.isEmpty();
714        }
715
716        public boolean hasTime() { 
717          return this.time != null && !this.time.isEmpty();
718        }
719
720        /**
721         * @param value {@link #time} (Describes the time last calibration has been performed.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value
722         */
723        public DeviceMetricCalibrationComponent setTimeElement(InstantType value) { 
724          this.time = value;
725          return this;
726        }
727
728        /**
729         * @return Describes the time last calibration has been performed.
730         */
731        public Date getTime() { 
732          return this.time == null ? null : this.time.getValue();
733        }
734
735        /**
736         * @param value Describes the time last calibration has been performed.
737         */
738        public DeviceMetricCalibrationComponent setTime(Date value) { 
739          if (value == null)
740            this.time = null;
741          else {
742            if (this.time == null)
743              this.time = new InstantType();
744            this.time.setValue(value);
745          }
746          return this;
747        }
748
749        protected void listChildren(List<Property> children) {
750          super.listChildren(children);
751          children.add(new Property("type", "code", "Describes the type of the calibration method.", 0, 1, type));
752          children.add(new Property("state", "code", "Describes the state of the calibration.", 0, 1, state));
753          children.add(new Property("time", "instant", "Describes the time last calibration has been performed.", 0, 1, time));
754        }
755
756        @Override
757        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
758          switch (_hash) {
759          case 3575610: /*type*/  return new Property("type", "code", "Describes the type of the calibration method.", 0, 1, type);
760          case 109757585: /*state*/  return new Property("state", "code", "Describes the state of the calibration.", 0, 1, state);
761          case 3560141: /*time*/  return new Property("time", "instant", "Describes the time last calibration has been performed.", 0, 1, time);
762          default: return super.getNamedProperty(_hash, _name, _checkValid);
763          }
764
765        }
766
767      @Override
768      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
769        switch (hash) {
770        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<DeviceMetricCalibrationType>
771        case 109757585: /*state*/ return this.state == null ? new Base[0] : new Base[] {this.state}; // Enumeration<DeviceMetricCalibrationState>
772        case 3560141: /*time*/ return this.time == null ? new Base[0] : new Base[] {this.time}; // InstantType
773        default: return super.getProperty(hash, name, checkValid);
774        }
775
776      }
777
778      @Override
779      public Base setProperty(int hash, String name, Base value) throws FHIRException {
780        switch (hash) {
781        case 3575610: // type
782          value = new DeviceMetricCalibrationTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
783          this.type = (Enumeration) value; // Enumeration<DeviceMetricCalibrationType>
784          return value;
785        case 109757585: // state
786          value = new DeviceMetricCalibrationStateEnumFactory().fromType(TypeConvertor.castToCode(value));
787          this.state = (Enumeration) value; // Enumeration<DeviceMetricCalibrationState>
788          return value;
789        case 3560141: // time
790          this.time = TypeConvertor.castToInstant(value); // InstantType
791          return value;
792        default: return super.setProperty(hash, name, value);
793        }
794
795      }
796
797      @Override
798      public Base setProperty(String name, Base value) throws FHIRException {
799        if (name.equals("type")) {
800          value = new DeviceMetricCalibrationTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
801          this.type = (Enumeration) value; // Enumeration<DeviceMetricCalibrationType>
802        } else if (name.equals("state")) {
803          value = new DeviceMetricCalibrationStateEnumFactory().fromType(TypeConvertor.castToCode(value));
804          this.state = (Enumeration) value; // Enumeration<DeviceMetricCalibrationState>
805        } else if (name.equals("time")) {
806          this.time = TypeConvertor.castToInstant(value); // InstantType
807        } else
808          return super.setProperty(name, value);
809        return value;
810      }
811
812      @Override
813      public Base makeProperty(int hash, String name) throws FHIRException {
814        switch (hash) {
815        case 3575610:  return getTypeElement();
816        case 109757585:  return getStateElement();
817        case 3560141:  return getTimeElement();
818        default: return super.makeProperty(hash, name);
819        }
820
821      }
822
823      @Override
824      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
825        switch (hash) {
826        case 3575610: /*type*/ return new String[] {"code"};
827        case 109757585: /*state*/ return new String[] {"code"};
828        case 3560141: /*time*/ return new String[] {"instant"};
829        default: return super.getTypesForProperty(hash, name);
830        }
831
832      }
833
834      @Override
835      public Base addChild(String name) throws FHIRException {
836        if (name.equals("type")) {
837          throw new FHIRException("Cannot call addChild on a singleton property DeviceMetric.calibration.type");
838        }
839        else if (name.equals("state")) {
840          throw new FHIRException("Cannot call addChild on a singleton property DeviceMetric.calibration.state");
841        }
842        else if (name.equals("time")) {
843          throw new FHIRException("Cannot call addChild on a singleton property DeviceMetric.calibration.time");
844        }
845        else
846          return super.addChild(name);
847      }
848
849      public DeviceMetricCalibrationComponent copy() {
850        DeviceMetricCalibrationComponent dst = new DeviceMetricCalibrationComponent();
851        copyValues(dst);
852        return dst;
853      }
854
855      public void copyValues(DeviceMetricCalibrationComponent dst) {
856        super.copyValues(dst);
857        dst.type = type == null ? null : type.copy();
858        dst.state = state == null ? null : state.copy();
859        dst.time = time == null ? null : time.copy();
860      }
861
862      @Override
863      public boolean equalsDeep(Base other_) {
864        if (!super.equalsDeep(other_))
865          return false;
866        if (!(other_ instanceof DeviceMetricCalibrationComponent))
867          return false;
868        DeviceMetricCalibrationComponent o = (DeviceMetricCalibrationComponent) other_;
869        return compareDeep(type, o.type, true) && compareDeep(state, o.state, true) && compareDeep(time, o.time, true)
870          ;
871      }
872
873      @Override
874      public boolean equalsShallow(Base other_) {
875        if (!super.equalsShallow(other_))
876          return false;
877        if (!(other_ instanceof DeviceMetricCalibrationComponent))
878          return false;
879        DeviceMetricCalibrationComponent o = (DeviceMetricCalibrationComponent) other_;
880        return compareValues(type, o.type, true) && compareValues(state, o.state, true) && compareValues(time, o.time, true)
881          ;
882      }
883
884      public boolean isEmpty() {
885        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, state, time);
886      }
887
888  public String fhirType() {
889    return "DeviceMetric.calibration";
890
891  }
892
893  }
894
895    /**
896     * Instance identifiers assigned to a device, by the device or gateway software, manufacturers, other organizations or owners. For example, handle ID.
897     */
898    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
899    @Description(shortDefinition="Instance identifier", formalDefinition="Instance identifiers assigned to a device, by the device or gateway software, manufacturers, other organizations or owners. For example, handle ID." )
900    protected List<Identifier> identifier;
901
902    /**
903     * Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.
904     */
905    @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true)
906    @Description(shortDefinition="Identity of metric, for example Heart Rate or PEEP Setting", formalDefinition="Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc." )
907    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/devicemetric-type")
908    protected CodeableConcept type;
909
910    /**
911     * Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.
912     */
913    @Child(name = "unit", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true)
914    @Description(shortDefinition="Unit of Measure for the Metric", formalDefinition="Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc." )
915    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ucum-units")
916    protected CodeableConcept unit;
917
918    /**
919     * Describes the link to the Device.  This is also known as a channel device.
920     */
921    @Child(name = "device", type = {Device.class}, order=3, min=1, max=1, modifier=false, summary=true)
922    @Description(shortDefinition="Describes the link to the Device", formalDefinition="Describes the link to the Device.  This is also known as a channel device." )
923    protected Reference device;
924
925    /**
926     * Indicates current operational state of the device. For example: On, Off, Standby, etc.
927     */
928    @Child(name = "operationalStatus", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=true)
929    @Description(shortDefinition="on | off | standby | entered-in-error", formalDefinition="Indicates current operational state of the device. For example: On, Off, Standby, etc." )
930    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/metric-operational-status")
931    protected Enumeration<DeviceMetricOperationalStatus> operationalStatus;
932
933    /**
934     * The preferred color associated with the metric (e.g., display color). This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth; the metrics are displayed in different characteristic colors, such as HR in blue, BP in green, and PR and SpO2 in magenta.
935     */
936    @Child(name = "color", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false)
937    @Description(shortDefinition="Color name (from CSS4) or #RRGGBB code", formalDefinition="The preferred color associated with the metric (e.g., display color). This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth; the metrics are displayed in different characteristic colors, such as HR in blue, BP in green, and PR and SpO2 in magenta." )
938    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/color-codes")
939    protected CodeType color;
940
941    /**
942     * Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.
943     */
944    @Child(name = "category", type = {CodeType.class}, order=6, min=1, max=1, modifier=false, summary=true)
945    @Description(shortDefinition="measurement | setting | calculation | unspecified", formalDefinition="Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation." )
946    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/metric-category")
947    protected Enumeration<DeviceMetricCategory> category;
948
949    /**
950     * The frequency at which the metric is taken or recorded. Devices measure metrics at a wide range of frequencies; for example, an ECG might sample measurements in the millisecond range, while an NIBP might trigger only once an hour. Less often, the measurementFrequency may be based on a unit other than time, such as distance (e.g. for a measuring wheel). The update period may be different than the measurement frequency, if the device does not update the published observed value with the same frequency as it was measured.
951     */
952    @Child(name = "measurementFrequency", type = {Quantity.class}, order=7, min=0, max=1, modifier=false, summary=false)
953    @Description(shortDefinition="Indicates how often the metric is taken or recorded", formalDefinition="The frequency at which the metric is taken or recorded. Devices measure metrics at a wide range of frequencies; for example, an ECG might sample measurements in the millisecond range, while an NIBP might trigger only once an hour. Less often, the measurementFrequency may be based on a unit other than time, such as distance (e.g. for a measuring wheel). The update period may be different than the measurement frequency, if the device does not update the published observed value with the same frequency as it was measured." )
954    protected Quantity measurementFrequency;
955
956    /**
957     * Describes the calibrations that have been performed or that are required to be performed.
958     */
959    @Child(name = "calibration", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
960    @Description(shortDefinition="Describes the calibrations that have been performed or that are required to be performed", formalDefinition="Describes the calibrations that have been performed or that are required to be performed." )
961    protected List<DeviceMetricCalibrationComponent> calibration;
962
963    private static final long serialVersionUID = 2109169775L;
964
965  /**
966   * Constructor
967   */
968    public DeviceMetric() {
969      super();
970    }
971
972  /**
973   * Constructor
974   */
975    public DeviceMetric(CodeableConcept type, Reference device, DeviceMetricCategory category) {
976      super();
977      this.setType(type);
978      this.setDevice(device);
979      this.setCategory(category);
980    }
981
982    /**
983     * @return {@link #identifier} (Instance identifiers assigned to a device, by the device or gateway software, manufacturers, other organizations or owners. For example, handle ID.)
984     */
985    public List<Identifier> getIdentifier() { 
986      if (this.identifier == null)
987        this.identifier = new ArrayList<Identifier>();
988      return this.identifier;
989    }
990
991    /**
992     * @return Returns a reference to <code>this</code> for easy method chaining
993     */
994    public DeviceMetric setIdentifier(List<Identifier> theIdentifier) { 
995      this.identifier = theIdentifier;
996      return this;
997    }
998
999    public boolean hasIdentifier() { 
1000      if (this.identifier == null)
1001        return false;
1002      for (Identifier item : this.identifier)
1003        if (!item.isEmpty())
1004          return true;
1005      return false;
1006    }
1007
1008    public Identifier addIdentifier() { //3
1009      Identifier t = new Identifier();
1010      if (this.identifier == null)
1011        this.identifier = new ArrayList<Identifier>();
1012      this.identifier.add(t);
1013      return t;
1014    }
1015
1016    public DeviceMetric addIdentifier(Identifier t) { //3
1017      if (t == null)
1018        return this;
1019      if (this.identifier == null)
1020        this.identifier = new ArrayList<Identifier>();
1021      this.identifier.add(t);
1022      return this;
1023    }
1024
1025    /**
1026     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1027     */
1028    public Identifier getIdentifierFirstRep() { 
1029      if (getIdentifier().isEmpty()) {
1030        addIdentifier();
1031      }
1032      return getIdentifier().get(0);
1033    }
1034
1035    /**
1036     * @return {@link #type} (Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.)
1037     */
1038    public CodeableConcept getType() { 
1039      if (this.type == null)
1040        if (Configuration.errorOnAutoCreate())
1041          throw new Error("Attempt to auto-create DeviceMetric.type");
1042        else if (Configuration.doAutoCreate())
1043          this.type = new CodeableConcept(); // cc
1044      return this.type;
1045    }
1046
1047    public boolean hasType() { 
1048      return this.type != null && !this.type.isEmpty();
1049    }
1050
1051    /**
1052     * @param value {@link #type} (Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.)
1053     */
1054    public DeviceMetric setType(CodeableConcept value) { 
1055      this.type = value;
1056      return this;
1057    }
1058
1059    /**
1060     * @return {@link #unit} (Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.)
1061     */
1062    public CodeableConcept getUnit() { 
1063      if (this.unit == null)
1064        if (Configuration.errorOnAutoCreate())
1065          throw new Error("Attempt to auto-create DeviceMetric.unit");
1066        else if (Configuration.doAutoCreate())
1067          this.unit = new CodeableConcept(); // cc
1068      return this.unit;
1069    }
1070
1071    public boolean hasUnit() { 
1072      return this.unit != null && !this.unit.isEmpty();
1073    }
1074
1075    /**
1076     * @param value {@link #unit} (Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.)
1077     */
1078    public DeviceMetric setUnit(CodeableConcept value) { 
1079      this.unit = value;
1080      return this;
1081    }
1082
1083    /**
1084     * @return {@link #device} (Describes the link to the Device.  This is also known as a channel device.)
1085     */
1086    public Reference getDevice() { 
1087      if (this.device == null)
1088        if (Configuration.errorOnAutoCreate())
1089          throw new Error("Attempt to auto-create DeviceMetric.device");
1090        else if (Configuration.doAutoCreate())
1091          this.device = new Reference(); // cc
1092      return this.device;
1093    }
1094
1095    public boolean hasDevice() { 
1096      return this.device != null && !this.device.isEmpty();
1097    }
1098
1099    /**
1100     * @param value {@link #device} (Describes the link to the Device.  This is also known as a channel device.)
1101     */
1102    public DeviceMetric setDevice(Reference value) { 
1103      this.device = value;
1104      return this;
1105    }
1106
1107    /**
1108     * @return {@link #operationalStatus} (Indicates current operational state of the device. For example: On, Off, Standby, etc.). This is the underlying object with id, value and extensions. The accessor "getOperationalStatus" gives direct access to the value
1109     */
1110    public Enumeration<DeviceMetricOperationalStatus> getOperationalStatusElement() { 
1111      if (this.operationalStatus == null)
1112        if (Configuration.errorOnAutoCreate())
1113          throw new Error("Attempt to auto-create DeviceMetric.operationalStatus");
1114        else if (Configuration.doAutoCreate())
1115          this.operationalStatus = new Enumeration<DeviceMetricOperationalStatus>(new DeviceMetricOperationalStatusEnumFactory()); // bb
1116      return this.operationalStatus;
1117    }
1118
1119    public boolean hasOperationalStatusElement() { 
1120      return this.operationalStatus != null && !this.operationalStatus.isEmpty();
1121    }
1122
1123    public boolean hasOperationalStatus() { 
1124      return this.operationalStatus != null && !this.operationalStatus.isEmpty();
1125    }
1126
1127    /**
1128     * @param value {@link #operationalStatus} (Indicates current operational state of the device. For example: On, Off, Standby, etc.). This is the underlying object with id, value and extensions. The accessor "getOperationalStatus" gives direct access to the value
1129     */
1130    public DeviceMetric setOperationalStatusElement(Enumeration<DeviceMetricOperationalStatus> value) { 
1131      this.operationalStatus = value;
1132      return this;
1133    }
1134
1135    /**
1136     * @return Indicates current operational state of the device. For example: On, Off, Standby, etc.
1137     */
1138    public DeviceMetricOperationalStatus getOperationalStatus() { 
1139      return this.operationalStatus == null ? null : this.operationalStatus.getValue();
1140    }
1141
1142    /**
1143     * @param value Indicates current operational state of the device. For example: On, Off, Standby, etc.
1144     */
1145    public DeviceMetric setOperationalStatus(DeviceMetricOperationalStatus value) { 
1146      if (value == null)
1147        this.operationalStatus = null;
1148      else {
1149        if (this.operationalStatus == null)
1150          this.operationalStatus = new Enumeration<DeviceMetricOperationalStatus>(new DeviceMetricOperationalStatusEnumFactory());
1151        this.operationalStatus.setValue(value);
1152      }
1153      return this;
1154    }
1155
1156    /**
1157     * @return {@link #color} (The preferred color associated with the metric (e.g., display color). This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth; the metrics are displayed in different characteristic colors, such as HR in blue, BP in green, and PR and SpO2 in magenta.). This is the underlying object with id, value and extensions. The accessor "getColor" gives direct access to the value
1158     */
1159    public CodeType getColorElement() { 
1160      if (this.color == null)
1161        if (Configuration.errorOnAutoCreate())
1162          throw new Error("Attempt to auto-create DeviceMetric.color");
1163        else if (Configuration.doAutoCreate())
1164          this.color = new CodeType(); // bb
1165      return this.color;
1166    }
1167
1168    public boolean hasColorElement() { 
1169      return this.color != null && !this.color.isEmpty();
1170    }
1171
1172    public boolean hasColor() { 
1173      return this.color != null && !this.color.isEmpty();
1174    }
1175
1176    /**
1177     * @param value {@link #color} (The preferred color associated with the metric (e.g., display color). This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth; the metrics are displayed in different characteristic colors, such as HR in blue, BP in green, and PR and SpO2 in magenta.). This is the underlying object with id, value and extensions. The accessor "getColor" gives direct access to the value
1178     */
1179    public DeviceMetric setColorElement(CodeType value) { 
1180      this.color = value;
1181      return this;
1182    }
1183
1184    /**
1185     * @return The preferred color associated with the metric (e.g., display color). This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth; the metrics are displayed in different characteristic colors, such as HR in blue, BP in green, and PR and SpO2 in magenta.
1186     */
1187    public String getColor() { 
1188      return this.color == null ? null : this.color.getValue();
1189    }
1190
1191    /**
1192     * @param value The preferred color associated with the metric (e.g., display color). This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth; the metrics are displayed in different characteristic colors, such as HR in blue, BP in green, and PR and SpO2 in magenta.
1193     */
1194    public DeviceMetric setColor(String value) { 
1195      if (Utilities.noString(value))
1196        this.color = null;
1197      else {
1198        if (this.color == null)
1199          this.color = new CodeType();
1200        this.color.setValue(value);
1201      }
1202      return this;
1203    }
1204
1205    /**
1206     * @return {@link #category} (Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value
1207     */
1208    public Enumeration<DeviceMetricCategory> getCategoryElement() { 
1209      if (this.category == null)
1210        if (Configuration.errorOnAutoCreate())
1211          throw new Error("Attempt to auto-create DeviceMetric.category");
1212        else if (Configuration.doAutoCreate())
1213          this.category = new Enumeration<DeviceMetricCategory>(new DeviceMetricCategoryEnumFactory()); // bb
1214      return this.category;
1215    }
1216
1217    public boolean hasCategoryElement() { 
1218      return this.category != null && !this.category.isEmpty();
1219    }
1220
1221    public boolean hasCategory() { 
1222      return this.category != null && !this.category.isEmpty();
1223    }
1224
1225    /**
1226     * @param value {@link #category} (Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value
1227     */
1228    public DeviceMetric setCategoryElement(Enumeration<DeviceMetricCategory> value) { 
1229      this.category = value;
1230      return this;
1231    }
1232
1233    /**
1234     * @return Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.
1235     */
1236    public DeviceMetricCategory getCategory() { 
1237      return this.category == null ? null : this.category.getValue();
1238    }
1239
1240    /**
1241     * @param value Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.
1242     */
1243    public DeviceMetric setCategory(DeviceMetricCategory value) { 
1244        if (this.category == null)
1245          this.category = new Enumeration<DeviceMetricCategory>(new DeviceMetricCategoryEnumFactory());
1246        this.category.setValue(value);
1247      return this;
1248    }
1249
1250    /**
1251     * @return {@link #measurementFrequency} (The frequency at which the metric is taken or recorded. Devices measure metrics at a wide range of frequencies; for example, an ECG might sample measurements in the millisecond range, while an NIBP might trigger only once an hour. Less often, the measurementFrequency may be based on a unit other than time, such as distance (e.g. for a measuring wheel). The update period may be different than the measurement frequency, if the device does not update the published observed value with the same frequency as it was measured.)
1252     */
1253    public Quantity getMeasurementFrequency() { 
1254      if (this.measurementFrequency == null)
1255        if (Configuration.errorOnAutoCreate())
1256          throw new Error("Attempt to auto-create DeviceMetric.measurementFrequency");
1257        else if (Configuration.doAutoCreate())
1258          this.measurementFrequency = new Quantity(); // cc
1259      return this.measurementFrequency;
1260    }
1261
1262    public boolean hasMeasurementFrequency() { 
1263      return this.measurementFrequency != null && !this.measurementFrequency.isEmpty();
1264    }
1265
1266    /**
1267     * @param value {@link #measurementFrequency} (The frequency at which the metric is taken or recorded. Devices measure metrics at a wide range of frequencies; for example, an ECG might sample measurements in the millisecond range, while an NIBP might trigger only once an hour. Less often, the measurementFrequency may be based on a unit other than time, such as distance (e.g. for a measuring wheel). The update period may be different than the measurement frequency, if the device does not update the published observed value with the same frequency as it was measured.)
1268     */
1269    public DeviceMetric setMeasurementFrequency(Quantity value) { 
1270      this.measurementFrequency = value;
1271      return this;
1272    }
1273
1274    /**
1275     * @return {@link #calibration} (Describes the calibrations that have been performed or that are required to be performed.)
1276     */
1277    public List<DeviceMetricCalibrationComponent> getCalibration() { 
1278      if (this.calibration == null)
1279        this.calibration = new ArrayList<DeviceMetricCalibrationComponent>();
1280      return this.calibration;
1281    }
1282
1283    /**
1284     * @return Returns a reference to <code>this</code> for easy method chaining
1285     */
1286    public DeviceMetric setCalibration(List<DeviceMetricCalibrationComponent> theCalibration) { 
1287      this.calibration = theCalibration;
1288      return this;
1289    }
1290
1291    public boolean hasCalibration() { 
1292      if (this.calibration == null)
1293        return false;
1294      for (DeviceMetricCalibrationComponent item : this.calibration)
1295        if (!item.isEmpty())
1296          return true;
1297      return false;
1298    }
1299
1300    public DeviceMetricCalibrationComponent addCalibration() { //3
1301      DeviceMetricCalibrationComponent t = new DeviceMetricCalibrationComponent();
1302      if (this.calibration == null)
1303        this.calibration = new ArrayList<DeviceMetricCalibrationComponent>();
1304      this.calibration.add(t);
1305      return t;
1306    }
1307
1308    public DeviceMetric addCalibration(DeviceMetricCalibrationComponent t) { //3
1309      if (t == null)
1310        return this;
1311      if (this.calibration == null)
1312        this.calibration = new ArrayList<DeviceMetricCalibrationComponent>();
1313      this.calibration.add(t);
1314      return this;
1315    }
1316
1317    /**
1318     * @return The first repetition of repeating field {@link #calibration}, creating it if it does not already exist {3}
1319     */
1320    public DeviceMetricCalibrationComponent getCalibrationFirstRep() { 
1321      if (getCalibration().isEmpty()) {
1322        addCalibration();
1323      }
1324      return getCalibration().get(0);
1325    }
1326
1327      protected void listChildren(List<Property> children) {
1328        super.listChildren(children);
1329        children.add(new Property("identifier", "Identifier", "Instance identifiers assigned to a device, by the device or gateway software, manufacturers, other organizations or owners. For example, handle ID.", 0, java.lang.Integer.MAX_VALUE, identifier));
1330        children.add(new Property("type", "CodeableConcept", "Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.", 0, 1, type));
1331        children.add(new Property("unit", "CodeableConcept", "Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.", 0, 1, unit));
1332        children.add(new Property("device", "Reference(Device)", "Describes the link to the Device.  This is also known as a channel device.", 0, 1, device));
1333        children.add(new Property("operationalStatus", "code", "Indicates current operational state of the device. For example: On, Off, Standby, etc.", 0, 1, operationalStatus));
1334        children.add(new Property("color", "code", "The preferred color associated with the metric (e.g., display color). This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth; the metrics are displayed in different characteristic colors, such as HR in blue, BP in green, and PR and SpO2 in magenta.", 0, 1, color));
1335        children.add(new Property("category", "code", "Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.", 0, 1, category));
1336        children.add(new Property("measurementFrequency", "Quantity", "The frequency at which the metric is taken or recorded. Devices measure metrics at a wide range of frequencies; for example, an ECG might sample measurements in the millisecond range, while an NIBP might trigger only once an hour. Less often, the measurementFrequency may be based on a unit other than time, such as distance (e.g. for a measuring wheel). The update period may be different than the measurement frequency, if the device does not update the published observed value with the same frequency as it was measured.", 0, 1, measurementFrequency));
1337        children.add(new Property("calibration", "", "Describes the calibrations that have been performed or that are required to be performed.", 0, java.lang.Integer.MAX_VALUE, calibration));
1338      }
1339
1340      @Override
1341      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1342        switch (_hash) {
1343        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Instance identifiers assigned to a device, by the device or gateway software, manufacturers, other organizations or owners. For example, handle ID.", 0, java.lang.Integer.MAX_VALUE, identifier);
1344        case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.", 0, 1, type);
1345        case 3594628: /*unit*/  return new Property("unit", "CodeableConcept", "Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.", 0, 1, unit);
1346        case -1335157162: /*device*/  return new Property("device", "Reference(Device)", "Describes the link to the Device.  This is also known as a channel device.", 0, 1, device);
1347        case -2103166364: /*operationalStatus*/  return new Property("operationalStatus", "code", "Indicates current operational state of the device. For example: On, Off, Standby, etc.", 0, 1, operationalStatus);
1348        case 94842723: /*color*/  return new Property("color", "code", "The preferred color associated with the metric (e.g., display color). This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth; the metrics are displayed in different characteristic colors, such as HR in blue, BP in green, and PR and SpO2 in magenta.", 0, 1, color);
1349        case 50511102: /*category*/  return new Property("category", "code", "Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.", 0, 1, category);
1350        case 1766341888: /*measurementFrequency*/  return new Property("measurementFrequency", "Quantity", "The frequency at which the metric is taken or recorded. Devices measure metrics at a wide range of frequencies; for example, an ECG might sample measurements in the millisecond range, while an NIBP might trigger only once an hour. Less often, the measurementFrequency may be based on a unit other than time, such as distance (e.g. for a measuring wheel). The update period may be different than the measurement frequency, if the device does not update the published observed value with the same frequency as it was measured.", 0, 1, measurementFrequency);
1351        case 1421318634: /*calibration*/  return new Property("calibration", "", "Describes the calibrations that have been performed or that are required to be performed.", 0, java.lang.Integer.MAX_VALUE, calibration);
1352        default: return super.getNamedProperty(_hash, _name, _checkValid);
1353        }
1354
1355      }
1356
1357      @Override
1358      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1359        switch (hash) {
1360        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1361        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1362        case 3594628: /*unit*/ return this.unit == null ? new Base[0] : new Base[] {this.unit}; // CodeableConcept
1363        case -1335157162: /*device*/ return this.device == null ? new Base[0] : new Base[] {this.device}; // Reference
1364        case -2103166364: /*operationalStatus*/ return this.operationalStatus == null ? new Base[0] : new Base[] {this.operationalStatus}; // Enumeration<DeviceMetricOperationalStatus>
1365        case 94842723: /*color*/ return this.color == null ? new Base[0] : new Base[] {this.color}; // CodeType
1366        case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // Enumeration<DeviceMetricCategory>
1367        case 1766341888: /*measurementFrequency*/ return this.measurementFrequency == null ? new Base[0] : new Base[] {this.measurementFrequency}; // Quantity
1368        case 1421318634: /*calibration*/ return this.calibration == null ? new Base[0] : this.calibration.toArray(new Base[this.calibration.size()]); // DeviceMetricCalibrationComponent
1369        default: return super.getProperty(hash, name, checkValid);
1370        }
1371
1372      }
1373
1374      @Override
1375      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1376        switch (hash) {
1377        case -1618432855: // identifier
1378          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1379          return value;
1380        case 3575610: // type
1381          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1382          return value;
1383        case 3594628: // unit
1384          this.unit = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1385          return value;
1386        case -1335157162: // device
1387          this.device = TypeConvertor.castToReference(value); // Reference
1388          return value;
1389        case -2103166364: // operationalStatus
1390          value = new DeviceMetricOperationalStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1391          this.operationalStatus = (Enumeration) value; // Enumeration<DeviceMetricOperationalStatus>
1392          return value;
1393        case 94842723: // color
1394          this.color = TypeConvertor.castToCode(value); // CodeType
1395          return value;
1396        case 50511102: // category
1397          value = new DeviceMetricCategoryEnumFactory().fromType(TypeConvertor.castToCode(value));
1398          this.category = (Enumeration) value; // Enumeration<DeviceMetricCategory>
1399          return value;
1400        case 1766341888: // measurementFrequency
1401          this.measurementFrequency = TypeConvertor.castToQuantity(value); // Quantity
1402          return value;
1403        case 1421318634: // calibration
1404          this.getCalibration().add((DeviceMetricCalibrationComponent) value); // DeviceMetricCalibrationComponent
1405          return value;
1406        default: return super.setProperty(hash, name, value);
1407        }
1408
1409      }
1410
1411      @Override
1412      public Base setProperty(String name, Base value) throws FHIRException {
1413        if (name.equals("identifier")) {
1414          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1415        } else if (name.equals("type")) {
1416          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1417        } else if (name.equals("unit")) {
1418          this.unit = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1419        } else if (name.equals("device")) {
1420          this.device = TypeConvertor.castToReference(value); // Reference
1421        } else if (name.equals("operationalStatus")) {
1422          value = new DeviceMetricOperationalStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1423          this.operationalStatus = (Enumeration) value; // Enumeration<DeviceMetricOperationalStatus>
1424        } else if (name.equals("color")) {
1425          this.color = TypeConvertor.castToCode(value); // CodeType
1426        } else if (name.equals("category")) {
1427          value = new DeviceMetricCategoryEnumFactory().fromType(TypeConvertor.castToCode(value));
1428          this.category = (Enumeration) value; // Enumeration<DeviceMetricCategory>
1429        } else if (name.equals("measurementFrequency")) {
1430          this.measurementFrequency = TypeConvertor.castToQuantity(value); // Quantity
1431        } else if (name.equals("calibration")) {
1432          this.getCalibration().add((DeviceMetricCalibrationComponent) value);
1433        } else
1434          return super.setProperty(name, value);
1435        return value;
1436      }
1437
1438      @Override
1439      public Base makeProperty(int hash, String name) throws FHIRException {
1440        switch (hash) {
1441        case -1618432855:  return addIdentifier(); 
1442        case 3575610:  return getType();
1443        case 3594628:  return getUnit();
1444        case -1335157162:  return getDevice();
1445        case -2103166364:  return getOperationalStatusElement();
1446        case 94842723:  return getColorElement();
1447        case 50511102:  return getCategoryElement();
1448        case 1766341888:  return getMeasurementFrequency();
1449        case 1421318634:  return addCalibration(); 
1450        default: return super.makeProperty(hash, name);
1451        }
1452
1453      }
1454
1455      @Override
1456      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1457        switch (hash) {
1458        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1459        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1460        case 3594628: /*unit*/ return new String[] {"CodeableConcept"};
1461        case -1335157162: /*device*/ return new String[] {"Reference"};
1462        case -2103166364: /*operationalStatus*/ return new String[] {"code"};
1463        case 94842723: /*color*/ return new String[] {"code"};
1464        case 50511102: /*category*/ return new String[] {"code"};
1465        case 1766341888: /*measurementFrequency*/ return new String[] {"Quantity"};
1466        case 1421318634: /*calibration*/ return new String[] {};
1467        default: return super.getTypesForProperty(hash, name);
1468        }
1469
1470      }
1471
1472      @Override
1473      public Base addChild(String name) throws FHIRException {
1474        if (name.equals("identifier")) {
1475          return addIdentifier();
1476        }
1477        else if (name.equals("type")) {
1478          this.type = new CodeableConcept();
1479          return this.type;
1480        }
1481        else if (name.equals("unit")) {
1482          this.unit = new CodeableConcept();
1483          return this.unit;
1484        }
1485        else if (name.equals("device")) {
1486          this.device = new Reference();
1487          return this.device;
1488        }
1489        else if (name.equals("operationalStatus")) {
1490          throw new FHIRException("Cannot call addChild on a singleton property DeviceMetric.operationalStatus");
1491        }
1492        else if (name.equals("color")) {
1493          throw new FHIRException("Cannot call addChild on a singleton property DeviceMetric.color");
1494        }
1495        else if (name.equals("category")) {
1496          throw new FHIRException("Cannot call addChild on a singleton property DeviceMetric.category");
1497        }
1498        else if (name.equals("measurementFrequency")) {
1499          this.measurementFrequency = new Quantity();
1500          return this.measurementFrequency;
1501        }
1502        else if (name.equals("calibration")) {
1503          return addCalibration();
1504        }
1505        else
1506          return super.addChild(name);
1507      }
1508
1509  public String fhirType() {
1510    return "DeviceMetric";
1511
1512  }
1513
1514      public DeviceMetric copy() {
1515        DeviceMetric dst = new DeviceMetric();
1516        copyValues(dst);
1517        return dst;
1518      }
1519
1520      public void copyValues(DeviceMetric dst) {
1521        super.copyValues(dst);
1522        if (identifier != null) {
1523          dst.identifier = new ArrayList<Identifier>();
1524          for (Identifier i : identifier)
1525            dst.identifier.add(i.copy());
1526        };
1527        dst.type = type == null ? null : type.copy();
1528        dst.unit = unit == null ? null : unit.copy();
1529        dst.device = device == null ? null : device.copy();
1530        dst.operationalStatus = operationalStatus == null ? null : operationalStatus.copy();
1531        dst.color = color == null ? null : color.copy();
1532        dst.category = category == null ? null : category.copy();
1533        dst.measurementFrequency = measurementFrequency == null ? null : measurementFrequency.copy();
1534        if (calibration != null) {
1535          dst.calibration = new ArrayList<DeviceMetricCalibrationComponent>();
1536          for (DeviceMetricCalibrationComponent i : calibration)
1537            dst.calibration.add(i.copy());
1538        };
1539      }
1540
1541      protected DeviceMetric typedCopy() {
1542        return copy();
1543      }
1544
1545      @Override
1546      public boolean equalsDeep(Base other_) {
1547        if (!super.equalsDeep(other_))
1548          return false;
1549        if (!(other_ instanceof DeviceMetric))
1550          return false;
1551        DeviceMetric o = (DeviceMetric) other_;
1552        return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(unit, o.unit, true)
1553           && compareDeep(device, o.device, true) && compareDeep(operationalStatus, o.operationalStatus, true)
1554           && compareDeep(color, o.color, true) && compareDeep(category, o.category, true) && compareDeep(measurementFrequency, o.measurementFrequency, true)
1555           && compareDeep(calibration, o.calibration, true);
1556      }
1557
1558      @Override
1559      public boolean equalsShallow(Base other_) {
1560        if (!super.equalsShallow(other_))
1561          return false;
1562        if (!(other_ instanceof DeviceMetric))
1563          return false;
1564        DeviceMetric o = (DeviceMetric) other_;
1565        return compareValues(operationalStatus, o.operationalStatus, true) && compareValues(color, o.color, true)
1566           && compareValues(category, o.category, true);
1567      }
1568
1569      public boolean isEmpty() {
1570        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, unit, device
1571          , operationalStatus, color, category, measurementFrequency, calibration);
1572      }
1573
1574  @Override
1575  public ResourceType getResourceType() {
1576    return ResourceType.DeviceMetric;
1577   }
1578
1579 /**
1580   * Search parameter: <b>category</b>
1581   * <p>
1582   * Description: <b>The category of the metric</b><br>
1583   * Type: <b>token</b><br>
1584   * Path: <b>DeviceMetric.category</b><br>
1585   * </p>
1586   */
1587  @SearchParamDefinition(name="category", path="DeviceMetric.category", description="The category of the metric", type="token" )
1588  public static final String SP_CATEGORY = "category";
1589 /**
1590   * <b>Fluent Client</b> search parameter constant for <b>category</b>
1591   * <p>
1592   * Description: <b>The category of the metric</b><br>
1593   * Type: <b>token</b><br>
1594   * Path: <b>DeviceMetric.category</b><br>
1595   * </p>
1596   */
1597  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
1598
1599 /**
1600   * Search parameter: <b>device</b>
1601   * <p>
1602   * Description: <b>The device resource</b><br>
1603   * Type: <b>reference</b><br>
1604   * Path: <b>DeviceMetric.device</b><br>
1605   * </p>
1606   */
1607  @SearchParamDefinition(name="device", path="DeviceMetric.device", description="The device resource", type="reference", target={Device.class } )
1608  public static final String SP_DEVICE = "device";
1609 /**
1610   * <b>Fluent Client</b> search parameter constant for <b>device</b>
1611   * <p>
1612   * Description: <b>The device resource</b><br>
1613   * Type: <b>reference</b><br>
1614   * Path: <b>DeviceMetric.device</b><br>
1615   * </p>
1616   */
1617  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEVICE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEVICE);
1618
1619/**
1620   * Constant for fluent queries to be used to add include statements. Specifies
1621   * the path value of "<b>DeviceMetric:device</b>".
1622   */
1623  public static final ca.uhn.fhir.model.api.Include INCLUDE_DEVICE = new ca.uhn.fhir.model.api.Include("DeviceMetric:device").toLocked();
1624
1625 /**
1626   * Search parameter: <b>identifier</b>
1627   * <p>
1628   * Description: <b>The identifier of the metric</b><br>
1629   * Type: <b>token</b><br>
1630   * Path: <b>DeviceMetric.identifier</b><br>
1631   * </p>
1632   */
1633  @SearchParamDefinition(name="identifier", path="DeviceMetric.identifier", description="The identifier of the metric", type="token" )
1634  public static final String SP_IDENTIFIER = "identifier";
1635 /**
1636   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1637   * <p>
1638   * Description: <b>The identifier of the metric</b><br>
1639   * Type: <b>token</b><br>
1640   * Path: <b>DeviceMetric.identifier</b><br>
1641   * </p>
1642   */
1643  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1644
1645 /**
1646   * Search parameter: <b>type</b>
1647   * <p>
1648   * Description: <b>The type of metric</b><br>
1649   * Type: <b>token</b><br>
1650   * Path: <b>DeviceMetric.type</b><br>
1651   * </p>
1652   */
1653  @SearchParamDefinition(name="type", path="DeviceMetric.type", description="The type of metric", type="token" )
1654  public static final String SP_TYPE = "type";
1655 /**
1656   * <b>Fluent Client</b> search parameter constant for <b>type</b>
1657   * <p>
1658   * Description: <b>The type of metric</b><br>
1659   * Type: <b>token</b><br>
1660   * Path: <b>DeviceMetric.type</b><br>
1661   * </p>
1662   */
1663  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
1664
1665
1666}
1667