001package org.hl7.fhir.dstu2.model;
002
003
004
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, 
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this 
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, 
016     this list of conditions and the following disclaimer in the documentation 
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
031  POSSIBILITY OF SUCH DAMAGE.
032  
033*/
034
035// Generated on Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2
036import java.util.ArrayList;
037import java.util.Date;
038import java.util.List;
039
040import ca.uhn.fhir.model.api.annotation.Child;
041import ca.uhn.fhir.model.api.annotation.Description;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.exceptions.FHIRException;
045import org.hl7.fhir.utilities.Utilities;
046/**
047 * This resource identifies an instance of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.  Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health.  Non-medical devices may include items such as a machine, cellphone, computer, application, etc.
048 */
049@ResourceDef(name="Device", profile="http://hl7.org/fhir/Profile/Device")
050public class Device extends DomainResource {
051
052    public enum DeviceStatus {
053        /**
054         * The Device is available for use.
055         */
056        AVAILABLE, 
057        /**
058         * The Device is no longer available for use (e.g. lost, expired, damaged).
059         */
060        NOTAVAILABLE, 
061        /**
062         * The Device was entered in error and voided.
063         */
064        ENTEREDINERROR, 
065        /**
066         * added to help the parsers
067         */
068        NULL;
069        public static DeviceStatus fromCode(String codeString) throws FHIRException {
070            if (codeString == null || "".equals(codeString))
071                return null;
072        if ("available".equals(codeString))
073          return AVAILABLE;
074        if ("not-available".equals(codeString))
075          return NOTAVAILABLE;
076        if ("entered-in-error".equals(codeString))
077          return ENTEREDINERROR;
078        throw new FHIRException("Unknown DeviceStatus code '"+codeString+"'");
079        }
080        public String toCode() {
081          switch (this) {
082            case AVAILABLE: return "available";
083            case NOTAVAILABLE: return "not-available";
084            case ENTEREDINERROR: return "entered-in-error";
085            default: return "?";
086          }
087        }
088        public String getSystem() {
089          switch (this) {
090            case AVAILABLE: return "http://hl7.org/fhir/devicestatus";
091            case NOTAVAILABLE: return "http://hl7.org/fhir/devicestatus";
092            case ENTEREDINERROR: return "http://hl7.org/fhir/devicestatus";
093            default: return "?";
094          }
095        }
096        public String getDefinition() {
097          switch (this) {
098            case AVAILABLE: return "The Device is available for use.";
099            case NOTAVAILABLE: return "The Device is no longer available for use (e.g. lost, expired, damaged).";
100            case ENTEREDINERROR: return "The Device was entered in error and voided.";
101            default: return "?";
102          }
103        }
104        public String getDisplay() {
105          switch (this) {
106            case AVAILABLE: return "Available";
107            case NOTAVAILABLE: return "Not Available";
108            case ENTEREDINERROR: return "Entered in Error";
109            default: return "?";
110          }
111        }
112    }
113
114  public static class DeviceStatusEnumFactory implements EnumFactory<DeviceStatus> {
115    public DeviceStatus fromCode(String codeString) throws IllegalArgumentException {
116      if (codeString == null || "".equals(codeString))
117            if (codeString == null || "".equals(codeString))
118                return null;
119        if ("available".equals(codeString))
120          return DeviceStatus.AVAILABLE;
121        if ("not-available".equals(codeString))
122          return DeviceStatus.NOTAVAILABLE;
123        if ("entered-in-error".equals(codeString))
124          return DeviceStatus.ENTEREDINERROR;
125        throw new IllegalArgumentException("Unknown DeviceStatus code '"+codeString+"'");
126        }
127        public Enumeration<DeviceStatus> fromType(Base code) throws FHIRException {
128          if (code == null || code.isEmpty())
129            return null;
130          String codeString = ((PrimitiveType) code).asStringValue();
131          if (codeString == null || "".equals(codeString))
132            return null;
133        if ("available".equals(codeString))
134          return new Enumeration<DeviceStatus>(this, DeviceStatus.AVAILABLE);
135        if ("not-available".equals(codeString))
136          return new Enumeration<DeviceStatus>(this, DeviceStatus.NOTAVAILABLE);
137        if ("entered-in-error".equals(codeString))
138          return new Enumeration<DeviceStatus>(this, DeviceStatus.ENTEREDINERROR);
139        throw new FHIRException("Unknown DeviceStatus code '"+codeString+"'");
140        }
141    public String toCode(DeviceStatus code) {
142      if (code == DeviceStatus.AVAILABLE)
143        return "available";
144      if (code == DeviceStatus.NOTAVAILABLE)
145        return "not-available";
146      if (code == DeviceStatus.ENTEREDINERROR)
147        return "entered-in-error";
148      return "?";
149      }
150    }
151
152    /**
153     * Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.
154     */
155    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
156    @Description(shortDefinition="Instance id from manufacturer, owner, and others", formalDefinition="Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used." )
157    protected List<Identifier> identifier;
158
159    /**
160     * Code or identifier to identify a kind of device.
161     */
162    @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
163    @Description(shortDefinition="What kind of device this is", formalDefinition="Code or identifier to identify a kind of device." )
164    protected CodeableConcept type;
165
166    /**
167     * Descriptive information, usage information or implantation information that is not captured in an existing element.
168     */
169    @Child(name = "note", type = {Annotation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
170    @Description(shortDefinition="Device notes and comments", formalDefinition="Descriptive information, usage information or implantation information that is not captured in an existing element." )
171    protected List<Annotation> note;
172
173    /**
174     * Status of the Device availability.
175     */
176    @Child(name = "status", type = {CodeType.class}, order=3, min=0, max=1, modifier=true, summary=true)
177    @Description(shortDefinition="available | not-available | entered-in-error", formalDefinition="Status of the Device availability." )
178    protected Enumeration<DeviceStatus> status;
179
180    /**
181     * A name of the manufacturer.
182     */
183    @Child(name = "manufacturer", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
184    @Description(shortDefinition="Name of device manufacturer", formalDefinition="A name of the manufacturer." )
185    protected StringType manufacturer;
186
187    /**
188     * The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.
189     */
190    @Child(name = "model", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
191    @Description(shortDefinition="Model id assigned by the manufacturer", formalDefinition="The \"model\" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type." )
192    protected StringType model;
193
194    /**
195     * The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.
196     */
197    @Child(name = "version", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
198    @Description(shortDefinition="Version number (i.e. software)", formalDefinition="The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware." )
199    protected StringType version;
200
201    /**
202     * The date and time when the device was manufactured.
203     */
204    @Child(name = "manufactureDate", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=false)
205    @Description(shortDefinition="Manufacture date", formalDefinition="The date and time when the device was manufactured." )
206    protected DateTimeType manufactureDate;
207
208    /**
209     * The date and time beyond which this device is no longer valid or should not be used (if applicable).
210     */
211    @Child(name = "expiry", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=false)
212    @Description(shortDefinition="Date and time of expiry of this device (if applicable)", formalDefinition="The date and time beyond which this device is no longer valid or should not be used (if applicable)." )
213    protected DateTimeType expiry;
214
215    /**
216     * United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode)  - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.
217     */
218    @Child(name = "udi", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false)
219    @Description(shortDefinition="FDA mandated Unique Device Identifier", formalDefinition="United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode)  - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm." )
220    protected StringType udi;
221
222    /**
223     * Lot number assigned by the manufacturer.
224     */
225    @Child(name = "lotNumber", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false)
226    @Description(shortDefinition="Lot number of manufacture", formalDefinition="Lot number assigned by the manufacturer." )
227    protected StringType lotNumber;
228
229    /**
230     * An organization that is responsible for the provision and ongoing maintenance of the device.
231     */
232    @Child(name = "owner", type = {Organization.class}, order=11, min=0, max=1, modifier=false, summary=false)
233    @Description(shortDefinition="Organization responsible for device", formalDefinition="An organization that is responsible for the provision and ongoing maintenance of the device." )
234    protected Reference owner;
235
236    /**
237     * The actual object that is the target of the reference (An organization that is responsible for the provision and ongoing maintenance of the device.)
238     */
239    protected Organization ownerTarget;
240
241    /**
242     * The place where the device can be found.
243     */
244    @Child(name = "location", type = {Location.class}, order=12, min=0, max=1, modifier=false, summary=false)
245    @Description(shortDefinition="Where the resource is found", formalDefinition="The place where the device can be found." )
246    protected Reference location;
247
248    /**
249     * The actual object that is the target of the reference (The place where the device can be found.)
250     */
251    protected Location locationTarget;
252
253    /**
254     * Patient information, if the resource is affixed to a person.
255     */
256    @Child(name = "patient", type = {Patient.class}, order=13, min=0, max=1, modifier=false, summary=false)
257    @Description(shortDefinition="If the resource is affixed to a person", formalDefinition="Patient information, if the resource is affixed to a person." )
258    protected Reference patient;
259
260    /**
261     * The actual object that is the target of the reference (Patient information, if the resource is affixed to a person.)
262     */
263    protected Patient patientTarget;
264
265    /**
266     * Contact details for an organization or a particular human that is responsible for the device.
267     */
268    @Child(name = "contact", type = {ContactPoint.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
269    @Description(shortDefinition="Details for human/organization for support", formalDefinition="Contact details for an organization or a particular human that is responsible for the device." )
270    protected List<ContactPoint> contact;
271
272    /**
273     * A network address on which the device may be contacted directly.
274     */
275    @Child(name = "url", type = {UriType.class}, order=15, min=0, max=1, modifier=false, summary=false)
276    @Description(shortDefinition="Network address to contact device", formalDefinition="A network address on which the device may be contacted directly." )
277    protected UriType url;
278
279    private static final long serialVersionUID = 366690094L;
280
281  /*
282   * Constructor
283   */
284    public Device() {
285      super();
286    }
287
288  /*
289   * Constructor
290   */
291    public Device(CodeableConcept type) {
292      super();
293      this.type = type;
294    }
295
296    /**
297     * @return {@link #identifier} (Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.)
298     */
299    public List<Identifier> getIdentifier() { 
300      if (this.identifier == null)
301        this.identifier = new ArrayList<Identifier>();
302      return this.identifier;
303    }
304
305    public boolean hasIdentifier() { 
306      if (this.identifier == null)
307        return false;
308      for (Identifier item : this.identifier)
309        if (!item.isEmpty())
310          return true;
311      return false;
312    }
313
314    /**
315     * @return {@link #identifier} (Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.)
316     */
317    // syntactic sugar
318    public Identifier addIdentifier() { //3
319      Identifier t = new Identifier();
320      if (this.identifier == null)
321        this.identifier = new ArrayList<Identifier>();
322      this.identifier.add(t);
323      return t;
324    }
325
326    // syntactic sugar
327    public Device addIdentifier(Identifier t) { //3
328      if (t == null)
329        return this;
330      if (this.identifier == null)
331        this.identifier = new ArrayList<Identifier>();
332      this.identifier.add(t);
333      return this;
334    }
335
336    /**
337     * @return {@link #type} (Code or identifier to identify a kind of device.)
338     */
339    public CodeableConcept getType() { 
340      if (this.type == null)
341        if (Configuration.errorOnAutoCreate())
342          throw new Error("Attempt to auto-create Device.type");
343        else if (Configuration.doAutoCreate())
344          this.type = new CodeableConcept(); // cc
345      return this.type;
346    }
347
348    public boolean hasType() { 
349      return this.type != null && !this.type.isEmpty();
350    }
351
352    /**
353     * @param value {@link #type} (Code or identifier to identify a kind of device.)
354     */
355    public Device setType(CodeableConcept value) { 
356      this.type = value;
357      return this;
358    }
359
360    /**
361     * @return {@link #note} (Descriptive information, usage information or implantation information that is not captured in an existing element.)
362     */
363    public List<Annotation> getNote() { 
364      if (this.note == null)
365        this.note = new ArrayList<Annotation>();
366      return this.note;
367    }
368
369    public boolean hasNote() { 
370      if (this.note == null)
371        return false;
372      for (Annotation item : this.note)
373        if (!item.isEmpty())
374          return true;
375      return false;
376    }
377
378    /**
379     * @return {@link #note} (Descriptive information, usage information or implantation information that is not captured in an existing element.)
380     */
381    // syntactic sugar
382    public Annotation addNote() { //3
383      Annotation t = new Annotation();
384      if (this.note == null)
385        this.note = new ArrayList<Annotation>();
386      this.note.add(t);
387      return t;
388    }
389
390    // syntactic sugar
391    public Device addNote(Annotation t) { //3
392      if (t == null)
393        return this;
394      if (this.note == null)
395        this.note = new ArrayList<Annotation>();
396      this.note.add(t);
397      return this;
398    }
399
400    /**
401     * @return {@link #status} (Status of the Device availability.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
402     */
403    public Enumeration<DeviceStatus> getStatusElement() { 
404      if (this.status == null)
405        if (Configuration.errorOnAutoCreate())
406          throw new Error("Attempt to auto-create Device.status");
407        else if (Configuration.doAutoCreate())
408          this.status = new Enumeration<DeviceStatus>(new DeviceStatusEnumFactory()); // bb
409      return this.status;
410    }
411
412    public boolean hasStatusElement() { 
413      return this.status != null && !this.status.isEmpty();
414    }
415
416    public boolean hasStatus() { 
417      return this.status != null && !this.status.isEmpty();
418    }
419
420    /**
421     * @param value {@link #status} (Status of the Device availability.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
422     */
423    public Device setStatusElement(Enumeration<DeviceStatus> value) { 
424      this.status = value;
425      return this;
426    }
427
428    /**
429     * @return Status of the Device availability.
430     */
431    public DeviceStatus getStatus() { 
432      return this.status == null ? null : this.status.getValue();
433    }
434
435    /**
436     * @param value Status of the Device availability.
437     */
438    public Device setStatus(DeviceStatus value) { 
439      if (value == null)
440        this.status = null;
441      else {
442        if (this.status == null)
443          this.status = new Enumeration<DeviceStatus>(new DeviceStatusEnumFactory());
444        this.status.setValue(value);
445      }
446      return this;
447    }
448
449    /**
450     * @return {@link #manufacturer} (A name of the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getManufacturer" gives direct access to the value
451     */
452    public StringType getManufacturerElement() { 
453      if (this.manufacturer == null)
454        if (Configuration.errorOnAutoCreate())
455          throw new Error("Attempt to auto-create Device.manufacturer");
456        else if (Configuration.doAutoCreate())
457          this.manufacturer = new StringType(); // bb
458      return this.manufacturer;
459    }
460
461    public boolean hasManufacturerElement() { 
462      return this.manufacturer != null && !this.manufacturer.isEmpty();
463    }
464
465    public boolean hasManufacturer() { 
466      return this.manufacturer != null && !this.manufacturer.isEmpty();
467    }
468
469    /**
470     * @param value {@link #manufacturer} (A name of the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getManufacturer" gives direct access to the value
471     */
472    public Device setManufacturerElement(StringType value) { 
473      this.manufacturer = value;
474      return this;
475    }
476
477    /**
478     * @return A name of the manufacturer.
479     */
480    public String getManufacturer() { 
481      return this.manufacturer == null ? null : this.manufacturer.getValue();
482    }
483
484    /**
485     * @param value A name of the manufacturer.
486     */
487    public Device setManufacturer(String value) { 
488      if (Utilities.noString(value))
489        this.manufacturer = null;
490      else {
491        if (this.manufacturer == null)
492          this.manufacturer = new StringType();
493        this.manufacturer.setValue(value);
494      }
495      return this;
496    }
497
498    /**
499     * @return {@link #model} (The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.). This is the underlying object with id, value and extensions. The accessor "getModel" gives direct access to the value
500     */
501    public StringType getModelElement() { 
502      if (this.model == null)
503        if (Configuration.errorOnAutoCreate())
504          throw new Error("Attempt to auto-create Device.model");
505        else if (Configuration.doAutoCreate())
506          this.model = new StringType(); // bb
507      return this.model;
508    }
509
510    public boolean hasModelElement() { 
511      return this.model != null && !this.model.isEmpty();
512    }
513
514    public boolean hasModel() { 
515      return this.model != null && !this.model.isEmpty();
516    }
517
518    /**
519     * @param value {@link #model} (The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.). This is the underlying object with id, value and extensions. The accessor "getModel" gives direct access to the value
520     */
521    public Device setModelElement(StringType value) { 
522      this.model = value;
523      return this;
524    }
525
526    /**
527     * @return The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.
528     */
529    public String getModel() { 
530      return this.model == null ? null : this.model.getValue();
531    }
532
533    /**
534     * @param value The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.
535     */
536    public Device setModel(String value) { 
537      if (Utilities.noString(value))
538        this.model = null;
539      else {
540        if (this.model == null)
541          this.model = new StringType();
542        this.model.setValue(value);
543      }
544      return this;
545    }
546
547    /**
548     * @return {@link #version} (The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
549     */
550    public StringType getVersionElement() { 
551      if (this.version == null)
552        if (Configuration.errorOnAutoCreate())
553          throw new Error("Attempt to auto-create Device.version");
554        else if (Configuration.doAutoCreate())
555          this.version = new StringType(); // bb
556      return this.version;
557    }
558
559    public boolean hasVersionElement() { 
560      return this.version != null && !this.version.isEmpty();
561    }
562
563    public boolean hasVersion() { 
564      return this.version != null && !this.version.isEmpty();
565    }
566
567    /**
568     * @param value {@link #version} (The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
569     */
570    public Device setVersionElement(StringType value) { 
571      this.version = value;
572      return this;
573    }
574
575    /**
576     * @return The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.
577     */
578    public String getVersion() { 
579      return this.version == null ? null : this.version.getValue();
580    }
581
582    /**
583     * @param value The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.
584     */
585    public Device setVersion(String value) { 
586      if (Utilities.noString(value))
587        this.version = null;
588      else {
589        if (this.version == null)
590          this.version = new StringType();
591        this.version.setValue(value);
592      }
593      return this;
594    }
595
596    /**
597     * @return {@link #manufactureDate} (The date and time when the device was manufactured.). This is the underlying object with id, value and extensions. The accessor "getManufactureDate" gives direct access to the value
598     */
599    public DateTimeType getManufactureDateElement() { 
600      if (this.manufactureDate == null)
601        if (Configuration.errorOnAutoCreate())
602          throw new Error("Attempt to auto-create Device.manufactureDate");
603        else if (Configuration.doAutoCreate())
604          this.manufactureDate = new DateTimeType(); // bb
605      return this.manufactureDate;
606    }
607
608    public boolean hasManufactureDateElement() { 
609      return this.manufactureDate != null && !this.manufactureDate.isEmpty();
610    }
611
612    public boolean hasManufactureDate() { 
613      return this.manufactureDate != null && !this.manufactureDate.isEmpty();
614    }
615
616    /**
617     * @param value {@link #manufactureDate} (The date and time when the device was manufactured.). This is the underlying object with id, value and extensions. The accessor "getManufactureDate" gives direct access to the value
618     */
619    public Device setManufactureDateElement(DateTimeType value) { 
620      this.manufactureDate = value;
621      return this;
622    }
623
624    /**
625     * @return The date and time when the device was manufactured.
626     */
627    public Date getManufactureDate() { 
628      return this.manufactureDate == null ? null : this.manufactureDate.getValue();
629    }
630
631    /**
632     * @param value The date and time when the device was manufactured.
633     */
634    public Device setManufactureDate(Date value) { 
635      if (value == null)
636        this.manufactureDate = null;
637      else {
638        if (this.manufactureDate == null)
639          this.manufactureDate = new DateTimeType();
640        this.manufactureDate.setValue(value);
641      }
642      return this;
643    }
644
645    /**
646     * @return {@link #expiry} (The date and time beyond which this device is no longer valid or should not be used (if applicable).). This is the underlying object with id, value and extensions. The accessor "getExpiry" gives direct access to the value
647     */
648    public DateTimeType getExpiryElement() { 
649      if (this.expiry == null)
650        if (Configuration.errorOnAutoCreate())
651          throw new Error("Attempt to auto-create Device.expiry");
652        else if (Configuration.doAutoCreate())
653          this.expiry = new DateTimeType(); // bb
654      return this.expiry;
655    }
656
657    public boolean hasExpiryElement() { 
658      return this.expiry != null && !this.expiry.isEmpty();
659    }
660
661    public boolean hasExpiry() { 
662      return this.expiry != null && !this.expiry.isEmpty();
663    }
664
665    /**
666     * @param value {@link #expiry} (The date and time beyond which this device is no longer valid or should not be used (if applicable).). This is the underlying object with id, value and extensions. The accessor "getExpiry" gives direct access to the value
667     */
668    public Device setExpiryElement(DateTimeType value) { 
669      this.expiry = value;
670      return this;
671    }
672
673    /**
674     * @return The date and time beyond which this device is no longer valid or should not be used (if applicable).
675     */
676    public Date getExpiry() { 
677      return this.expiry == null ? null : this.expiry.getValue();
678    }
679
680    /**
681     * @param value The date and time beyond which this device is no longer valid or should not be used (if applicable).
682     */
683    public Device setExpiry(Date value) { 
684      if (value == null)
685        this.expiry = null;
686      else {
687        if (this.expiry == null)
688          this.expiry = new DateTimeType();
689        this.expiry.setValue(value);
690      }
691      return this;
692    }
693
694    /**
695     * @return {@link #udi} (United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode)  - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.). This is the underlying object with id, value and extensions. The accessor "getUdi" gives direct access to the value
696     */
697    public StringType getUdiElement() { 
698      if (this.udi == null)
699        if (Configuration.errorOnAutoCreate())
700          throw new Error("Attempt to auto-create Device.udi");
701        else if (Configuration.doAutoCreate())
702          this.udi = new StringType(); // bb
703      return this.udi;
704    }
705
706    public boolean hasUdiElement() { 
707      return this.udi != null && !this.udi.isEmpty();
708    }
709
710    public boolean hasUdi() { 
711      return this.udi != null && !this.udi.isEmpty();
712    }
713
714    /**
715     * @param value {@link #udi} (United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode)  - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.). This is the underlying object with id, value and extensions. The accessor "getUdi" gives direct access to the value
716     */
717    public Device setUdiElement(StringType value) { 
718      this.udi = value;
719      return this;
720    }
721
722    /**
723     * @return United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode)  - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.
724     */
725    public String getUdi() { 
726      return this.udi == null ? null : this.udi.getValue();
727    }
728
729    /**
730     * @param value United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode)  - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.
731     */
732    public Device setUdi(String value) { 
733      if (Utilities.noString(value))
734        this.udi = null;
735      else {
736        if (this.udi == null)
737          this.udi = new StringType();
738        this.udi.setValue(value);
739      }
740      return this;
741    }
742
743    /**
744     * @return {@link #lotNumber} (Lot number assigned by the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value
745     */
746    public StringType getLotNumberElement() { 
747      if (this.lotNumber == null)
748        if (Configuration.errorOnAutoCreate())
749          throw new Error("Attempt to auto-create Device.lotNumber");
750        else if (Configuration.doAutoCreate())
751          this.lotNumber = new StringType(); // bb
752      return this.lotNumber;
753    }
754
755    public boolean hasLotNumberElement() { 
756      return this.lotNumber != null && !this.lotNumber.isEmpty();
757    }
758
759    public boolean hasLotNumber() { 
760      return this.lotNumber != null && !this.lotNumber.isEmpty();
761    }
762
763    /**
764     * @param value {@link #lotNumber} (Lot number assigned by the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value
765     */
766    public Device setLotNumberElement(StringType value) { 
767      this.lotNumber = value;
768      return this;
769    }
770
771    /**
772     * @return Lot number assigned by the manufacturer.
773     */
774    public String getLotNumber() { 
775      return this.lotNumber == null ? null : this.lotNumber.getValue();
776    }
777
778    /**
779     * @param value Lot number assigned by the manufacturer.
780     */
781    public Device setLotNumber(String value) { 
782      if (Utilities.noString(value))
783        this.lotNumber = null;
784      else {
785        if (this.lotNumber == null)
786          this.lotNumber = new StringType();
787        this.lotNumber.setValue(value);
788      }
789      return this;
790    }
791
792    /**
793     * @return {@link #owner} (An organization that is responsible for the provision and ongoing maintenance of the device.)
794     */
795    public Reference getOwner() { 
796      if (this.owner == null)
797        if (Configuration.errorOnAutoCreate())
798          throw new Error("Attempt to auto-create Device.owner");
799        else if (Configuration.doAutoCreate())
800          this.owner = new Reference(); // cc
801      return this.owner;
802    }
803
804    public boolean hasOwner() { 
805      return this.owner != null && !this.owner.isEmpty();
806    }
807
808    /**
809     * @param value {@link #owner} (An organization that is responsible for the provision and ongoing maintenance of the device.)
810     */
811    public Device setOwner(Reference value) { 
812      this.owner = value;
813      return this;
814    }
815
816    /**
817     * @return {@link #owner} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (An organization that is responsible for the provision and ongoing maintenance of the device.)
818     */
819    public Organization getOwnerTarget() { 
820      if (this.ownerTarget == null)
821        if (Configuration.errorOnAutoCreate())
822          throw new Error("Attempt to auto-create Device.owner");
823        else if (Configuration.doAutoCreate())
824          this.ownerTarget = new Organization(); // aa
825      return this.ownerTarget;
826    }
827
828    /**
829     * @param value {@link #owner} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (An organization that is responsible for the provision and ongoing maintenance of the device.)
830     */
831    public Device setOwnerTarget(Organization value) { 
832      this.ownerTarget = value;
833      return this;
834    }
835
836    /**
837     * @return {@link #location} (The place where the device can be found.)
838     */
839    public Reference getLocation() { 
840      if (this.location == null)
841        if (Configuration.errorOnAutoCreate())
842          throw new Error("Attempt to auto-create Device.location");
843        else if (Configuration.doAutoCreate())
844          this.location = new Reference(); // cc
845      return this.location;
846    }
847
848    public boolean hasLocation() { 
849      return this.location != null && !this.location.isEmpty();
850    }
851
852    /**
853     * @param value {@link #location} (The place where the device can be found.)
854     */
855    public Device setLocation(Reference value) { 
856      this.location = value;
857      return this;
858    }
859
860    /**
861     * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The place where the device can be found.)
862     */
863    public Location getLocationTarget() { 
864      if (this.locationTarget == null)
865        if (Configuration.errorOnAutoCreate())
866          throw new Error("Attempt to auto-create Device.location");
867        else if (Configuration.doAutoCreate())
868          this.locationTarget = new Location(); // aa
869      return this.locationTarget;
870    }
871
872    /**
873     * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The place where the device can be found.)
874     */
875    public Device setLocationTarget(Location value) { 
876      this.locationTarget = value;
877      return this;
878    }
879
880    /**
881     * @return {@link #patient} (Patient information, if the resource is affixed to a person.)
882     */
883    public Reference getPatient() { 
884      if (this.patient == null)
885        if (Configuration.errorOnAutoCreate())
886          throw new Error("Attempt to auto-create Device.patient");
887        else if (Configuration.doAutoCreate())
888          this.patient = new Reference(); // cc
889      return this.patient;
890    }
891
892    public boolean hasPatient() { 
893      return this.patient != null && !this.patient.isEmpty();
894    }
895
896    /**
897     * @param value {@link #patient} (Patient information, if the resource is affixed to a person.)
898     */
899    public Device setPatient(Reference value) { 
900      this.patient = value;
901      return this;
902    }
903
904    /**
905     * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient information, if the resource is affixed to a person.)
906     */
907    public Patient getPatientTarget() { 
908      if (this.patientTarget == null)
909        if (Configuration.errorOnAutoCreate())
910          throw new Error("Attempt to auto-create Device.patient");
911        else if (Configuration.doAutoCreate())
912          this.patientTarget = new Patient(); // aa
913      return this.patientTarget;
914    }
915
916    /**
917     * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient information, if the resource is affixed to a person.)
918     */
919    public Device setPatientTarget(Patient value) { 
920      this.patientTarget = value;
921      return this;
922    }
923
924    /**
925     * @return {@link #contact} (Contact details for an organization or a particular human that is responsible for the device.)
926     */
927    public List<ContactPoint> getContact() { 
928      if (this.contact == null)
929        this.contact = new ArrayList<ContactPoint>();
930      return this.contact;
931    }
932
933    public boolean hasContact() { 
934      if (this.contact == null)
935        return false;
936      for (ContactPoint item : this.contact)
937        if (!item.isEmpty())
938          return true;
939      return false;
940    }
941
942    /**
943     * @return {@link #contact} (Contact details for an organization or a particular human that is responsible for the device.)
944     */
945    // syntactic sugar
946    public ContactPoint addContact() { //3
947      ContactPoint t = new ContactPoint();
948      if (this.contact == null)
949        this.contact = new ArrayList<ContactPoint>();
950      this.contact.add(t);
951      return t;
952    }
953
954    // syntactic sugar
955    public Device addContact(ContactPoint t) { //3
956      if (t == null)
957        return this;
958      if (this.contact == null)
959        this.contact = new ArrayList<ContactPoint>();
960      this.contact.add(t);
961      return this;
962    }
963
964    /**
965     * @return {@link #url} (A network address on which the device may be contacted directly.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
966     */
967    public UriType getUrlElement() { 
968      if (this.url == null)
969        if (Configuration.errorOnAutoCreate())
970          throw new Error("Attempt to auto-create Device.url");
971        else if (Configuration.doAutoCreate())
972          this.url = new UriType(); // bb
973      return this.url;
974    }
975
976    public boolean hasUrlElement() { 
977      return this.url != null && !this.url.isEmpty();
978    }
979
980    public boolean hasUrl() { 
981      return this.url != null && !this.url.isEmpty();
982    }
983
984    /**
985     * @param value {@link #url} (A network address on which the device may be contacted directly.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
986     */
987    public Device setUrlElement(UriType value) { 
988      this.url = value;
989      return this;
990    }
991
992    /**
993     * @return A network address on which the device may be contacted directly.
994     */
995    public String getUrl() { 
996      return this.url == null ? null : this.url.getValue();
997    }
998
999    /**
1000     * @param value A network address on which the device may be contacted directly.
1001     */
1002    public Device setUrl(String value) { 
1003      if (Utilities.noString(value))
1004        this.url = null;
1005      else {
1006        if (this.url == null)
1007          this.url = new UriType();
1008        this.url.setValue(value);
1009      }
1010      return this;
1011    }
1012
1013      protected void listChildren(List<Property> childrenList) {
1014        super.listChildren(childrenList);
1015        childrenList.add(new Property("identifier", "Identifier", "Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.", 0, java.lang.Integer.MAX_VALUE, identifier));
1016        childrenList.add(new Property("type", "CodeableConcept", "Code or identifier to identify a kind of device.", 0, java.lang.Integer.MAX_VALUE, type));
1017        childrenList.add(new Property("note", "Annotation", "Descriptive information, usage information or implantation information that is not captured in an existing element.", 0, java.lang.Integer.MAX_VALUE, note));
1018        childrenList.add(new Property("status", "code", "Status of the Device availability.", 0, java.lang.Integer.MAX_VALUE, status));
1019        childrenList.add(new Property("manufacturer", "string", "A name of the manufacturer.", 0, java.lang.Integer.MAX_VALUE, manufacturer));
1020        childrenList.add(new Property("model", "string", "The \"model\" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", 0, java.lang.Integer.MAX_VALUE, model));
1021        childrenList.add(new Property("version", "string", "The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.", 0, java.lang.Integer.MAX_VALUE, version));
1022        childrenList.add(new Property("manufactureDate", "dateTime", "The date and time when the device was manufactured.", 0, java.lang.Integer.MAX_VALUE, manufactureDate));
1023        childrenList.add(new Property("expiry", "dateTime", "The date and time beyond which this device is no longer valid or should not be used (if applicable).", 0, java.lang.Integer.MAX_VALUE, expiry));
1024        childrenList.add(new Property("udi", "string", "United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode)  - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.", 0, java.lang.Integer.MAX_VALUE, udi));
1025        childrenList.add(new Property("lotNumber", "string", "Lot number assigned by the manufacturer.", 0, java.lang.Integer.MAX_VALUE, lotNumber));
1026        childrenList.add(new Property("owner", "Reference(Organization)", "An organization that is responsible for the provision and ongoing maintenance of the device.", 0, java.lang.Integer.MAX_VALUE, owner));
1027        childrenList.add(new Property("location", "Reference(Location)", "The place where the device can be found.", 0, java.lang.Integer.MAX_VALUE, location));
1028        childrenList.add(new Property("patient", "Reference(Patient)", "Patient information, if the resource is affixed to a person.", 0, java.lang.Integer.MAX_VALUE, patient));
1029        childrenList.add(new Property("contact", "ContactPoint", "Contact details for an organization or a particular human that is responsible for the device.", 0, java.lang.Integer.MAX_VALUE, contact));
1030        childrenList.add(new Property("url", "uri", "A network address on which the device may be contacted directly.", 0, java.lang.Integer.MAX_VALUE, url));
1031      }
1032
1033      @Override
1034      public void setProperty(String name, Base value) throws FHIRException {
1035        if (name.equals("identifier"))
1036          this.getIdentifier().add(castToIdentifier(value));
1037        else if (name.equals("type"))
1038          this.type = castToCodeableConcept(value); // CodeableConcept
1039        else if (name.equals("note"))
1040          this.getNote().add(castToAnnotation(value));
1041        else if (name.equals("status"))
1042          this.status = new DeviceStatusEnumFactory().fromType(value); // Enumeration<DeviceStatus>
1043        else if (name.equals("manufacturer"))
1044          this.manufacturer = castToString(value); // StringType
1045        else if (name.equals("model"))
1046          this.model = castToString(value); // StringType
1047        else if (name.equals("version"))
1048          this.version = castToString(value); // StringType
1049        else if (name.equals("manufactureDate"))
1050          this.manufactureDate = castToDateTime(value); // DateTimeType
1051        else if (name.equals("expiry"))
1052          this.expiry = castToDateTime(value); // DateTimeType
1053        else if (name.equals("udi"))
1054          this.udi = castToString(value); // StringType
1055        else if (name.equals("lotNumber"))
1056          this.lotNumber = castToString(value); // StringType
1057        else if (name.equals("owner"))
1058          this.owner = castToReference(value); // Reference
1059        else if (name.equals("location"))
1060          this.location = castToReference(value); // Reference
1061        else if (name.equals("patient"))
1062          this.patient = castToReference(value); // Reference
1063        else if (name.equals("contact"))
1064          this.getContact().add(castToContactPoint(value));
1065        else if (name.equals("url"))
1066          this.url = castToUri(value); // UriType
1067        else
1068          super.setProperty(name, value);
1069      }
1070
1071      @Override
1072      public Base addChild(String name) throws FHIRException {
1073        if (name.equals("identifier")) {
1074          return addIdentifier();
1075        }
1076        else if (name.equals("type")) {
1077          this.type = new CodeableConcept();
1078          return this.type;
1079        }
1080        else if (name.equals("note")) {
1081          return addNote();
1082        }
1083        else if (name.equals("status")) {
1084          throw new FHIRException("Cannot call addChild on a primitive type Device.status");
1085        }
1086        else if (name.equals("manufacturer")) {
1087          throw new FHIRException("Cannot call addChild on a primitive type Device.manufacturer");
1088        }
1089        else if (name.equals("model")) {
1090          throw new FHIRException("Cannot call addChild on a primitive type Device.model");
1091        }
1092        else if (name.equals("version")) {
1093          throw new FHIRException("Cannot call addChild on a primitive type Device.version");
1094        }
1095        else if (name.equals("manufactureDate")) {
1096          throw new FHIRException("Cannot call addChild on a primitive type Device.manufactureDate");
1097        }
1098        else if (name.equals("expiry")) {
1099          throw new FHIRException("Cannot call addChild on a primitive type Device.expiry");
1100        }
1101        else if (name.equals("udi")) {
1102          throw new FHIRException("Cannot call addChild on a primitive type Device.udi");
1103        }
1104        else if (name.equals("lotNumber")) {
1105          throw new FHIRException("Cannot call addChild on a primitive type Device.lotNumber");
1106        }
1107        else if (name.equals("owner")) {
1108          this.owner = new Reference();
1109          return this.owner;
1110        }
1111        else if (name.equals("location")) {
1112          this.location = new Reference();
1113          return this.location;
1114        }
1115        else if (name.equals("patient")) {
1116          this.patient = new Reference();
1117          return this.patient;
1118        }
1119        else if (name.equals("contact")) {
1120          return addContact();
1121        }
1122        else if (name.equals("url")) {
1123          throw new FHIRException("Cannot call addChild on a primitive type Device.url");
1124        }
1125        else
1126          return super.addChild(name);
1127      }
1128
1129  public String fhirType() {
1130    return "Device";
1131
1132  }
1133
1134      public Device copy() {
1135        Device dst = new Device();
1136        copyValues(dst);
1137        if (identifier != null) {
1138          dst.identifier = new ArrayList<Identifier>();
1139          for (Identifier i : identifier)
1140            dst.identifier.add(i.copy());
1141        };
1142        dst.type = type == null ? null : type.copy();
1143        if (note != null) {
1144          dst.note = new ArrayList<Annotation>();
1145          for (Annotation i : note)
1146            dst.note.add(i.copy());
1147        };
1148        dst.status = status == null ? null : status.copy();
1149        dst.manufacturer = manufacturer == null ? null : manufacturer.copy();
1150        dst.model = model == null ? null : model.copy();
1151        dst.version = version == null ? null : version.copy();
1152        dst.manufactureDate = manufactureDate == null ? null : manufactureDate.copy();
1153        dst.expiry = expiry == null ? null : expiry.copy();
1154        dst.udi = udi == null ? null : udi.copy();
1155        dst.lotNumber = lotNumber == null ? null : lotNumber.copy();
1156        dst.owner = owner == null ? null : owner.copy();
1157        dst.location = location == null ? null : location.copy();
1158        dst.patient = patient == null ? null : patient.copy();
1159        if (contact != null) {
1160          dst.contact = new ArrayList<ContactPoint>();
1161          for (ContactPoint i : contact)
1162            dst.contact.add(i.copy());
1163        };
1164        dst.url = url == null ? null : url.copy();
1165        return dst;
1166      }
1167
1168      protected Device typedCopy() {
1169        return copy();
1170      }
1171
1172      @Override
1173      public boolean equalsDeep(Base other) {
1174        if (!super.equalsDeep(other))
1175          return false;
1176        if (!(other instanceof Device))
1177          return false;
1178        Device o = (Device) other;
1179        return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(note, o.note, true)
1180           && compareDeep(status, o.status, true) && compareDeep(manufacturer, o.manufacturer, true) && compareDeep(model, o.model, true)
1181           && compareDeep(version, o.version, true) && compareDeep(manufactureDate, o.manufactureDate, true)
1182           && compareDeep(expiry, o.expiry, true) && compareDeep(udi, o.udi, true) && compareDeep(lotNumber, o.lotNumber, true)
1183           && compareDeep(owner, o.owner, true) && compareDeep(location, o.location, true) && compareDeep(patient, o.patient, true)
1184           && compareDeep(contact, o.contact, true) && compareDeep(url, o.url, true);
1185      }
1186
1187      @Override
1188      public boolean equalsShallow(Base other) {
1189        if (!super.equalsShallow(other))
1190          return false;
1191        if (!(other instanceof Device))
1192          return false;
1193        Device o = (Device) other;
1194        return compareValues(status, o.status, true) && compareValues(manufacturer, o.manufacturer, true) && compareValues(model, o.model, true)
1195           && compareValues(version, o.version, true) && compareValues(manufactureDate, o.manufactureDate, true)
1196           && compareValues(expiry, o.expiry, true) && compareValues(udi, o.udi, true) && compareValues(lotNumber, o.lotNumber, true)
1197           && compareValues(url, o.url, true);
1198      }
1199
1200      public boolean isEmpty() {
1201        return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (type == null || type.isEmpty())
1202           && (note == null || note.isEmpty()) && (status == null || status.isEmpty()) && (manufacturer == null || manufacturer.isEmpty())
1203           && (model == null || model.isEmpty()) && (version == null || version.isEmpty()) && (manufactureDate == null || manufactureDate.isEmpty())
1204           && (expiry == null || expiry.isEmpty()) && (udi == null || udi.isEmpty()) && (lotNumber == null || lotNumber.isEmpty())
1205           && (owner == null || owner.isEmpty()) && (location == null || location.isEmpty()) && (patient == null || patient.isEmpty())
1206           && (contact == null || contact.isEmpty()) && (url == null || url.isEmpty());
1207      }
1208
1209  @Override
1210  public ResourceType getResourceType() {
1211    return ResourceType.Device;
1212   }
1213
1214  @SearchParamDefinition(name="identifier", path="Device.identifier", description="Instance id from manufacturer, owner, and others", type="token" )
1215  public static final String SP_IDENTIFIER = "identifier";
1216  @SearchParamDefinition(name="patient", path="Device.patient", description="Patient information, if the resource is affixed to a person", type="reference" )
1217  public static final String SP_PATIENT = "patient";
1218  @SearchParamDefinition(name="organization", path="Device.owner", description="The organization responsible for the device", type="reference" )
1219  public static final String SP_ORGANIZATION = "organization";
1220  @SearchParamDefinition(name="model", path="Device.model", description="The model of the device", type="string" )
1221  public static final String SP_MODEL = "model";
1222  @SearchParamDefinition(name="location", path="Device.location", description="A location, where the resource is found", type="reference" )
1223  public static final String SP_LOCATION = "location";
1224  @SearchParamDefinition(name="udi", path="Device.udi", description="FDA mandated Unique Device Identifier", type="string" )
1225  public static final String SP_UDI = "udi";
1226  @SearchParamDefinition(name="type", path="Device.type", description="The type of the device", type="token" )
1227  public static final String SP_TYPE = "type";
1228  @SearchParamDefinition(name="url", path="Device.url", description="Network address to contact device", type="uri" )
1229  public static final String SP_URL = "url";
1230  @SearchParamDefinition(name="manufacturer", path="Device.manufacturer", description="The manufacturer of the device", type="string" )
1231  public static final String SP_MANUFACTURER = "manufacturer";
1232
1233}