001package org.hl7.fhir.r4.model;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r4
006 * %%
007 * Copyright (C) 2014 - 2019 Health Level 7
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023/*
024  Copyright (c) 2011+, HL7, Inc.
025  All rights reserved.
026  
027  Redistribution and use in source and binary forms, with or without modification, 
028  are permitted provided that the following conditions are met:
029  
030   * Redistributions of source code must retain the above copyright notice, this 
031     list of conditions and the following disclaimer.
032   * Redistributions in binary form must reproduce the above copyright notice, 
033     this list of conditions and the following disclaimer in the documentation 
034     and/or other materials provided with the distribution.
035   * Neither the name of HL7 nor the names of its contributors may be used to 
036     endorse or promote products derived from this software without specific 
037     prior written permission.
038  
039  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
040  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
041  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
042  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
043  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
044  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
045  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
046  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
047  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
048  POSSIBILITY OF SUCH DAMAGE.
049  
050*/
051
052// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
053import java.util.ArrayList;
054import java.util.List;
055
056import org.hl7.fhir.exceptions.FHIRException;
057import org.hl7.fhir.utilities.Utilities;
058
059import ca.uhn.fhir.model.api.annotation.Child;
060import ca.uhn.fhir.model.api.annotation.Description;
061import ca.uhn.fhir.model.api.annotation.ResourceDef;
062import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
063/**
064 * A physical entity which is the primary unit of operational and/or administrative interest in a study.
065 */
066@ResourceDef(name="ResearchSubject", profile="http://hl7.org/fhir/StructureDefinition/ResearchSubject")
067public class ResearchSubject extends DomainResource {
068
069    public enum ResearchSubjectStatus {
070        /**
071         * An identified person that can be considered for inclusion in a study.
072         */
073        CANDIDATE, 
074        /**
075         * A person that has met the eligibility criteria for inclusion in a study.
076         */
077        ELIGIBLE, 
078        /**
079         * A person is no longer receiving study intervention and/or being evaluated with tests and procedures according to the protocol, but they are being monitored on a protocol-prescribed schedule.
080         */
081        FOLLOWUP, 
082        /**
083         * A person who did not meet one or more criteria required for participation in a study is considered to have failed screening or
084is ineligible for the study.
085         */
086        INELIGIBLE, 
087        /**
088         * A person for whom registration was not completed.
089         */
090        NOTREGISTERED, 
091        /**
092         * A person that has ended their participation on a study either because their treatment/observation is complete or through not
093responding, withdrawal, non-compliance and/or adverse event.
094         */
095        OFFSTUDY, 
096        /**
097         * A person that is enrolled or registered on a study.
098         */
099        ONSTUDY, 
100        /**
101         * The person is receiving the treatment or participating in an activity (e.g. yoga, diet, etc.) that the study is evaluating.
102         */
103        ONSTUDYINTERVENTION, 
104        /**
105         * The subject is being evaluated via tests and assessments according to the study calendar, but is not receiving any intervention. Note that this state is study-dependent and might not exist in all studies.  A synonym for this is "short-term follow-up".
106         */
107        ONSTUDYOBSERVATION, 
108        /**
109         * A person is pre-registered for a study.
110         */
111        PENDINGONSTUDY, 
112        /**
113         * A person that is potentially eligible for participation in the study.
114         */
115        POTENTIALCANDIDATE, 
116        /**
117         * A person who is being evaluated for eligibility for a study.
118         */
119        SCREENING, 
120        /**
121         * The person has withdrawn their participation in the study before registration.
122         */
123        WITHDRAWN, 
124        /**
125         * added to help the parsers with the generic types
126         */
127        NULL;
128        public static ResearchSubjectStatus fromCode(String codeString) throws FHIRException {
129            if (codeString == null || "".equals(codeString))
130                return null;
131        if ("candidate".equals(codeString))
132          return CANDIDATE;
133        if ("eligible".equals(codeString))
134          return ELIGIBLE;
135        if ("follow-up".equals(codeString))
136          return FOLLOWUP;
137        if ("ineligible".equals(codeString))
138          return INELIGIBLE;
139        if ("not-registered".equals(codeString))
140          return NOTREGISTERED;
141        if ("off-study".equals(codeString))
142          return OFFSTUDY;
143        if ("on-study".equals(codeString))
144          return ONSTUDY;
145        if ("on-study-intervention".equals(codeString))
146          return ONSTUDYINTERVENTION;
147        if ("on-study-observation".equals(codeString))
148          return ONSTUDYOBSERVATION;
149        if ("pending-on-study".equals(codeString))
150          return PENDINGONSTUDY;
151        if ("potential-candidate".equals(codeString))
152          return POTENTIALCANDIDATE;
153        if ("screening".equals(codeString))
154          return SCREENING;
155        if ("withdrawn".equals(codeString))
156          return WITHDRAWN;
157        if (Configuration.isAcceptInvalidEnums())
158          return null;
159        else
160          throw new FHIRException("Unknown ResearchSubjectStatus code '"+codeString+"'");
161        }
162        public String toCode() {
163          switch (this) {
164            case CANDIDATE: return "candidate";
165            case ELIGIBLE: return "eligible";
166            case FOLLOWUP: return "follow-up";
167            case INELIGIBLE: return "ineligible";
168            case NOTREGISTERED: return "not-registered";
169            case OFFSTUDY: return "off-study";
170            case ONSTUDY: return "on-study";
171            case ONSTUDYINTERVENTION: return "on-study-intervention";
172            case ONSTUDYOBSERVATION: return "on-study-observation";
173            case PENDINGONSTUDY: return "pending-on-study";
174            case POTENTIALCANDIDATE: return "potential-candidate";
175            case SCREENING: return "screening";
176            case WITHDRAWN: return "withdrawn";
177            default: return "?";
178          }
179        }
180        public String getSystem() {
181          switch (this) {
182            case CANDIDATE: return "http://hl7.org/fhir/research-subject-status";
183            case ELIGIBLE: return "http://hl7.org/fhir/research-subject-status";
184            case FOLLOWUP: return "http://hl7.org/fhir/research-subject-status";
185            case INELIGIBLE: return "http://hl7.org/fhir/research-subject-status";
186            case NOTREGISTERED: return "http://hl7.org/fhir/research-subject-status";
187            case OFFSTUDY: return "http://hl7.org/fhir/research-subject-status";
188            case ONSTUDY: return "http://hl7.org/fhir/research-subject-status";
189            case ONSTUDYINTERVENTION: return "http://hl7.org/fhir/research-subject-status";
190            case ONSTUDYOBSERVATION: return "http://hl7.org/fhir/research-subject-status";
191            case PENDINGONSTUDY: return "http://hl7.org/fhir/research-subject-status";
192            case POTENTIALCANDIDATE: return "http://hl7.org/fhir/research-subject-status";
193            case SCREENING: return "http://hl7.org/fhir/research-subject-status";
194            case WITHDRAWN: return "http://hl7.org/fhir/research-subject-status";
195            default: return "?";
196          }
197        }
198        public String getDefinition() {
199          switch (this) {
200            case CANDIDATE: return "An identified person that can be considered for inclusion in a study.";
201            case ELIGIBLE: return "A person that has met the eligibility criteria for inclusion in a study.";
202            case FOLLOWUP: return "A person is no longer receiving study intervention and/or being evaluated with tests and procedures according to the protocol, but they are being monitored on a protocol-prescribed schedule.";
203            case INELIGIBLE: return "A person who did not meet one or more criteria required for participation in a study is considered to have failed screening or\nis ineligible for the study.";
204            case NOTREGISTERED: return "A person for whom registration was not completed.";
205            case OFFSTUDY: return "A person that has ended their participation on a study either because their treatment/observation is complete or through not\nresponding, withdrawal, non-compliance and/or adverse event.";
206            case ONSTUDY: return "A person that is enrolled or registered on a study.";
207            case ONSTUDYINTERVENTION: return "The person is receiving the treatment or participating in an activity (e.g. yoga, diet, etc.) that the study is evaluating.";
208            case ONSTUDYOBSERVATION: return "The subject is being evaluated via tests and assessments according to the study calendar, but is not receiving any intervention. Note that this state is study-dependent and might not exist in all studies.  A synonym for this is \"short-term follow-up\".";
209            case PENDINGONSTUDY: return "A person is pre-registered for a study.";
210            case POTENTIALCANDIDATE: return "A person that is potentially eligible for participation in the study.";
211            case SCREENING: return "A person who is being evaluated for eligibility for a study.";
212            case WITHDRAWN: return "The person has withdrawn their participation in the study before registration.";
213            default: return "?";
214          }
215        }
216        public String getDisplay() {
217          switch (this) {
218            case CANDIDATE: return "Candidate";
219            case ELIGIBLE: return "Eligible";
220            case FOLLOWUP: return "Follow-up";
221            case INELIGIBLE: return "Ineligible";
222            case NOTREGISTERED: return "Not Registered";
223            case OFFSTUDY: return "Off-study";
224            case ONSTUDY: return "On-study";
225            case ONSTUDYINTERVENTION: return "On-study-intervention";
226            case ONSTUDYOBSERVATION: return "On-study-observation";
227            case PENDINGONSTUDY: return "Pending on-study";
228            case POTENTIALCANDIDATE: return "Potential Candidate";
229            case SCREENING: return "Screening";
230            case WITHDRAWN: return "Withdrawn";
231            default: return "?";
232          }
233        }
234    }
235
236  public static class ResearchSubjectStatusEnumFactory implements EnumFactory<ResearchSubjectStatus> {
237    public ResearchSubjectStatus fromCode(String codeString) throws IllegalArgumentException {
238      if (codeString == null || "".equals(codeString))
239            if (codeString == null || "".equals(codeString))
240                return null;
241        if ("candidate".equals(codeString))
242          return ResearchSubjectStatus.CANDIDATE;
243        if ("eligible".equals(codeString))
244          return ResearchSubjectStatus.ELIGIBLE;
245        if ("follow-up".equals(codeString))
246          return ResearchSubjectStatus.FOLLOWUP;
247        if ("ineligible".equals(codeString))
248          return ResearchSubjectStatus.INELIGIBLE;
249        if ("not-registered".equals(codeString))
250          return ResearchSubjectStatus.NOTREGISTERED;
251        if ("off-study".equals(codeString))
252          return ResearchSubjectStatus.OFFSTUDY;
253        if ("on-study".equals(codeString))
254          return ResearchSubjectStatus.ONSTUDY;
255        if ("on-study-intervention".equals(codeString))
256          return ResearchSubjectStatus.ONSTUDYINTERVENTION;
257        if ("on-study-observation".equals(codeString))
258          return ResearchSubjectStatus.ONSTUDYOBSERVATION;
259        if ("pending-on-study".equals(codeString))
260          return ResearchSubjectStatus.PENDINGONSTUDY;
261        if ("potential-candidate".equals(codeString))
262          return ResearchSubjectStatus.POTENTIALCANDIDATE;
263        if ("screening".equals(codeString))
264          return ResearchSubjectStatus.SCREENING;
265        if ("withdrawn".equals(codeString))
266          return ResearchSubjectStatus.WITHDRAWN;
267        throw new IllegalArgumentException("Unknown ResearchSubjectStatus code '"+codeString+"'");
268        }
269        public Enumeration<ResearchSubjectStatus> fromType(Base code) throws FHIRException {
270          if (code == null)
271            return null;
272          if (code.isEmpty())
273            return new Enumeration<ResearchSubjectStatus>(this);
274          String codeString = ((PrimitiveType) code).asStringValue();
275          if (codeString == null || "".equals(codeString))
276            return null;
277        if ("candidate".equals(codeString))
278          return new Enumeration<ResearchSubjectStatus>(this, ResearchSubjectStatus.CANDIDATE);
279        if ("eligible".equals(codeString))
280          return new Enumeration<ResearchSubjectStatus>(this, ResearchSubjectStatus.ELIGIBLE);
281        if ("follow-up".equals(codeString))
282          return new Enumeration<ResearchSubjectStatus>(this, ResearchSubjectStatus.FOLLOWUP);
283        if ("ineligible".equals(codeString))
284          return new Enumeration<ResearchSubjectStatus>(this, ResearchSubjectStatus.INELIGIBLE);
285        if ("not-registered".equals(codeString))
286          return new Enumeration<ResearchSubjectStatus>(this, ResearchSubjectStatus.NOTREGISTERED);
287        if ("off-study".equals(codeString))
288          return new Enumeration<ResearchSubjectStatus>(this, ResearchSubjectStatus.OFFSTUDY);
289        if ("on-study".equals(codeString))
290          return new Enumeration<ResearchSubjectStatus>(this, ResearchSubjectStatus.ONSTUDY);
291        if ("on-study-intervention".equals(codeString))
292          return new Enumeration<ResearchSubjectStatus>(this, ResearchSubjectStatus.ONSTUDYINTERVENTION);
293        if ("on-study-observation".equals(codeString))
294          return new Enumeration<ResearchSubjectStatus>(this, ResearchSubjectStatus.ONSTUDYOBSERVATION);
295        if ("pending-on-study".equals(codeString))
296          return new Enumeration<ResearchSubjectStatus>(this, ResearchSubjectStatus.PENDINGONSTUDY);
297        if ("potential-candidate".equals(codeString))
298          return new Enumeration<ResearchSubjectStatus>(this, ResearchSubjectStatus.POTENTIALCANDIDATE);
299        if ("screening".equals(codeString))
300          return new Enumeration<ResearchSubjectStatus>(this, ResearchSubjectStatus.SCREENING);
301        if ("withdrawn".equals(codeString))
302          return new Enumeration<ResearchSubjectStatus>(this, ResearchSubjectStatus.WITHDRAWN);
303        throw new FHIRException("Unknown ResearchSubjectStatus code '"+codeString+"'");
304        }
305    public String toCode(ResearchSubjectStatus code) {
306      if (code == ResearchSubjectStatus.CANDIDATE)
307        return "candidate";
308      if (code == ResearchSubjectStatus.ELIGIBLE)
309        return "eligible";
310      if (code == ResearchSubjectStatus.FOLLOWUP)
311        return "follow-up";
312      if (code == ResearchSubjectStatus.INELIGIBLE)
313        return "ineligible";
314      if (code == ResearchSubjectStatus.NOTREGISTERED)
315        return "not-registered";
316      if (code == ResearchSubjectStatus.OFFSTUDY)
317        return "off-study";
318      if (code == ResearchSubjectStatus.ONSTUDY)
319        return "on-study";
320      if (code == ResearchSubjectStatus.ONSTUDYINTERVENTION)
321        return "on-study-intervention";
322      if (code == ResearchSubjectStatus.ONSTUDYOBSERVATION)
323        return "on-study-observation";
324      if (code == ResearchSubjectStatus.PENDINGONSTUDY)
325        return "pending-on-study";
326      if (code == ResearchSubjectStatus.POTENTIALCANDIDATE)
327        return "potential-candidate";
328      if (code == ResearchSubjectStatus.SCREENING)
329        return "screening";
330      if (code == ResearchSubjectStatus.WITHDRAWN)
331        return "withdrawn";
332      return "?";
333      }
334    public String toSystem(ResearchSubjectStatus code) {
335      return code.getSystem();
336      }
337    }
338
339    /**
340     * Identifiers assigned to this research subject for a study.
341     */
342    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
343    @Description(shortDefinition="Business Identifier for research subject in a study", formalDefinition="Identifiers assigned to this research subject for a study." )
344    protected List<Identifier> identifier;
345
346    /**
347     * The current state of the subject.
348     */
349    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
350    @Description(shortDefinition="candidate | eligible | follow-up | ineligible | not-registered | off-study | on-study | on-study-intervention | on-study-observation | pending-on-study | potential-candidate | screening | withdrawn", formalDefinition="The current state of the subject." )
351    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/research-subject-status")
352    protected Enumeration<ResearchSubjectStatus> status;
353
354    /**
355     * The dates the subject began and ended their participation in the study.
356     */
357    @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=true)
358    @Description(shortDefinition="Start and end of participation", formalDefinition="The dates the subject began and ended their participation in the study." )
359    protected Period period;
360
361    /**
362     * Reference to the study the subject is participating in.
363     */
364    @Child(name = "study", type = {ResearchStudy.class}, order=3, min=1, max=1, modifier=false, summary=true)
365    @Description(shortDefinition="Study subject is part of", formalDefinition="Reference to the study the subject is participating in." )
366    protected Reference study;
367
368    /**
369     * The actual object that is the target of the reference (Reference to the study the subject is participating in.)
370     */
371    protected ResearchStudy studyTarget;
372
373    /**
374     * The record of the person or animal who is involved in the study.
375     */
376    @Child(name = "individual", type = {Patient.class}, order=4, min=1, max=1, modifier=false, summary=true)
377    @Description(shortDefinition="Who is part of study", formalDefinition="The record of the person or animal who is involved in the study." )
378    protected Reference individual;
379
380    /**
381     * The actual object that is the target of the reference (The record of the person or animal who is involved in the study.)
382     */
383    protected Patient individualTarget;
384
385    /**
386     * The name of the arm in the study the subject is expected to follow as part of this study.
387     */
388    @Child(name = "assignedArm", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
389    @Description(shortDefinition="What path should be followed", formalDefinition="The name of the arm in the study the subject is expected to follow as part of this study." )
390    protected StringType assignedArm;
391
392    /**
393     * The name of the arm in the study the subject actually followed as part of this study.
394     */
395    @Child(name = "actualArm", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
396    @Description(shortDefinition="What path was followed", formalDefinition="The name of the arm in the study the subject actually followed as part of this study." )
397    protected StringType actualArm;
398
399    /**
400     * A record of the patient's informed agreement to participate in the study.
401     */
402    @Child(name = "consent", type = {Consent.class}, order=7, min=0, max=1, modifier=false, summary=false)
403    @Description(shortDefinition="Agreement to participate in study", formalDefinition="A record of the patient's informed agreement to participate in the study." )
404    protected Reference consent;
405
406    /**
407     * The actual object that is the target of the reference (A record of the patient's informed agreement to participate in the study.)
408     */
409    protected Consent consentTarget;
410
411    private static final long serialVersionUID = -884133739L;
412
413  /**
414   * Constructor
415   */
416    public ResearchSubject() {
417      super();
418    }
419
420  /**
421   * Constructor
422   */
423    public ResearchSubject(Enumeration<ResearchSubjectStatus> status, Reference study, Reference individual) {
424      super();
425      this.status = status;
426      this.study = study;
427      this.individual = individual;
428    }
429
430    /**
431     * @return {@link #identifier} (Identifiers assigned to this research subject for a study.)
432     */
433    public List<Identifier> getIdentifier() { 
434      if (this.identifier == null)
435        this.identifier = new ArrayList<Identifier>();
436      return this.identifier;
437    }
438
439    /**
440     * @return Returns a reference to <code>this</code> for easy method chaining
441     */
442    public ResearchSubject setIdentifier(List<Identifier> theIdentifier) { 
443      this.identifier = theIdentifier;
444      return this;
445    }
446
447    public boolean hasIdentifier() { 
448      if (this.identifier == null)
449        return false;
450      for (Identifier item : this.identifier)
451        if (!item.isEmpty())
452          return true;
453      return false;
454    }
455
456    public Identifier addIdentifier() { //3
457      Identifier t = new Identifier();
458      if (this.identifier == null)
459        this.identifier = new ArrayList<Identifier>();
460      this.identifier.add(t);
461      return t;
462    }
463
464    public ResearchSubject addIdentifier(Identifier t) { //3
465      if (t == null)
466        return this;
467      if (this.identifier == null)
468        this.identifier = new ArrayList<Identifier>();
469      this.identifier.add(t);
470      return this;
471    }
472
473    /**
474     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
475     */
476    public Identifier getIdentifierFirstRep() { 
477      if (getIdentifier().isEmpty()) {
478        addIdentifier();
479      }
480      return getIdentifier().get(0);
481    }
482
483    /**
484     * @return {@link #status} (The current state of the subject.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
485     */
486    public Enumeration<ResearchSubjectStatus> getStatusElement() { 
487      if (this.status == null)
488        if (Configuration.errorOnAutoCreate())
489          throw new Error("Attempt to auto-create ResearchSubject.status");
490        else if (Configuration.doAutoCreate())
491          this.status = new Enumeration<ResearchSubjectStatus>(new ResearchSubjectStatusEnumFactory()); // bb
492      return this.status;
493    }
494
495    public boolean hasStatusElement() { 
496      return this.status != null && !this.status.isEmpty();
497    }
498
499    public boolean hasStatus() { 
500      return this.status != null && !this.status.isEmpty();
501    }
502
503    /**
504     * @param value {@link #status} (The current state of the subject.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
505     */
506    public ResearchSubject setStatusElement(Enumeration<ResearchSubjectStatus> value) { 
507      this.status = value;
508      return this;
509    }
510
511    /**
512     * @return The current state of the subject.
513     */
514    public ResearchSubjectStatus getStatus() { 
515      return this.status == null ? null : this.status.getValue();
516    }
517
518    /**
519     * @param value The current state of the subject.
520     */
521    public ResearchSubject setStatus(ResearchSubjectStatus value) { 
522        if (this.status == null)
523          this.status = new Enumeration<ResearchSubjectStatus>(new ResearchSubjectStatusEnumFactory());
524        this.status.setValue(value);
525      return this;
526    }
527
528    /**
529     * @return {@link #period} (The dates the subject began and ended their participation in the study.)
530     */
531    public Period getPeriod() { 
532      if (this.period == null)
533        if (Configuration.errorOnAutoCreate())
534          throw new Error("Attempt to auto-create ResearchSubject.period");
535        else if (Configuration.doAutoCreate())
536          this.period = new Period(); // cc
537      return this.period;
538    }
539
540    public boolean hasPeriod() { 
541      return this.period != null && !this.period.isEmpty();
542    }
543
544    /**
545     * @param value {@link #period} (The dates the subject began and ended their participation in the study.)
546     */
547    public ResearchSubject setPeriod(Period value) { 
548      this.period = value;
549      return this;
550    }
551
552    /**
553     * @return {@link #study} (Reference to the study the subject is participating in.)
554     */
555    public Reference getStudy() { 
556      if (this.study == null)
557        if (Configuration.errorOnAutoCreate())
558          throw new Error("Attempt to auto-create ResearchSubject.study");
559        else if (Configuration.doAutoCreate())
560          this.study = new Reference(); // cc
561      return this.study;
562    }
563
564    public boolean hasStudy() { 
565      return this.study != null && !this.study.isEmpty();
566    }
567
568    /**
569     * @param value {@link #study} (Reference to the study the subject is participating in.)
570     */
571    public ResearchSubject setStudy(Reference value) { 
572      this.study = value;
573      return this;
574    }
575
576    /**
577     * @return {@link #study} 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. (Reference to the study the subject is participating in.)
578     */
579    public ResearchStudy getStudyTarget() { 
580      if (this.studyTarget == null)
581        if (Configuration.errorOnAutoCreate())
582          throw new Error("Attempt to auto-create ResearchSubject.study");
583        else if (Configuration.doAutoCreate())
584          this.studyTarget = new ResearchStudy(); // aa
585      return this.studyTarget;
586    }
587
588    /**
589     * @param value {@link #study} 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. (Reference to the study the subject is participating in.)
590     */
591    public ResearchSubject setStudyTarget(ResearchStudy value) { 
592      this.studyTarget = value;
593      return this;
594    }
595
596    /**
597     * @return {@link #individual} (The record of the person or animal who is involved in the study.)
598     */
599    public Reference getIndividual() { 
600      if (this.individual == null)
601        if (Configuration.errorOnAutoCreate())
602          throw new Error("Attempt to auto-create ResearchSubject.individual");
603        else if (Configuration.doAutoCreate())
604          this.individual = new Reference(); // cc
605      return this.individual;
606    }
607
608    public boolean hasIndividual() { 
609      return this.individual != null && !this.individual.isEmpty();
610    }
611
612    /**
613     * @param value {@link #individual} (The record of the person or animal who is involved in the study.)
614     */
615    public ResearchSubject setIndividual(Reference value) { 
616      this.individual = value;
617      return this;
618    }
619
620    /**
621     * @return {@link #individual} 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 record of the person or animal who is involved in the study.)
622     */
623    public Patient getIndividualTarget() { 
624      if (this.individualTarget == null)
625        if (Configuration.errorOnAutoCreate())
626          throw new Error("Attempt to auto-create ResearchSubject.individual");
627        else if (Configuration.doAutoCreate())
628          this.individualTarget = new Patient(); // aa
629      return this.individualTarget;
630    }
631
632    /**
633     * @param value {@link #individual} 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 record of the person or animal who is involved in the study.)
634     */
635    public ResearchSubject setIndividualTarget(Patient value) { 
636      this.individualTarget = value;
637      return this;
638    }
639
640    /**
641     * @return {@link #assignedArm} (The name of the arm in the study the subject is expected to follow as part of this study.). This is the underlying object with id, value and extensions. The accessor "getAssignedArm" gives direct access to the value
642     */
643    public StringType getAssignedArmElement() { 
644      if (this.assignedArm == null)
645        if (Configuration.errorOnAutoCreate())
646          throw new Error("Attempt to auto-create ResearchSubject.assignedArm");
647        else if (Configuration.doAutoCreate())
648          this.assignedArm = new StringType(); // bb
649      return this.assignedArm;
650    }
651
652    public boolean hasAssignedArmElement() { 
653      return this.assignedArm != null && !this.assignedArm.isEmpty();
654    }
655
656    public boolean hasAssignedArm() { 
657      return this.assignedArm != null && !this.assignedArm.isEmpty();
658    }
659
660    /**
661     * @param value {@link #assignedArm} (The name of the arm in the study the subject is expected to follow as part of this study.). This is the underlying object with id, value and extensions. The accessor "getAssignedArm" gives direct access to the value
662     */
663    public ResearchSubject setAssignedArmElement(StringType value) { 
664      this.assignedArm = value;
665      return this;
666    }
667
668    /**
669     * @return The name of the arm in the study the subject is expected to follow as part of this study.
670     */
671    public String getAssignedArm() { 
672      return this.assignedArm == null ? null : this.assignedArm.getValue();
673    }
674
675    /**
676     * @param value The name of the arm in the study the subject is expected to follow as part of this study.
677     */
678    public ResearchSubject setAssignedArm(String value) { 
679      if (Utilities.noString(value))
680        this.assignedArm = null;
681      else {
682        if (this.assignedArm == null)
683          this.assignedArm = new StringType();
684        this.assignedArm.setValue(value);
685      }
686      return this;
687    }
688
689    /**
690     * @return {@link #actualArm} (The name of the arm in the study the subject actually followed as part of this study.). This is the underlying object with id, value and extensions. The accessor "getActualArm" gives direct access to the value
691     */
692    public StringType getActualArmElement() { 
693      if (this.actualArm == null)
694        if (Configuration.errorOnAutoCreate())
695          throw new Error("Attempt to auto-create ResearchSubject.actualArm");
696        else if (Configuration.doAutoCreate())
697          this.actualArm = new StringType(); // bb
698      return this.actualArm;
699    }
700
701    public boolean hasActualArmElement() { 
702      return this.actualArm != null && !this.actualArm.isEmpty();
703    }
704
705    public boolean hasActualArm() { 
706      return this.actualArm != null && !this.actualArm.isEmpty();
707    }
708
709    /**
710     * @param value {@link #actualArm} (The name of the arm in the study the subject actually followed as part of this study.). This is the underlying object with id, value and extensions. The accessor "getActualArm" gives direct access to the value
711     */
712    public ResearchSubject setActualArmElement(StringType value) { 
713      this.actualArm = value;
714      return this;
715    }
716
717    /**
718     * @return The name of the arm in the study the subject actually followed as part of this study.
719     */
720    public String getActualArm() { 
721      return this.actualArm == null ? null : this.actualArm.getValue();
722    }
723
724    /**
725     * @param value The name of the arm in the study the subject actually followed as part of this study.
726     */
727    public ResearchSubject setActualArm(String value) { 
728      if (Utilities.noString(value))
729        this.actualArm = null;
730      else {
731        if (this.actualArm == null)
732          this.actualArm = new StringType();
733        this.actualArm.setValue(value);
734      }
735      return this;
736    }
737
738    /**
739     * @return {@link #consent} (A record of the patient's informed agreement to participate in the study.)
740     */
741    public Reference getConsent() { 
742      if (this.consent == null)
743        if (Configuration.errorOnAutoCreate())
744          throw new Error("Attempt to auto-create ResearchSubject.consent");
745        else if (Configuration.doAutoCreate())
746          this.consent = new Reference(); // cc
747      return this.consent;
748    }
749
750    public boolean hasConsent() { 
751      return this.consent != null && !this.consent.isEmpty();
752    }
753
754    /**
755     * @param value {@link #consent} (A record of the patient's informed agreement to participate in the study.)
756     */
757    public ResearchSubject setConsent(Reference value) { 
758      this.consent = value;
759      return this;
760    }
761
762    /**
763     * @return {@link #consent} 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. (A record of the patient's informed agreement to participate in the study.)
764     */
765    public Consent getConsentTarget() { 
766      if (this.consentTarget == null)
767        if (Configuration.errorOnAutoCreate())
768          throw new Error("Attempt to auto-create ResearchSubject.consent");
769        else if (Configuration.doAutoCreate())
770          this.consentTarget = new Consent(); // aa
771      return this.consentTarget;
772    }
773
774    /**
775     * @param value {@link #consent} 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. (A record of the patient's informed agreement to participate in the study.)
776     */
777    public ResearchSubject setConsentTarget(Consent value) { 
778      this.consentTarget = value;
779      return this;
780    }
781
782      protected void listChildren(List<Property> children) {
783        super.listChildren(children);
784        children.add(new Property("identifier", "Identifier", "Identifiers assigned to this research subject for a study.", 0, java.lang.Integer.MAX_VALUE, identifier));
785        children.add(new Property("status", "code", "The current state of the subject.", 0, 1, status));
786        children.add(new Property("period", "Period", "The dates the subject began and ended their participation in the study.", 0, 1, period));
787        children.add(new Property("study", "Reference(ResearchStudy)", "Reference to the study the subject is participating in.", 0, 1, study));
788        children.add(new Property("individual", "Reference(Patient)", "The record of the person or animal who is involved in the study.", 0, 1, individual));
789        children.add(new Property("assignedArm", "string", "The name of the arm in the study the subject is expected to follow as part of this study.", 0, 1, assignedArm));
790        children.add(new Property("actualArm", "string", "The name of the arm in the study the subject actually followed as part of this study.", 0, 1, actualArm));
791        children.add(new Property("consent", "Reference(Consent)", "A record of the patient's informed agreement to participate in the study.", 0, 1, consent));
792      }
793
794      @Override
795      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
796        switch (_hash) {
797        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Identifiers assigned to this research subject for a study.", 0, java.lang.Integer.MAX_VALUE, identifier);
798        case -892481550: /*status*/  return new Property("status", "code", "The current state of the subject.", 0, 1, status);
799        case -991726143: /*period*/  return new Property("period", "Period", "The dates the subject began and ended their participation in the study.", 0, 1, period);
800        case 109776329: /*study*/  return new Property("study", "Reference(ResearchStudy)", "Reference to the study the subject is participating in.", 0, 1, study);
801        case -46292327: /*individual*/  return new Property("individual", "Reference(Patient)", "The record of the person or animal who is involved in the study.", 0, 1, individual);
802        case 1741912494: /*assignedArm*/  return new Property("assignedArm", "string", "The name of the arm in the study the subject is expected to follow as part of this study.", 0, 1, assignedArm);
803        case 528827886: /*actualArm*/  return new Property("actualArm", "string", "The name of the arm in the study the subject actually followed as part of this study.", 0, 1, actualArm);
804        case 951500826: /*consent*/  return new Property("consent", "Reference(Consent)", "A record of the patient's informed agreement to participate in the study.", 0, 1, consent);
805        default: return super.getNamedProperty(_hash, _name, _checkValid);
806        }
807
808      }
809
810      @Override
811      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
812        switch (hash) {
813        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
814        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ResearchSubjectStatus>
815        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
816        case 109776329: /*study*/ return this.study == null ? new Base[0] : new Base[] {this.study}; // Reference
817        case -46292327: /*individual*/ return this.individual == null ? new Base[0] : new Base[] {this.individual}; // Reference
818        case 1741912494: /*assignedArm*/ return this.assignedArm == null ? new Base[0] : new Base[] {this.assignedArm}; // StringType
819        case 528827886: /*actualArm*/ return this.actualArm == null ? new Base[0] : new Base[] {this.actualArm}; // StringType
820        case 951500826: /*consent*/ return this.consent == null ? new Base[0] : new Base[] {this.consent}; // Reference
821        default: return super.getProperty(hash, name, checkValid);
822        }
823
824      }
825
826      @Override
827      public Base setProperty(int hash, String name, Base value) throws FHIRException {
828        switch (hash) {
829        case -1618432855: // identifier
830          this.getIdentifier().add(castToIdentifier(value)); // Identifier
831          return value;
832        case -892481550: // status
833          value = new ResearchSubjectStatusEnumFactory().fromType(castToCode(value));
834          this.status = (Enumeration) value; // Enumeration<ResearchSubjectStatus>
835          return value;
836        case -991726143: // period
837          this.period = castToPeriod(value); // Period
838          return value;
839        case 109776329: // study
840          this.study = castToReference(value); // Reference
841          return value;
842        case -46292327: // individual
843          this.individual = castToReference(value); // Reference
844          return value;
845        case 1741912494: // assignedArm
846          this.assignedArm = castToString(value); // StringType
847          return value;
848        case 528827886: // actualArm
849          this.actualArm = castToString(value); // StringType
850          return value;
851        case 951500826: // consent
852          this.consent = castToReference(value); // Reference
853          return value;
854        default: return super.setProperty(hash, name, value);
855        }
856
857      }
858
859      @Override
860      public Base setProperty(String name, Base value) throws FHIRException {
861        if (name.equals("identifier")) {
862          this.getIdentifier().add(castToIdentifier(value));
863        } else if (name.equals("status")) {
864          value = new ResearchSubjectStatusEnumFactory().fromType(castToCode(value));
865          this.status = (Enumeration) value; // Enumeration<ResearchSubjectStatus>
866        } else if (name.equals("period")) {
867          this.period = castToPeriod(value); // Period
868        } else if (name.equals("study")) {
869          this.study = castToReference(value); // Reference
870        } else if (name.equals("individual")) {
871          this.individual = castToReference(value); // Reference
872        } else if (name.equals("assignedArm")) {
873          this.assignedArm = castToString(value); // StringType
874        } else if (name.equals("actualArm")) {
875          this.actualArm = castToString(value); // StringType
876        } else if (name.equals("consent")) {
877          this.consent = castToReference(value); // Reference
878        } else
879          return super.setProperty(name, value);
880        return value;
881      }
882
883      @Override
884      public Base makeProperty(int hash, String name) throws FHIRException {
885        switch (hash) {
886        case -1618432855:  return addIdentifier(); 
887        case -892481550:  return getStatusElement();
888        case -991726143:  return getPeriod(); 
889        case 109776329:  return getStudy(); 
890        case -46292327:  return getIndividual(); 
891        case 1741912494:  return getAssignedArmElement();
892        case 528827886:  return getActualArmElement();
893        case 951500826:  return getConsent(); 
894        default: return super.makeProperty(hash, name);
895        }
896
897      }
898
899      @Override
900      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
901        switch (hash) {
902        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
903        case -892481550: /*status*/ return new String[] {"code"};
904        case -991726143: /*period*/ return new String[] {"Period"};
905        case 109776329: /*study*/ return new String[] {"Reference"};
906        case -46292327: /*individual*/ return new String[] {"Reference"};
907        case 1741912494: /*assignedArm*/ return new String[] {"string"};
908        case 528827886: /*actualArm*/ return new String[] {"string"};
909        case 951500826: /*consent*/ return new String[] {"Reference"};
910        default: return super.getTypesForProperty(hash, name);
911        }
912
913      }
914
915      @Override
916      public Base addChild(String name) throws FHIRException {
917        if (name.equals("identifier")) {
918          return addIdentifier();
919        }
920        else if (name.equals("status")) {
921          throw new FHIRException("Cannot call addChild on a primitive type ResearchSubject.status");
922        }
923        else if (name.equals("period")) {
924          this.period = new Period();
925          return this.period;
926        }
927        else if (name.equals("study")) {
928          this.study = new Reference();
929          return this.study;
930        }
931        else if (name.equals("individual")) {
932          this.individual = new Reference();
933          return this.individual;
934        }
935        else if (name.equals("assignedArm")) {
936          throw new FHIRException("Cannot call addChild on a primitive type ResearchSubject.assignedArm");
937        }
938        else if (name.equals("actualArm")) {
939          throw new FHIRException("Cannot call addChild on a primitive type ResearchSubject.actualArm");
940        }
941        else if (name.equals("consent")) {
942          this.consent = new Reference();
943          return this.consent;
944        }
945        else
946          return super.addChild(name);
947      }
948
949  public String fhirType() {
950    return "ResearchSubject";
951
952  }
953
954      public ResearchSubject copy() {
955        ResearchSubject dst = new ResearchSubject();
956        copyValues(dst);
957        if (identifier != null) {
958          dst.identifier = new ArrayList<Identifier>();
959          for (Identifier i : identifier)
960            dst.identifier.add(i.copy());
961        };
962        dst.status = status == null ? null : status.copy();
963        dst.period = period == null ? null : period.copy();
964        dst.study = study == null ? null : study.copy();
965        dst.individual = individual == null ? null : individual.copy();
966        dst.assignedArm = assignedArm == null ? null : assignedArm.copy();
967        dst.actualArm = actualArm == null ? null : actualArm.copy();
968        dst.consent = consent == null ? null : consent.copy();
969        return dst;
970      }
971
972      protected ResearchSubject typedCopy() {
973        return copy();
974      }
975
976      @Override
977      public boolean equalsDeep(Base other_) {
978        if (!super.equalsDeep(other_))
979          return false;
980        if (!(other_ instanceof ResearchSubject))
981          return false;
982        ResearchSubject o = (ResearchSubject) other_;
983        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(period, o.period, true)
984           && compareDeep(study, o.study, true) && compareDeep(individual, o.individual, true) && compareDeep(assignedArm, o.assignedArm, true)
985           && compareDeep(actualArm, o.actualArm, true) && compareDeep(consent, o.consent, true);
986      }
987
988      @Override
989      public boolean equalsShallow(Base other_) {
990        if (!super.equalsShallow(other_))
991          return false;
992        if (!(other_ instanceof ResearchSubject))
993          return false;
994        ResearchSubject o = (ResearchSubject) other_;
995        return compareValues(status, o.status, true) && compareValues(assignedArm, o.assignedArm, true) && compareValues(actualArm, o.actualArm, true)
996          ;
997      }
998
999      public boolean isEmpty() {
1000        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, period
1001          , study, individual, assignedArm, actualArm, consent);
1002      }
1003
1004  @Override
1005  public ResourceType getResourceType() {
1006    return ResourceType.ResearchSubject;
1007   }
1008
1009 /**
1010   * Search parameter: <b>date</b>
1011   * <p>
1012   * Description: <b>Start and end of participation</b><br>
1013   * Type: <b>date</b><br>
1014   * Path: <b>ResearchSubject.period</b><br>
1015   * </p>
1016   */
1017  @SearchParamDefinition(name="date", path="ResearchSubject.period", description="Start and end of participation", type="date" )
1018  public static final String SP_DATE = "date";
1019 /**
1020   * <b>Fluent Client</b> search parameter constant for <b>date</b>
1021   * <p>
1022   * Description: <b>Start and end of participation</b><br>
1023   * Type: <b>date</b><br>
1024   * Path: <b>ResearchSubject.period</b><br>
1025   * </p>
1026   */
1027  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
1028
1029 /**
1030   * Search parameter: <b>identifier</b>
1031   * <p>
1032   * Description: <b>Business Identifier for research subject in a study</b><br>
1033   * Type: <b>token</b><br>
1034   * Path: <b>ResearchSubject.identifier</b><br>
1035   * </p>
1036   */
1037  @SearchParamDefinition(name="identifier", path="ResearchSubject.identifier", description="Business Identifier for research subject in a study", type="token" )
1038  public static final String SP_IDENTIFIER = "identifier";
1039 /**
1040   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1041   * <p>
1042   * Description: <b>Business Identifier for research subject in a study</b><br>
1043   * Type: <b>token</b><br>
1044   * Path: <b>ResearchSubject.identifier</b><br>
1045   * </p>
1046   */
1047  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1048
1049 /**
1050   * Search parameter: <b>study</b>
1051   * <p>
1052   * Description: <b>Study subject is part of</b><br>
1053   * Type: <b>reference</b><br>
1054   * Path: <b>ResearchSubject.study</b><br>
1055   * </p>
1056   */
1057  @SearchParamDefinition(name="study", path="ResearchSubject.study", description="Study subject is part of", type="reference", target={ResearchStudy.class } )
1058  public static final String SP_STUDY = "study";
1059 /**
1060   * <b>Fluent Client</b> search parameter constant for <b>study</b>
1061   * <p>
1062   * Description: <b>Study subject is part of</b><br>
1063   * Type: <b>reference</b><br>
1064   * Path: <b>ResearchSubject.study</b><br>
1065   * </p>
1066   */
1067  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam STUDY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_STUDY);
1068
1069/**
1070   * Constant for fluent queries to be used to add include statements. Specifies
1071   * the path value of "<b>ResearchSubject:study</b>".
1072   */
1073  public static final ca.uhn.fhir.model.api.Include INCLUDE_STUDY = new ca.uhn.fhir.model.api.Include("ResearchSubject:study").toLocked();
1074
1075 /**
1076   * Search parameter: <b>individual</b>
1077   * <p>
1078   * Description: <b>Who is part of study</b><br>
1079   * Type: <b>reference</b><br>
1080   * Path: <b>ResearchSubject.individual</b><br>
1081   * </p>
1082   */
1083  @SearchParamDefinition(name="individual", path="ResearchSubject.individual", description="Who is part of study", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } )
1084  public static final String SP_INDIVIDUAL = "individual";
1085 /**
1086   * <b>Fluent Client</b> search parameter constant for <b>individual</b>
1087   * <p>
1088   * Description: <b>Who is part of study</b><br>
1089   * Type: <b>reference</b><br>
1090   * Path: <b>ResearchSubject.individual</b><br>
1091   * </p>
1092   */
1093  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INDIVIDUAL = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INDIVIDUAL);
1094
1095/**
1096   * Constant for fluent queries to be used to add include statements. Specifies
1097   * the path value of "<b>ResearchSubject:individual</b>".
1098   */
1099  public static final ca.uhn.fhir.model.api.Include INCLUDE_INDIVIDUAL = new ca.uhn.fhir.model.api.Include("ResearchSubject:individual").toLocked();
1100
1101 /**
1102   * Search parameter: <b>patient</b>
1103   * <p>
1104   * Description: <b>Who is part of study</b><br>
1105   * Type: <b>reference</b><br>
1106   * Path: <b>ResearchSubject.individual</b><br>
1107   * </p>
1108   */
1109  @SearchParamDefinition(name="patient", path="ResearchSubject.individual", description="Who is part of study", type="reference", target={Patient.class } )
1110  public static final String SP_PATIENT = "patient";
1111 /**
1112   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
1113   * <p>
1114   * Description: <b>Who is part of study</b><br>
1115   * Type: <b>reference</b><br>
1116   * Path: <b>ResearchSubject.individual</b><br>
1117   * </p>
1118   */
1119  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
1120
1121/**
1122   * Constant for fluent queries to be used to add include statements. Specifies
1123   * the path value of "<b>ResearchSubject:patient</b>".
1124   */
1125  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ResearchSubject:patient").toLocked();
1126
1127 /**
1128   * Search parameter: <b>status</b>
1129   * <p>
1130   * Description: <b>candidate | eligible | follow-up | ineligible | not-registered | off-study | on-study | on-study-intervention | on-study-observation | pending-on-study | potential-candidate | screening | withdrawn</b><br>
1131   * Type: <b>token</b><br>
1132   * Path: <b>ResearchSubject.status</b><br>
1133   * </p>
1134   */
1135  @SearchParamDefinition(name="status", path="ResearchSubject.status", description="candidate | eligible | follow-up | ineligible | not-registered | off-study | on-study | on-study-intervention | on-study-observation | pending-on-study | potential-candidate | screening | withdrawn", type="token" )
1136  public static final String SP_STATUS = "status";
1137 /**
1138   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1139   * <p>
1140   * Description: <b>candidate | eligible | follow-up | ineligible | not-registered | off-study | on-study | on-study-intervention | on-study-observation | pending-on-study | potential-candidate | screening | withdrawn</b><br>
1141   * Type: <b>token</b><br>
1142   * Path: <b>ResearchSubject.status</b><br>
1143   * </p>
1144   */
1145  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1146
1147
1148}
1149