001package org.hl7.fhir.r4.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 033 034import java.util.*; 035 036import java.math.*; 037import org.hl7.fhir.utilities.Utilities; 038import ca.uhn.fhir.model.api.annotation.ResourceDef; 039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 040import ca.uhn.fhir.model.api.annotation.Child; 041import ca.uhn.fhir.model.api.annotation.ChildOrder; 042import ca.uhn.fhir.model.api.annotation.Description; 043import ca.uhn.fhir.model.api.annotation.Block; 044import org.hl7.fhir.instance.model.api.*; 045import org.hl7.fhir.exceptions.FHIRException; 046/** 047 * Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement. 048 */ 049@ResourceDef(name="Contract", profile="http://hl7.org/fhir/StructureDefinition/Contract") 050public class Contract extends DomainResource { 051 052 public enum ContractStatus { 053 /** 054 * Contract is augmented with additional information to correct errors in a predecessor or to updated values in a predecessor. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: revised; replaced. 055 */ 056 AMENDED, 057 /** 058 * Contract is augmented with additional information that was missing from a predecessor Contract. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: updated, replaced. 059 */ 060 APPENDED, 061 /** 062 * Contract is terminated due to failure of the Grantor and/or the Grantee to fulfil one or more contract provisions. Usage: Abnormal contract termination. Precedence Order = 10. Comparable FHIR and v.3 status codes: stopped; failed; aborted. 063 */ 064 CANCELLED, 065 /** 066 * Contract is pended to rectify failure of the Grantor or the Grantee to fulfil contract provision(s). E.g., Grantee complaint about Grantor's failure to comply with contract provisions. Usage: Contract pended. Precedence Order = 7. Comparable FHIR and v.3 status codes: on hold; pended; suspended. 067 */ 068 DISPUTED, 069 /** 070 * Contract was created in error. No Precedence Order. Status may be applied to a Contract with any status. 071 */ 072 ENTEREDINERROR, 073 /** 074 * Contract execution pending; may be executed when either the Grantor or the Grantee accepts the contract provisions by signing. I.e., where either the Grantor or the Grantee has signed, but not both. E.g., when an insurance applicant signs the insurers application, which references the policy. Usage: Optional first step of contract execution activity. May be skipped and contracting activity moves directly to executed state. Precedence Order = 3. Comparable FHIR and v.3 status codes: draft; preliminary; planned; intended; active. 075 */ 076 EXECUTABLE, 077 /** 078 * Contract is activated for period stipulated when both the Grantor and Grantee have signed it. Usage: Required state for normal completion of contracting activity. Precedence Order = 6. Comparable FHIR and v.3 status codes: accepted; completed. 079 */ 080 EXECUTED, 081 /** 082 * Contract execution is suspended while either or both the Grantor and Grantee propose and consider new or revised contract provisions. I.e., where the party which has not signed proposes changes to the terms. E .g., a life insurer declines to agree to the signed application because the life insurer has evidence that the applicant, who asserted to being younger or a non-smoker to get a lower premium rate - but offers instead to agree to a higher premium based on the applicants actual age or smoking status. Usage: Optional contract activity between executable and executed state. Precedence Order = 4. Comparable FHIR and v.3 status codes: in progress; review; held. 083 */ 084 NEGOTIABLE, 085 /** 086 * Contract is a proposal by either the Grantor or the Grantee. Aka - A Contract hard copy or electronic 'template', 'form' or 'application'. E.g., health insurance application; consent directive form. Usage: Beginning of contract negotiation, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 2. Comparable FHIR and v.3 status codes: requested; new. 087 */ 088 OFFERED, 089 /** 090 * Contract template is available as the basis for an application or offer by the Grantor or Grantee. E.g., health insurance policy; consent directive policy. Usage: Required initial contract activity, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 1. Comparable FHIR and v.3 status codes: proposed; intended. 091 */ 092 POLICY, 093 /** 094 * Execution of the Contract is not completed because either or both the Grantor and Grantee decline to accept some or all of the contract provisions. Usage: Optional contract activity between executable and abnormal termination. Precedence Order = 5. Comparable FHIR and v.3 status codes: stopped; cancelled. 095 */ 096 REJECTED, 097 /** 098 * Beginning of a successor Contract at the termination of predecessor Contract lifecycle. Usage: Follows termination of a preceding Contract that has reached its expiry date. Precedence Order = 13. Comparable FHIR and v.3 status codes: superseded. 099 */ 100 RENEWED, 101 /** 102 * A Contract that is rescinded. May be required prior to replacing with an updated Contract. Comparable FHIR and v.3 status codes: nullified. 103 */ 104 REVOKED, 105 /** 106 * Contract is reactivated after being pended because of faulty execution. *E.g., competency of the signer(s), or where the policy is substantially different from and did not accompany the application/form so that the applicant could not compare them. Aka - ''reactivated''. Usage: Optional stage where a pended contract is reactivated. Precedence Order = 8. Comparable FHIR and v.3 status codes: reactivated. 107 */ 108 RESOLVED, 109 /** 110 * Contract reaches its expiry date. It might or might not be renewed or renegotiated. Usage: Normal end of contract period. Precedence Order = 12. Comparable FHIR and v.3 status codes: Obsoleted. 111 */ 112 TERMINATED, 113 /** 114 * added to help the parsers with the generic types 115 */ 116 NULL; 117 public static ContractStatus fromCode(String codeString) throws FHIRException { 118 if (codeString == null || "".equals(codeString)) 119 return null; 120 if ("amended".equals(codeString)) 121 return AMENDED; 122 if ("appended".equals(codeString)) 123 return APPENDED; 124 if ("cancelled".equals(codeString)) 125 return CANCELLED; 126 if ("disputed".equals(codeString)) 127 return DISPUTED; 128 if ("entered-in-error".equals(codeString)) 129 return ENTEREDINERROR; 130 if ("executable".equals(codeString)) 131 return EXECUTABLE; 132 if ("executed".equals(codeString)) 133 return EXECUTED; 134 if ("negotiable".equals(codeString)) 135 return NEGOTIABLE; 136 if ("offered".equals(codeString)) 137 return OFFERED; 138 if ("policy".equals(codeString)) 139 return POLICY; 140 if ("rejected".equals(codeString)) 141 return REJECTED; 142 if ("renewed".equals(codeString)) 143 return RENEWED; 144 if ("revoked".equals(codeString)) 145 return REVOKED; 146 if ("resolved".equals(codeString)) 147 return RESOLVED; 148 if ("terminated".equals(codeString)) 149 return TERMINATED; 150 if (Configuration.isAcceptInvalidEnums()) 151 return null; 152 else 153 throw new FHIRException("Unknown ContractStatus code '"+codeString+"'"); 154 } 155 public String toCode() { 156 switch (this) { 157 case AMENDED: return "amended"; 158 case APPENDED: return "appended"; 159 case CANCELLED: return "cancelled"; 160 case DISPUTED: return "disputed"; 161 case ENTEREDINERROR: return "entered-in-error"; 162 case EXECUTABLE: return "executable"; 163 case EXECUTED: return "executed"; 164 case NEGOTIABLE: return "negotiable"; 165 case OFFERED: return "offered"; 166 case POLICY: return "policy"; 167 case REJECTED: return "rejected"; 168 case RENEWED: return "renewed"; 169 case REVOKED: return "revoked"; 170 case RESOLVED: return "resolved"; 171 case TERMINATED: return "terminated"; 172 default: return "?"; 173 } 174 } 175 public String getSystem() { 176 switch (this) { 177 case AMENDED: return "http://hl7.org/fhir/contract-status"; 178 case APPENDED: return "http://hl7.org/fhir/contract-status"; 179 case CANCELLED: return "http://hl7.org/fhir/contract-status"; 180 case DISPUTED: return "http://hl7.org/fhir/contract-status"; 181 case ENTEREDINERROR: return "http://hl7.org/fhir/contract-status"; 182 case EXECUTABLE: return "http://hl7.org/fhir/contract-status"; 183 case EXECUTED: return "http://hl7.org/fhir/contract-status"; 184 case NEGOTIABLE: return "http://hl7.org/fhir/contract-status"; 185 case OFFERED: return "http://hl7.org/fhir/contract-status"; 186 case POLICY: return "http://hl7.org/fhir/contract-status"; 187 case REJECTED: return "http://hl7.org/fhir/contract-status"; 188 case RENEWED: return "http://hl7.org/fhir/contract-status"; 189 case REVOKED: return "http://hl7.org/fhir/contract-status"; 190 case RESOLVED: return "http://hl7.org/fhir/contract-status"; 191 case TERMINATED: return "http://hl7.org/fhir/contract-status"; 192 default: return "?"; 193 } 194 } 195 public String getDefinition() { 196 switch (this) { 197 case AMENDED: return "Contract is augmented with additional information to correct errors in a predecessor or to updated values in a predecessor. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: revised; replaced."; 198 case APPENDED: return "Contract is augmented with additional information that was missing from a predecessor Contract. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: updated, replaced."; 199 case CANCELLED: return "Contract is terminated due to failure of the Grantor and/or the Grantee to fulfil one or more contract provisions. Usage: Abnormal contract termination. Precedence Order = 10. Comparable FHIR and v.3 status codes: stopped; failed; aborted."; 200 case DISPUTED: return "Contract is pended to rectify failure of the Grantor or the Grantee to fulfil contract provision(s). E.g., Grantee complaint about Grantor's failure to comply with contract provisions. Usage: Contract pended. Precedence Order = 7. Comparable FHIR and v.3 status codes: on hold; pended; suspended."; 201 case ENTEREDINERROR: return "Contract was created in error. No Precedence Order. Status may be applied to a Contract with any status."; 202 case EXECUTABLE: return "Contract execution pending; may be executed when either the Grantor or the Grantee accepts the contract provisions by signing. I.e., where either the Grantor or the Grantee has signed, but not both. E.g., when an insurance applicant signs the insurers application, which references the policy. Usage: Optional first step of contract execution activity. May be skipped and contracting activity moves directly to executed state. Precedence Order = 3. Comparable FHIR and v.3 status codes: draft; preliminary; planned; intended; active."; 203 case EXECUTED: return "Contract is activated for period stipulated when both the Grantor and Grantee have signed it. Usage: Required state for normal completion of contracting activity. Precedence Order = 6. Comparable FHIR and v.3 status codes: accepted; completed."; 204 case NEGOTIABLE: return "Contract execution is suspended while either or both the Grantor and Grantee propose and consider new or revised contract provisions. I.e., where the party which has not signed proposes changes to the terms. E .g., a life insurer declines to agree to the signed application because the life insurer has evidence that the applicant, who asserted to being younger or a non-smoker to get a lower premium rate - but offers instead to agree to a higher premium based on the applicants actual age or smoking status. Usage: Optional contract activity between executable and executed state. Precedence Order = 4. Comparable FHIR and v.3 status codes: in progress; review; held."; 205 case OFFERED: return "Contract is a proposal by either the Grantor or the Grantee. Aka - A Contract hard copy or electronic 'template', 'form' or 'application'. E.g., health insurance application; consent directive form. Usage: Beginning of contract negotiation, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 2. Comparable FHIR and v.3 status codes: requested; new."; 206 case POLICY: return "Contract template is available as the basis for an application or offer by the Grantor or Grantee. E.g., health insurance policy; consent directive policy. Usage: Required initial contract activity, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 1. Comparable FHIR and v.3 status codes: proposed; intended."; 207 case REJECTED: return " Execution of the Contract is not completed because either or both the Grantor and Grantee decline to accept some or all of the contract provisions. Usage: Optional contract activity between executable and abnormal termination. Precedence Order = 5. Comparable FHIR and v.3 status codes: stopped; cancelled."; 208 case RENEWED: return "Beginning of a successor Contract at the termination of predecessor Contract lifecycle. Usage: Follows termination of a preceding Contract that has reached its expiry date. Precedence Order = 13. Comparable FHIR and v.3 status codes: superseded."; 209 case REVOKED: return "A Contract that is rescinded. May be required prior to replacing with an updated Contract. Comparable FHIR and v.3 status codes: nullified."; 210 case RESOLVED: return "Contract is reactivated after being pended because of faulty execution. *E.g., competency of the signer(s), or where the policy is substantially different from and did not accompany the application/form so that the applicant could not compare them. Aka - ''reactivated''. Usage: Optional stage where a pended contract is reactivated. Precedence Order = 8. Comparable FHIR and v.3 status codes: reactivated."; 211 case TERMINATED: return "Contract reaches its expiry date. It might or might not be renewed or renegotiated. Usage: Normal end of contract period. Precedence Order = 12. Comparable FHIR and v.3 status codes: Obsoleted."; 212 default: return "?"; 213 } 214 } 215 public String getDisplay() { 216 switch (this) { 217 case AMENDED: return "Amended"; 218 case APPENDED: return "Appended"; 219 case CANCELLED: return "Cancelled"; 220 case DISPUTED: return "Disputed"; 221 case ENTEREDINERROR: return "Entered in Error"; 222 case EXECUTABLE: return "Executable"; 223 case EXECUTED: return "Executed"; 224 case NEGOTIABLE: return "Negotiable"; 225 case OFFERED: return "Offered"; 226 case POLICY: return "Policy"; 227 case REJECTED: return "Rejected"; 228 case RENEWED: return "Renewed"; 229 case REVOKED: return "Revoked"; 230 case RESOLVED: return "Resolved"; 231 case TERMINATED: return "Terminated"; 232 default: return "?"; 233 } 234 } 235 } 236 237 public static class ContractStatusEnumFactory implements EnumFactory<ContractStatus> { 238 public ContractStatus fromCode(String codeString) throws IllegalArgumentException { 239 if (codeString == null || "".equals(codeString)) 240 if (codeString == null || "".equals(codeString)) 241 return null; 242 if ("amended".equals(codeString)) 243 return ContractStatus.AMENDED; 244 if ("appended".equals(codeString)) 245 return ContractStatus.APPENDED; 246 if ("cancelled".equals(codeString)) 247 return ContractStatus.CANCELLED; 248 if ("disputed".equals(codeString)) 249 return ContractStatus.DISPUTED; 250 if ("entered-in-error".equals(codeString)) 251 return ContractStatus.ENTEREDINERROR; 252 if ("executable".equals(codeString)) 253 return ContractStatus.EXECUTABLE; 254 if ("executed".equals(codeString)) 255 return ContractStatus.EXECUTED; 256 if ("negotiable".equals(codeString)) 257 return ContractStatus.NEGOTIABLE; 258 if ("offered".equals(codeString)) 259 return ContractStatus.OFFERED; 260 if ("policy".equals(codeString)) 261 return ContractStatus.POLICY; 262 if ("rejected".equals(codeString)) 263 return ContractStatus.REJECTED; 264 if ("renewed".equals(codeString)) 265 return ContractStatus.RENEWED; 266 if ("revoked".equals(codeString)) 267 return ContractStatus.REVOKED; 268 if ("resolved".equals(codeString)) 269 return ContractStatus.RESOLVED; 270 if ("terminated".equals(codeString)) 271 return ContractStatus.TERMINATED; 272 throw new IllegalArgumentException("Unknown ContractStatus code '"+codeString+"'"); 273 } 274 public Enumeration<ContractStatus> fromType(Base code) throws FHIRException { 275 if (code == null) 276 return null; 277 if (code.isEmpty()) 278 return new Enumeration<ContractStatus>(this); 279 String codeString = ((PrimitiveType) code).asStringValue(); 280 if (codeString == null || "".equals(codeString)) 281 return null; 282 if ("amended".equals(codeString)) 283 return new Enumeration<ContractStatus>(this, ContractStatus.AMENDED); 284 if ("appended".equals(codeString)) 285 return new Enumeration<ContractStatus>(this, ContractStatus.APPENDED); 286 if ("cancelled".equals(codeString)) 287 return new Enumeration<ContractStatus>(this, ContractStatus.CANCELLED); 288 if ("disputed".equals(codeString)) 289 return new Enumeration<ContractStatus>(this, ContractStatus.DISPUTED); 290 if ("entered-in-error".equals(codeString)) 291 return new Enumeration<ContractStatus>(this, ContractStatus.ENTEREDINERROR); 292 if ("executable".equals(codeString)) 293 return new Enumeration<ContractStatus>(this, ContractStatus.EXECUTABLE); 294 if ("executed".equals(codeString)) 295 return new Enumeration<ContractStatus>(this, ContractStatus.EXECUTED); 296 if ("negotiable".equals(codeString)) 297 return new Enumeration<ContractStatus>(this, ContractStatus.NEGOTIABLE); 298 if ("offered".equals(codeString)) 299 return new Enumeration<ContractStatus>(this, ContractStatus.OFFERED); 300 if ("policy".equals(codeString)) 301 return new Enumeration<ContractStatus>(this, ContractStatus.POLICY); 302 if ("rejected".equals(codeString)) 303 return new Enumeration<ContractStatus>(this, ContractStatus.REJECTED); 304 if ("renewed".equals(codeString)) 305 return new Enumeration<ContractStatus>(this, ContractStatus.RENEWED); 306 if ("revoked".equals(codeString)) 307 return new Enumeration<ContractStatus>(this, ContractStatus.REVOKED); 308 if ("resolved".equals(codeString)) 309 return new Enumeration<ContractStatus>(this, ContractStatus.RESOLVED); 310 if ("terminated".equals(codeString)) 311 return new Enumeration<ContractStatus>(this, ContractStatus.TERMINATED); 312 throw new FHIRException("Unknown ContractStatus code '"+codeString+"'"); 313 } 314 public String toCode(ContractStatus code) { 315 if (code == ContractStatus.AMENDED) 316 return "amended"; 317 if (code == ContractStatus.APPENDED) 318 return "appended"; 319 if (code == ContractStatus.CANCELLED) 320 return "cancelled"; 321 if (code == ContractStatus.DISPUTED) 322 return "disputed"; 323 if (code == ContractStatus.ENTEREDINERROR) 324 return "entered-in-error"; 325 if (code == ContractStatus.EXECUTABLE) 326 return "executable"; 327 if (code == ContractStatus.EXECUTED) 328 return "executed"; 329 if (code == ContractStatus.NEGOTIABLE) 330 return "negotiable"; 331 if (code == ContractStatus.OFFERED) 332 return "offered"; 333 if (code == ContractStatus.POLICY) 334 return "policy"; 335 if (code == ContractStatus.REJECTED) 336 return "rejected"; 337 if (code == ContractStatus.RENEWED) 338 return "renewed"; 339 if (code == ContractStatus.REVOKED) 340 return "revoked"; 341 if (code == ContractStatus.RESOLVED) 342 return "resolved"; 343 if (code == ContractStatus.TERMINATED) 344 return "terminated"; 345 return "?"; 346 } 347 public String toSystem(ContractStatus code) { 348 return code.getSystem(); 349 } 350 } 351 352 public enum ContractPublicationStatus { 353 /** 354 * Contract is augmented with additional information to correct errors in a predecessor or to updated values in a predecessor. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: revised; replaced. 355 */ 356 AMENDED, 357 /** 358 * Contract is augmented with additional information that was missing from a predecessor Contract. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: updated, replaced. 359 */ 360 APPENDED, 361 /** 362 * Contract is terminated due to failure of the Grantor and/or the Grantee to fulfil one or more contract provisions. Usage: Abnormal contract termination. Precedence Order = 10. Comparable FHIR and v.3 status codes: stopped; failed; aborted. 363 */ 364 CANCELLED, 365 /** 366 * Contract is pended to rectify failure of the Grantor or the Grantee to fulfil contract provision(s). E.g., Grantee complaint about Grantor's failure to comply with contract provisions. Usage: Contract pended. Precedence Order = 7. Comparable FHIR and v.3 status codes: on hold; pended; suspended. 367 */ 368 DISPUTED, 369 /** 370 * Contract was created in error. No Precedence Order. Status may be applied to a Contract with any status. 371 */ 372 ENTEREDINERROR, 373 /** 374 * Contract execution pending; may be executed when either the Grantor or the Grantee accepts the contract provisions by signing. I.e., where either the Grantor or the Grantee has signed, but not both. E.g., when an insurance applicant signs the insurers application, which references the policy. Usage: Optional first step of contract execution activity. May be skipped and contracting activity moves directly to executed state. Precedence Order = 3. Comparable FHIR and v.3 status codes: draft; preliminary; planned; intended; active. 375 */ 376 EXECUTABLE, 377 /** 378 * Contract is activated for period stipulated when both the Grantor and Grantee have signed it. Usage: Required state for normal completion of contracting activity. Precedence Order = 6. Comparable FHIR and v.3 status codes: accepted; completed. 379 */ 380 EXECUTED, 381 /** 382 * Contract execution is suspended while either or both the Grantor and Grantee propose and consider new or revised contract provisions. I.e., where the party which has not signed proposes changes to the terms. E .g., a life insurer declines to agree to the signed application because the life insurer has evidence that the applicant, who asserted to being younger or a non-smoker to get a lower premium rate - but offers instead to agree to a higher premium based on the applicants actual age or smoking status. Usage: Optional contract activity between executable and executed state. Precedence Order = 4. Comparable FHIR and v.3 status codes: in progress; review; held. 383 */ 384 NEGOTIABLE, 385 /** 386 * Contract is a proposal by either the Grantor or the Grantee. Aka - A Contract hard copy or electronic 'template', 'form' or 'application'. E.g., health insurance application; consent directive form. Usage: Beginning of contract negotiation, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 2. Comparable FHIR and v.3 status codes: requested; new. 387 */ 388 OFFERED, 389 /** 390 * Contract template is available as the basis for an application or offer by the Grantor or Grantee. E.g., health insurance policy; consent directive policy. Usage: Required initial contract activity, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 1. Comparable FHIR and v.3 status codes: proposed; intended. 391 */ 392 POLICY, 393 /** 394 * Execution of the Contract is not completed because either or both the Grantor and Grantee decline to accept some or all of the contract provisions. Usage: Optional contract activity between executable and abnormal termination. Precedence Order = 5. Comparable FHIR and v.3 status codes: stopped; cancelled. 395 */ 396 REJECTED, 397 /** 398 * Beginning of a successor Contract at the termination of predecessor Contract lifecycle. Usage: Follows termination of a preceding Contract that has reached its expiry date. Precedence Order = 13. Comparable FHIR and v.3 status codes: superseded. 399 */ 400 RENEWED, 401 /** 402 * A Contract that is rescinded. May be required prior to replacing with an updated Contract. Comparable FHIR and v.3 status codes: nullified. 403 */ 404 REVOKED, 405 /** 406 * Contract is reactivated after being pended because of faulty execution. *E.g., competency of the signer(s), or where the policy is substantially different from and did not accompany the application/form so that the applicant could not compare them. Aka - ''reactivated''. Usage: Optional stage where a pended contract is reactivated. Precedence Order = 8. Comparable FHIR and v.3 status codes: reactivated. 407 */ 408 RESOLVED, 409 /** 410 * Contract reaches its expiry date. It might or might not be renewed or renegotiated. Usage: Normal end of contract period. Precedence Order = 12. Comparable FHIR and v.3 status codes: Obsoleted. 411 */ 412 TERMINATED, 413 /** 414 * added to help the parsers with the generic types 415 */ 416 NULL; 417 public static ContractPublicationStatus fromCode(String codeString) throws FHIRException { 418 if (codeString == null || "".equals(codeString)) 419 return null; 420 if ("amended".equals(codeString)) 421 return AMENDED; 422 if ("appended".equals(codeString)) 423 return APPENDED; 424 if ("cancelled".equals(codeString)) 425 return CANCELLED; 426 if ("disputed".equals(codeString)) 427 return DISPUTED; 428 if ("entered-in-error".equals(codeString)) 429 return ENTEREDINERROR; 430 if ("executable".equals(codeString)) 431 return EXECUTABLE; 432 if ("executed".equals(codeString)) 433 return EXECUTED; 434 if ("negotiable".equals(codeString)) 435 return NEGOTIABLE; 436 if ("offered".equals(codeString)) 437 return OFFERED; 438 if ("policy".equals(codeString)) 439 return POLICY; 440 if ("rejected".equals(codeString)) 441 return REJECTED; 442 if ("renewed".equals(codeString)) 443 return RENEWED; 444 if ("revoked".equals(codeString)) 445 return REVOKED; 446 if ("resolved".equals(codeString)) 447 return RESOLVED; 448 if ("terminated".equals(codeString)) 449 return TERMINATED; 450 if (Configuration.isAcceptInvalidEnums()) 451 return null; 452 else 453 throw new FHIRException("Unknown ContractPublicationStatus code '"+codeString+"'"); 454 } 455 public String toCode() { 456 switch (this) { 457 case AMENDED: return "amended"; 458 case APPENDED: return "appended"; 459 case CANCELLED: return "cancelled"; 460 case DISPUTED: return "disputed"; 461 case ENTEREDINERROR: return "entered-in-error"; 462 case EXECUTABLE: return "executable"; 463 case EXECUTED: return "executed"; 464 case NEGOTIABLE: return "negotiable"; 465 case OFFERED: return "offered"; 466 case POLICY: return "policy"; 467 case REJECTED: return "rejected"; 468 case RENEWED: return "renewed"; 469 case REVOKED: return "revoked"; 470 case RESOLVED: return "resolved"; 471 case TERMINATED: return "terminated"; 472 default: return "?"; 473 } 474 } 475 public String getSystem() { 476 switch (this) { 477 case AMENDED: return "http://hl7.org/fhir/contract-publicationstatus"; 478 case APPENDED: return "http://hl7.org/fhir/contract-publicationstatus"; 479 case CANCELLED: return "http://hl7.org/fhir/contract-publicationstatus"; 480 case DISPUTED: return "http://hl7.org/fhir/contract-publicationstatus"; 481 case ENTEREDINERROR: return "http://hl7.org/fhir/contract-publicationstatus"; 482 case EXECUTABLE: return "http://hl7.org/fhir/contract-publicationstatus"; 483 case EXECUTED: return "http://hl7.org/fhir/contract-publicationstatus"; 484 case NEGOTIABLE: return "http://hl7.org/fhir/contract-publicationstatus"; 485 case OFFERED: return "http://hl7.org/fhir/contract-publicationstatus"; 486 case POLICY: return "http://hl7.org/fhir/contract-publicationstatus"; 487 case REJECTED: return "http://hl7.org/fhir/contract-publicationstatus"; 488 case RENEWED: return "http://hl7.org/fhir/contract-publicationstatus"; 489 case REVOKED: return "http://hl7.org/fhir/contract-publicationstatus"; 490 case RESOLVED: return "http://hl7.org/fhir/contract-publicationstatus"; 491 case TERMINATED: return "http://hl7.org/fhir/contract-publicationstatus"; 492 default: return "?"; 493 } 494 } 495 public String getDefinition() { 496 switch (this) { 497 case AMENDED: return "Contract is augmented with additional information to correct errors in a predecessor or to updated values in a predecessor. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: revised; replaced."; 498 case APPENDED: return "Contract is augmented with additional information that was missing from a predecessor Contract. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: updated, replaced."; 499 case CANCELLED: return "Contract is terminated due to failure of the Grantor and/or the Grantee to fulfil one or more contract provisions. Usage: Abnormal contract termination. Precedence Order = 10. Comparable FHIR and v.3 status codes: stopped; failed; aborted."; 500 case DISPUTED: return "Contract is pended to rectify failure of the Grantor or the Grantee to fulfil contract provision(s). E.g., Grantee complaint about Grantor's failure to comply with contract provisions. Usage: Contract pended. Precedence Order = 7. Comparable FHIR and v.3 status codes: on hold; pended; suspended."; 501 case ENTEREDINERROR: return "Contract was created in error. No Precedence Order. Status may be applied to a Contract with any status."; 502 case EXECUTABLE: return "Contract execution pending; may be executed when either the Grantor or the Grantee accepts the contract provisions by signing. I.e., where either the Grantor or the Grantee has signed, but not both. E.g., when an insurance applicant signs the insurers application, which references the policy. Usage: Optional first step of contract execution activity. May be skipped and contracting activity moves directly to executed state. Precedence Order = 3. Comparable FHIR and v.3 status codes: draft; preliminary; planned; intended; active."; 503 case EXECUTED: return "Contract is activated for period stipulated when both the Grantor and Grantee have signed it. Usage: Required state for normal completion of contracting activity. Precedence Order = 6. Comparable FHIR and v.3 status codes: accepted; completed."; 504 case NEGOTIABLE: return "Contract execution is suspended while either or both the Grantor and Grantee propose and consider new or revised contract provisions. I.e., where the party which has not signed proposes changes to the terms. E .g., a life insurer declines to agree to the signed application because the life insurer has evidence that the applicant, who asserted to being younger or a non-smoker to get a lower premium rate - but offers instead to agree to a higher premium based on the applicants actual age or smoking status. Usage: Optional contract activity between executable and executed state. Precedence Order = 4. Comparable FHIR and v.3 status codes: in progress; review; held."; 505 case OFFERED: return "Contract is a proposal by either the Grantor or the Grantee. Aka - A Contract hard copy or electronic 'template', 'form' or 'application'. E.g., health insurance application; consent directive form. Usage: Beginning of contract negotiation, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 2. Comparable FHIR and v.3 status codes: requested; new."; 506 case POLICY: return "Contract template is available as the basis for an application or offer by the Grantor or Grantee. E.g., health insurance policy; consent directive policy. Usage: Required initial contract activity, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 1. Comparable FHIR and v.3 status codes: proposed; intended."; 507 case REJECTED: return " Execution of the Contract is not completed because either or both the Grantor and Grantee decline to accept some or all of the contract provisions. Usage: Optional contract activity between executable and abnormal termination. Precedence Order = 5. Comparable FHIR and v.3 status codes: stopped; cancelled."; 508 case RENEWED: return "Beginning of a successor Contract at the termination of predecessor Contract lifecycle. Usage: Follows termination of a preceding Contract that has reached its expiry date. Precedence Order = 13. Comparable FHIR and v.3 status codes: superseded."; 509 case REVOKED: return "A Contract that is rescinded. May be required prior to replacing with an updated Contract. Comparable FHIR and v.3 status codes: nullified."; 510 case RESOLVED: return "Contract is reactivated after being pended because of faulty execution. *E.g., competency of the signer(s), or where the policy is substantially different from and did not accompany the application/form so that the applicant could not compare them. Aka - ''reactivated''. Usage: Optional stage where a pended contract is reactivated. Precedence Order = 8. Comparable FHIR and v.3 status codes: reactivated."; 511 case TERMINATED: return "Contract reaches its expiry date. It might or might not be renewed or renegotiated. Usage: Normal end of contract period. Precedence Order = 12. Comparable FHIR and v.3 status codes: Obsoleted."; 512 default: return "?"; 513 } 514 } 515 public String getDisplay() { 516 switch (this) { 517 case AMENDED: return "Amended"; 518 case APPENDED: return "Appended"; 519 case CANCELLED: return "Cancelled"; 520 case DISPUTED: return "Disputed"; 521 case ENTEREDINERROR: return "Entered in Error"; 522 case EXECUTABLE: return "Executable"; 523 case EXECUTED: return "Executed"; 524 case NEGOTIABLE: return "Negotiable"; 525 case OFFERED: return "Offered"; 526 case POLICY: return "Policy"; 527 case REJECTED: return "Rejected"; 528 case RENEWED: return "Renewed"; 529 case REVOKED: return "Revoked"; 530 case RESOLVED: return "Resolved"; 531 case TERMINATED: return "Terminated"; 532 default: return "?"; 533 } 534 } 535 } 536 537 public static class ContractPublicationStatusEnumFactory implements EnumFactory<ContractPublicationStatus> { 538 public ContractPublicationStatus fromCode(String codeString) throws IllegalArgumentException { 539 if (codeString == null || "".equals(codeString)) 540 if (codeString == null || "".equals(codeString)) 541 return null; 542 if ("amended".equals(codeString)) 543 return ContractPublicationStatus.AMENDED; 544 if ("appended".equals(codeString)) 545 return ContractPublicationStatus.APPENDED; 546 if ("cancelled".equals(codeString)) 547 return ContractPublicationStatus.CANCELLED; 548 if ("disputed".equals(codeString)) 549 return ContractPublicationStatus.DISPUTED; 550 if ("entered-in-error".equals(codeString)) 551 return ContractPublicationStatus.ENTEREDINERROR; 552 if ("executable".equals(codeString)) 553 return ContractPublicationStatus.EXECUTABLE; 554 if ("executed".equals(codeString)) 555 return ContractPublicationStatus.EXECUTED; 556 if ("negotiable".equals(codeString)) 557 return ContractPublicationStatus.NEGOTIABLE; 558 if ("offered".equals(codeString)) 559 return ContractPublicationStatus.OFFERED; 560 if ("policy".equals(codeString)) 561 return ContractPublicationStatus.POLICY; 562 if ("rejected".equals(codeString)) 563 return ContractPublicationStatus.REJECTED; 564 if ("renewed".equals(codeString)) 565 return ContractPublicationStatus.RENEWED; 566 if ("revoked".equals(codeString)) 567 return ContractPublicationStatus.REVOKED; 568 if ("resolved".equals(codeString)) 569 return ContractPublicationStatus.RESOLVED; 570 if ("terminated".equals(codeString)) 571 return ContractPublicationStatus.TERMINATED; 572 throw new IllegalArgumentException("Unknown ContractPublicationStatus code '"+codeString+"'"); 573 } 574 public Enumeration<ContractPublicationStatus> fromType(Base code) throws FHIRException { 575 if (code == null) 576 return null; 577 if (code.isEmpty()) 578 return new Enumeration<ContractPublicationStatus>(this); 579 String codeString = ((PrimitiveType) code).asStringValue(); 580 if (codeString == null || "".equals(codeString)) 581 return null; 582 if ("amended".equals(codeString)) 583 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.AMENDED); 584 if ("appended".equals(codeString)) 585 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.APPENDED); 586 if ("cancelled".equals(codeString)) 587 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.CANCELLED); 588 if ("disputed".equals(codeString)) 589 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.DISPUTED); 590 if ("entered-in-error".equals(codeString)) 591 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.ENTEREDINERROR); 592 if ("executable".equals(codeString)) 593 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.EXECUTABLE); 594 if ("executed".equals(codeString)) 595 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.EXECUTED); 596 if ("negotiable".equals(codeString)) 597 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.NEGOTIABLE); 598 if ("offered".equals(codeString)) 599 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.OFFERED); 600 if ("policy".equals(codeString)) 601 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.POLICY); 602 if ("rejected".equals(codeString)) 603 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.REJECTED); 604 if ("renewed".equals(codeString)) 605 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.RENEWED); 606 if ("revoked".equals(codeString)) 607 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.REVOKED); 608 if ("resolved".equals(codeString)) 609 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.RESOLVED); 610 if ("terminated".equals(codeString)) 611 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.TERMINATED); 612 throw new FHIRException("Unknown ContractPublicationStatus code '"+codeString+"'"); 613 } 614 public String toCode(ContractPublicationStatus code) { 615 if (code == ContractPublicationStatus.AMENDED) 616 return "amended"; 617 if (code == ContractPublicationStatus.APPENDED) 618 return "appended"; 619 if (code == ContractPublicationStatus.CANCELLED) 620 return "cancelled"; 621 if (code == ContractPublicationStatus.DISPUTED) 622 return "disputed"; 623 if (code == ContractPublicationStatus.ENTEREDINERROR) 624 return "entered-in-error"; 625 if (code == ContractPublicationStatus.EXECUTABLE) 626 return "executable"; 627 if (code == ContractPublicationStatus.EXECUTED) 628 return "executed"; 629 if (code == ContractPublicationStatus.NEGOTIABLE) 630 return "negotiable"; 631 if (code == ContractPublicationStatus.OFFERED) 632 return "offered"; 633 if (code == ContractPublicationStatus.POLICY) 634 return "policy"; 635 if (code == ContractPublicationStatus.REJECTED) 636 return "rejected"; 637 if (code == ContractPublicationStatus.RENEWED) 638 return "renewed"; 639 if (code == ContractPublicationStatus.REVOKED) 640 return "revoked"; 641 if (code == ContractPublicationStatus.RESOLVED) 642 return "resolved"; 643 if (code == ContractPublicationStatus.TERMINATED) 644 return "terminated"; 645 return "?"; 646 } 647 public String toSystem(ContractPublicationStatus code) { 648 return code.getSystem(); 649 } 650 } 651 652 @Block() 653 public static class ContentDefinitionComponent extends BackboneElement implements IBaseBackboneElement { 654 /** 655 * Precusory content structure and use, i.e., a boilerplate, template, application for a contract such as an insurance policy or benefits under a program, e.g., workers compensation. 656 */ 657 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 658 @Description(shortDefinition="Content structure and use", formalDefinition="Precusory content structure and use, i.e., a boilerplate, template, application for a contract such as an insurance policy or benefits under a program, e.g., workers compensation." ) 659 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-definition-type") 660 protected CodeableConcept type; 661 662 /** 663 * Detailed Precusory content type. 664 */ 665 @Child(name = "subType", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 666 @Description(shortDefinition="Detailed Content Type Definition", formalDefinition="Detailed Precusory content type." ) 667 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-definition-subtype") 668 protected CodeableConcept subType; 669 670 /** 671 * The individual or organization that published the Contract precursor content. 672 */ 673 @Child(name = "publisher", type = {Person.class, Practitioner.class, Organization.class}, order=3, min=0, max=1, modifier=false, summary=false) 674 @Description(shortDefinition="Publisher Entity", formalDefinition="The individual or organization that published the Contract precursor content." ) 675 protected Reference publisher; 676 677 /** 678 * The actual object that is the target of the reference (The individual or organization that published the Contract precursor content.) 679 */ 680 protected Resource publisherTarget; 681 682 /** 683 * The date (and optionally time) when the contract was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes. 684 */ 685 @Child(name = "publicationDate", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=false) 686 @Description(shortDefinition="When published", formalDefinition="The date (and optionally time) when the contract was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes." ) 687 protected DateTimeType publicationDate; 688 689 /** 690 * draft | active | retired | unknown. 691 */ 692 @Child(name = "publicationStatus", type = {CodeType.class}, order=5, min=1, max=1, modifier=false, summary=false) 693 @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="draft | active | retired | unknown." ) 694 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-publicationstatus") 695 protected Enumeration<ContractPublicationStatus> publicationStatus; 696 697 /** 698 * A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content. 699 */ 700 @Child(name = "copyright", type = {MarkdownType.class}, order=6, min=0, max=1, modifier=false, summary=false) 701 @Description(shortDefinition="Publication Ownership", formalDefinition="A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content." ) 702 protected MarkdownType copyright; 703 704 private static final long serialVersionUID = -699592864L; 705 706 /** 707 * Constructor 708 */ 709 public ContentDefinitionComponent() { 710 super(); 711 } 712 713 /** 714 * Constructor 715 */ 716 public ContentDefinitionComponent(CodeableConcept type, Enumeration<ContractPublicationStatus> publicationStatus) { 717 super(); 718 this.type = type; 719 this.publicationStatus = publicationStatus; 720 } 721 722 /** 723 * @return {@link #type} (Precusory content structure and use, i.e., a boilerplate, template, application for a contract such as an insurance policy or benefits under a program, e.g., workers compensation.) 724 */ 725 public CodeableConcept getType() { 726 if (this.type == null) 727 if (Configuration.errorOnAutoCreate()) 728 throw new Error("Attempt to auto-create ContentDefinitionComponent.type"); 729 else if (Configuration.doAutoCreate()) 730 this.type = new CodeableConcept(); // cc 731 return this.type; 732 } 733 734 public boolean hasType() { 735 return this.type != null && !this.type.isEmpty(); 736 } 737 738 /** 739 * @param value {@link #type} (Precusory content structure and use, i.e., a boilerplate, template, application for a contract such as an insurance policy or benefits under a program, e.g., workers compensation.) 740 */ 741 public ContentDefinitionComponent setType(CodeableConcept value) { 742 this.type = value; 743 return this; 744 } 745 746 /** 747 * @return {@link #subType} (Detailed Precusory content type.) 748 */ 749 public CodeableConcept getSubType() { 750 if (this.subType == null) 751 if (Configuration.errorOnAutoCreate()) 752 throw new Error("Attempt to auto-create ContentDefinitionComponent.subType"); 753 else if (Configuration.doAutoCreate()) 754 this.subType = new CodeableConcept(); // cc 755 return this.subType; 756 } 757 758 public boolean hasSubType() { 759 return this.subType != null && !this.subType.isEmpty(); 760 } 761 762 /** 763 * @param value {@link #subType} (Detailed Precusory content type.) 764 */ 765 public ContentDefinitionComponent setSubType(CodeableConcept value) { 766 this.subType = value; 767 return this; 768 } 769 770 /** 771 * @return {@link #publisher} (The individual or organization that published the Contract precursor content.) 772 */ 773 public Reference getPublisher() { 774 if (this.publisher == null) 775 if (Configuration.errorOnAutoCreate()) 776 throw new Error("Attempt to auto-create ContentDefinitionComponent.publisher"); 777 else if (Configuration.doAutoCreate()) 778 this.publisher = new Reference(); // cc 779 return this.publisher; 780 } 781 782 public boolean hasPublisher() { 783 return this.publisher != null && !this.publisher.isEmpty(); 784 } 785 786 /** 787 * @param value {@link #publisher} (The individual or organization that published the Contract precursor content.) 788 */ 789 public ContentDefinitionComponent setPublisher(Reference value) { 790 this.publisher = value; 791 return this; 792 } 793 794 /** 795 * @return {@link #publisher} 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 individual or organization that published the Contract precursor content.) 796 */ 797 public Resource getPublisherTarget() { 798 return this.publisherTarget; 799 } 800 801 /** 802 * @param value {@link #publisher} 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 individual or organization that published the Contract precursor content.) 803 */ 804 public ContentDefinitionComponent setPublisherTarget(Resource value) { 805 this.publisherTarget = value; 806 return this; 807 } 808 809 /** 810 * @return {@link #publicationDate} (The date (and optionally time) when the contract was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes.). This is the underlying object with id, value and extensions. The accessor "getPublicationDate" gives direct access to the value 811 */ 812 public DateTimeType getPublicationDateElement() { 813 if (this.publicationDate == null) 814 if (Configuration.errorOnAutoCreate()) 815 throw new Error("Attempt to auto-create ContentDefinitionComponent.publicationDate"); 816 else if (Configuration.doAutoCreate()) 817 this.publicationDate = new DateTimeType(); // bb 818 return this.publicationDate; 819 } 820 821 public boolean hasPublicationDateElement() { 822 return this.publicationDate != null && !this.publicationDate.isEmpty(); 823 } 824 825 public boolean hasPublicationDate() { 826 return this.publicationDate != null && !this.publicationDate.isEmpty(); 827 } 828 829 /** 830 * @param value {@link #publicationDate} (The date (and optionally time) when the contract was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes.). This is the underlying object with id, value and extensions. The accessor "getPublicationDate" gives direct access to the value 831 */ 832 public ContentDefinitionComponent setPublicationDateElement(DateTimeType value) { 833 this.publicationDate = value; 834 return this; 835 } 836 837 /** 838 * @return The date (and optionally time) when the contract was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes. 839 */ 840 public Date getPublicationDate() { 841 return this.publicationDate == null ? null : this.publicationDate.getValue(); 842 } 843 844 /** 845 * @param value The date (and optionally time) when the contract was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes. 846 */ 847 public ContentDefinitionComponent setPublicationDate(Date value) { 848 if (value == null) 849 this.publicationDate = null; 850 else { 851 if (this.publicationDate == null) 852 this.publicationDate = new DateTimeType(); 853 this.publicationDate.setValue(value); 854 } 855 return this; 856 } 857 858 /** 859 * @return {@link #publicationStatus} (draft | active | retired | unknown.). This is the underlying object with id, value and extensions. The accessor "getPublicationStatus" gives direct access to the value 860 */ 861 public Enumeration<ContractPublicationStatus> getPublicationStatusElement() { 862 if (this.publicationStatus == null) 863 if (Configuration.errorOnAutoCreate()) 864 throw new Error("Attempt to auto-create ContentDefinitionComponent.publicationStatus"); 865 else if (Configuration.doAutoCreate()) 866 this.publicationStatus = new Enumeration<ContractPublicationStatus>(new ContractPublicationStatusEnumFactory()); // bb 867 return this.publicationStatus; 868 } 869 870 public boolean hasPublicationStatusElement() { 871 return this.publicationStatus != null && !this.publicationStatus.isEmpty(); 872 } 873 874 public boolean hasPublicationStatus() { 875 return this.publicationStatus != null && !this.publicationStatus.isEmpty(); 876 } 877 878 /** 879 * @param value {@link #publicationStatus} (draft | active | retired | unknown.). This is the underlying object with id, value and extensions. The accessor "getPublicationStatus" gives direct access to the value 880 */ 881 public ContentDefinitionComponent setPublicationStatusElement(Enumeration<ContractPublicationStatus> value) { 882 this.publicationStatus = value; 883 return this; 884 } 885 886 /** 887 * @return draft | active | retired | unknown. 888 */ 889 public ContractPublicationStatus getPublicationStatus() { 890 return this.publicationStatus == null ? null : this.publicationStatus.getValue(); 891 } 892 893 /** 894 * @param value draft | active | retired | unknown. 895 */ 896 public ContentDefinitionComponent setPublicationStatus(ContractPublicationStatus value) { 897 if (this.publicationStatus == null) 898 this.publicationStatus = new Enumeration<ContractPublicationStatus>(new ContractPublicationStatusEnumFactory()); 899 this.publicationStatus.setValue(value); 900 return this; 901 } 902 903 /** 904 * @return {@link #copyright} (A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 905 */ 906 public MarkdownType getCopyrightElement() { 907 if (this.copyright == null) 908 if (Configuration.errorOnAutoCreate()) 909 throw new Error("Attempt to auto-create ContentDefinitionComponent.copyright"); 910 else if (Configuration.doAutoCreate()) 911 this.copyright = new MarkdownType(); // bb 912 return this.copyright; 913 } 914 915 public boolean hasCopyrightElement() { 916 return this.copyright != null && !this.copyright.isEmpty(); 917 } 918 919 public boolean hasCopyright() { 920 return this.copyright != null && !this.copyright.isEmpty(); 921 } 922 923 /** 924 * @param value {@link #copyright} (A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 925 */ 926 public ContentDefinitionComponent setCopyrightElement(MarkdownType value) { 927 this.copyright = value; 928 return this; 929 } 930 931 /** 932 * @return A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content. 933 */ 934 public String getCopyright() { 935 return this.copyright == null ? null : this.copyright.getValue(); 936 } 937 938 /** 939 * @param value A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content. 940 */ 941 public ContentDefinitionComponent setCopyright(String value) { 942 if (value == null) 943 this.copyright = null; 944 else { 945 if (this.copyright == null) 946 this.copyright = new MarkdownType(); 947 this.copyright.setValue(value); 948 } 949 return this; 950 } 951 952 protected void listChildren(List<Property> children) { 953 super.listChildren(children); 954 children.add(new Property("type", "CodeableConcept", "Precusory content structure and use, i.e., a boilerplate, template, application for a contract such as an insurance policy or benefits under a program, e.g., workers compensation.", 0, 1, type)); 955 children.add(new Property("subType", "CodeableConcept", "Detailed Precusory content type.", 0, 1, subType)); 956 children.add(new Property("publisher", "Reference(Person|Practitioner|Organization)", "The individual or organization that published the Contract precursor content.", 0, 1, publisher)); 957 children.add(new Property("publicationDate", "dateTime", "The date (and optionally time) when the contract was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes.", 0, 1, publicationDate)); 958 children.add(new Property("publicationStatus", "code", "draft | active | retired | unknown.", 0, 1, publicationStatus)); 959 children.add(new Property("copyright", "markdown", "A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content.", 0, 1, copyright)); 960 } 961 962 @Override 963 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 964 switch (_hash) { 965 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Precusory content structure and use, i.e., a boilerplate, template, application for a contract such as an insurance policy or benefits under a program, e.g., workers compensation.", 0, 1, type); 966 case -1868521062: /*subType*/ return new Property("subType", "CodeableConcept", "Detailed Precusory content type.", 0, 1, subType); 967 case 1447404028: /*publisher*/ return new Property("publisher", "Reference(Person|Practitioner|Organization)", "The individual or organization that published the Contract precursor content.", 0, 1, publisher); 968 case 1470566394: /*publicationDate*/ return new Property("publicationDate", "dateTime", "The date (and optionally time) when the contract was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes.", 0, 1, publicationDate); 969 case 616500542: /*publicationStatus*/ return new Property("publicationStatus", "code", "draft | active | retired | unknown.", 0, 1, publicationStatus); 970 case 1522889671: /*copyright*/ return new Property("copyright", "markdown", "A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content.", 0, 1, copyright); 971 default: return super.getNamedProperty(_hash, _name, _checkValid); 972 } 973 974 } 975 976 @Override 977 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 978 switch (hash) { 979 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 980 case -1868521062: /*subType*/ return this.subType == null ? new Base[0] : new Base[] {this.subType}; // CodeableConcept 981 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // Reference 982 case 1470566394: /*publicationDate*/ return this.publicationDate == null ? new Base[0] : new Base[] {this.publicationDate}; // DateTimeType 983 case 616500542: /*publicationStatus*/ return this.publicationStatus == null ? new Base[0] : new Base[] {this.publicationStatus}; // Enumeration<ContractPublicationStatus> 984 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 985 default: return super.getProperty(hash, name, checkValid); 986 } 987 988 } 989 990 @Override 991 public Base setProperty(int hash, String name, Base value) throws FHIRException { 992 switch (hash) { 993 case 3575610: // type 994 this.type = castToCodeableConcept(value); // CodeableConcept 995 return value; 996 case -1868521062: // subType 997 this.subType = castToCodeableConcept(value); // CodeableConcept 998 return value; 999 case 1447404028: // publisher 1000 this.publisher = castToReference(value); // Reference 1001 return value; 1002 case 1470566394: // publicationDate 1003 this.publicationDate = castToDateTime(value); // DateTimeType 1004 return value; 1005 case 616500542: // publicationStatus 1006 value = new ContractPublicationStatusEnumFactory().fromType(castToCode(value)); 1007 this.publicationStatus = (Enumeration) value; // Enumeration<ContractPublicationStatus> 1008 return value; 1009 case 1522889671: // copyright 1010 this.copyright = castToMarkdown(value); // MarkdownType 1011 return value; 1012 default: return super.setProperty(hash, name, value); 1013 } 1014 1015 } 1016 1017 @Override 1018 public Base setProperty(String name, Base value) throws FHIRException { 1019 if (name.equals("type")) { 1020 this.type = castToCodeableConcept(value); // CodeableConcept 1021 } else if (name.equals("subType")) { 1022 this.subType = castToCodeableConcept(value); // CodeableConcept 1023 } else if (name.equals("publisher")) { 1024 this.publisher = castToReference(value); // Reference 1025 } else if (name.equals("publicationDate")) { 1026 this.publicationDate = castToDateTime(value); // DateTimeType 1027 } else if (name.equals("publicationStatus")) { 1028 value = new ContractPublicationStatusEnumFactory().fromType(castToCode(value)); 1029 this.publicationStatus = (Enumeration) value; // Enumeration<ContractPublicationStatus> 1030 } else if (name.equals("copyright")) { 1031 this.copyright = castToMarkdown(value); // MarkdownType 1032 } else 1033 return super.setProperty(name, value); 1034 return value; 1035 } 1036 1037 @Override 1038 public Base makeProperty(int hash, String name) throws FHIRException { 1039 switch (hash) { 1040 case 3575610: return getType(); 1041 case -1868521062: return getSubType(); 1042 case 1447404028: return getPublisher(); 1043 case 1470566394: return getPublicationDateElement(); 1044 case 616500542: return getPublicationStatusElement(); 1045 case 1522889671: return getCopyrightElement(); 1046 default: return super.makeProperty(hash, name); 1047 } 1048 1049 } 1050 1051 @Override 1052 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1053 switch (hash) { 1054 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1055 case -1868521062: /*subType*/ return new String[] {"CodeableConcept"}; 1056 case 1447404028: /*publisher*/ return new String[] {"Reference"}; 1057 case 1470566394: /*publicationDate*/ return new String[] {"dateTime"}; 1058 case 616500542: /*publicationStatus*/ return new String[] {"code"}; 1059 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 1060 default: return super.getTypesForProperty(hash, name); 1061 } 1062 1063 } 1064 1065 @Override 1066 public Base addChild(String name) throws FHIRException { 1067 if (name.equals("type")) { 1068 this.type = new CodeableConcept(); 1069 return this.type; 1070 } 1071 else if (name.equals("subType")) { 1072 this.subType = new CodeableConcept(); 1073 return this.subType; 1074 } 1075 else if (name.equals("publisher")) { 1076 this.publisher = new Reference(); 1077 return this.publisher; 1078 } 1079 else if (name.equals("publicationDate")) { 1080 throw new FHIRException("Cannot call addChild on a primitive type Contract.publicationDate"); 1081 } 1082 else if (name.equals("publicationStatus")) { 1083 throw new FHIRException("Cannot call addChild on a primitive type Contract.publicationStatus"); 1084 } 1085 else if (name.equals("copyright")) { 1086 throw new FHIRException("Cannot call addChild on a primitive type Contract.copyright"); 1087 } 1088 else 1089 return super.addChild(name); 1090 } 1091 1092 public ContentDefinitionComponent copy() { 1093 ContentDefinitionComponent dst = new ContentDefinitionComponent(); 1094 copyValues(dst); 1095 dst.type = type == null ? null : type.copy(); 1096 dst.subType = subType == null ? null : subType.copy(); 1097 dst.publisher = publisher == null ? null : publisher.copy(); 1098 dst.publicationDate = publicationDate == null ? null : publicationDate.copy(); 1099 dst.publicationStatus = publicationStatus == null ? null : publicationStatus.copy(); 1100 dst.copyright = copyright == null ? null : copyright.copy(); 1101 return dst; 1102 } 1103 1104 @Override 1105 public boolean equalsDeep(Base other_) { 1106 if (!super.equalsDeep(other_)) 1107 return false; 1108 if (!(other_ instanceof ContentDefinitionComponent)) 1109 return false; 1110 ContentDefinitionComponent o = (ContentDefinitionComponent) other_; 1111 return compareDeep(type, o.type, true) && compareDeep(subType, o.subType, true) && compareDeep(publisher, o.publisher, true) 1112 && compareDeep(publicationDate, o.publicationDate, true) && compareDeep(publicationStatus, o.publicationStatus, true) 1113 && compareDeep(copyright, o.copyright, true); 1114 } 1115 1116 @Override 1117 public boolean equalsShallow(Base other_) { 1118 if (!super.equalsShallow(other_)) 1119 return false; 1120 if (!(other_ instanceof ContentDefinitionComponent)) 1121 return false; 1122 ContentDefinitionComponent o = (ContentDefinitionComponent) other_; 1123 return compareValues(publicationDate, o.publicationDate, true) && compareValues(publicationStatus, o.publicationStatus, true) 1124 && compareValues(copyright, o.copyright, true); 1125 } 1126 1127 public boolean isEmpty() { 1128 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, subType, publisher 1129 , publicationDate, publicationStatus, copyright); 1130 } 1131 1132 public String fhirType() { 1133 return "Contract.contentDefinition"; 1134 1135 } 1136 1137 } 1138 1139 @Block() 1140 public static class TermComponent extends BackboneElement implements IBaseBackboneElement { 1141 /** 1142 * Unique identifier for this particular Contract Provision. 1143 */ 1144 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) 1145 @Description(shortDefinition="Contract Term Number", formalDefinition="Unique identifier for this particular Contract Provision." ) 1146 protected Identifier identifier; 1147 1148 /** 1149 * When this Contract Provision was issued. 1150 */ 1151 @Child(name = "issued", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) 1152 @Description(shortDefinition="Contract Term Issue Date Time", formalDefinition="When this Contract Provision was issued." ) 1153 protected DateTimeType issued; 1154 1155 /** 1156 * Relevant time or time-period when this Contract Provision is applicable. 1157 */ 1158 @Child(name = "applies", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=true) 1159 @Description(shortDefinition="Contract Term Effective Time", formalDefinition="Relevant time or time-period when this Contract Provision is applicable." ) 1160 protected Period applies; 1161 1162 /** 1163 * The entity that the term applies to. 1164 */ 1165 @Child(name = "topic", type = {CodeableConcept.class, Reference.class}, order=4, min=0, max=1, modifier=false, summary=false) 1166 @Description(shortDefinition="Term Concern", formalDefinition="The entity that the term applies to." ) 1167 protected Type topic; 1168 1169 /** 1170 * A legal clause or condition contained within a contract that requires one or both parties to perform a particular requirement by some specified time or prevents one or both parties from performing a particular requirement by some specified time. 1171 */ 1172 @Child(name = "type", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) 1173 @Description(shortDefinition="Contract Term Type or Form", formalDefinition="A legal clause or condition contained within a contract that requires one or both parties to perform a particular requirement by some specified time or prevents one or both parties from performing a particular requirement by some specified time." ) 1174 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-term-type") 1175 protected CodeableConcept type; 1176 1177 /** 1178 * A specialized legal clause or condition based on overarching contract type. 1179 */ 1180 @Child(name = "subType", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) 1181 @Description(shortDefinition="Contract Term Type specific classification", formalDefinition="A specialized legal clause or condition based on overarching contract type." ) 1182 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-term-subtype") 1183 protected CodeableConcept subType; 1184 1185 /** 1186 * Statement of a provision in a policy or a contract. 1187 */ 1188 @Child(name = "text", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) 1189 @Description(shortDefinition="Term Statement", formalDefinition="Statement of a provision in a policy or a contract." ) 1190 protected StringType text; 1191 1192 /** 1193 * Security labels that protect the handling of information about the term and its elements, which may be specifically identified.. 1194 */ 1195 @Child(name = "securityLabel", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1196 @Description(shortDefinition="Protection for the Term", formalDefinition="Security labels that protect the handling of information about the term and its elements, which may be specifically identified.." ) 1197 protected List<SecurityLabelComponent> securityLabel; 1198 1199 /** 1200 * The matter of concern in the context of this provision of the agrement. 1201 */ 1202 @Child(name = "offer", type = {}, order=9, min=1, max=1, modifier=false, summary=false) 1203 @Description(shortDefinition="Context of the Contract term", formalDefinition="The matter of concern in the context of this provision of the agrement." ) 1204 protected ContractOfferComponent offer; 1205 1206 /** 1207 * Contract Term Asset List. 1208 */ 1209 @Child(name = "asset", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1210 @Description(shortDefinition="Contract Term Asset List", formalDefinition="Contract Term Asset List." ) 1211 protected List<ContractAssetComponent> asset; 1212 1213 /** 1214 * An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place. 1215 */ 1216 @Child(name = "action", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1217 @Description(shortDefinition="Entity being ascribed responsibility", formalDefinition="An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place." ) 1218 protected List<ActionComponent> action; 1219 1220 /** 1221 * Nested group of Contract Provisions. 1222 */ 1223 @Child(name = "group", type = {TermComponent.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1224 @Description(shortDefinition="Nested Contract Term Group", formalDefinition="Nested group of Contract Provisions." ) 1225 protected List<TermComponent> group; 1226 1227 private static final long serialVersionUID = -460907186L; 1228 1229 /** 1230 * Constructor 1231 */ 1232 public TermComponent() { 1233 super(); 1234 } 1235 1236 /** 1237 * Constructor 1238 */ 1239 public TermComponent(ContractOfferComponent offer) { 1240 super(); 1241 this.offer = offer; 1242 } 1243 1244 /** 1245 * @return {@link #identifier} (Unique identifier for this particular Contract Provision.) 1246 */ 1247 public Identifier getIdentifier() { 1248 if (this.identifier == null) 1249 if (Configuration.errorOnAutoCreate()) 1250 throw new Error("Attempt to auto-create TermComponent.identifier"); 1251 else if (Configuration.doAutoCreate()) 1252 this.identifier = new Identifier(); // cc 1253 return this.identifier; 1254 } 1255 1256 public boolean hasIdentifier() { 1257 return this.identifier != null && !this.identifier.isEmpty(); 1258 } 1259 1260 /** 1261 * @param value {@link #identifier} (Unique identifier for this particular Contract Provision.) 1262 */ 1263 public TermComponent setIdentifier(Identifier value) { 1264 this.identifier = value; 1265 return this; 1266 } 1267 1268 /** 1269 * @return {@link #issued} (When this Contract Provision was issued.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value 1270 */ 1271 public DateTimeType getIssuedElement() { 1272 if (this.issued == null) 1273 if (Configuration.errorOnAutoCreate()) 1274 throw new Error("Attempt to auto-create TermComponent.issued"); 1275 else if (Configuration.doAutoCreate()) 1276 this.issued = new DateTimeType(); // bb 1277 return this.issued; 1278 } 1279 1280 public boolean hasIssuedElement() { 1281 return this.issued != null && !this.issued.isEmpty(); 1282 } 1283 1284 public boolean hasIssued() { 1285 return this.issued != null && !this.issued.isEmpty(); 1286 } 1287 1288 /** 1289 * @param value {@link #issued} (When this Contract Provision was issued.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value 1290 */ 1291 public TermComponent setIssuedElement(DateTimeType value) { 1292 this.issued = value; 1293 return this; 1294 } 1295 1296 /** 1297 * @return When this Contract Provision was issued. 1298 */ 1299 public Date getIssued() { 1300 return this.issued == null ? null : this.issued.getValue(); 1301 } 1302 1303 /** 1304 * @param value When this Contract Provision was issued. 1305 */ 1306 public TermComponent setIssued(Date value) { 1307 if (value == null) 1308 this.issued = null; 1309 else { 1310 if (this.issued == null) 1311 this.issued = new DateTimeType(); 1312 this.issued.setValue(value); 1313 } 1314 return this; 1315 } 1316 1317 /** 1318 * @return {@link #applies} (Relevant time or time-period when this Contract Provision is applicable.) 1319 */ 1320 public Period getApplies() { 1321 if (this.applies == null) 1322 if (Configuration.errorOnAutoCreate()) 1323 throw new Error("Attempt to auto-create TermComponent.applies"); 1324 else if (Configuration.doAutoCreate()) 1325 this.applies = new Period(); // cc 1326 return this.applies; 1327 } 1328 1329 public boolean hasApplies() { 1330 return this.applies != null && !this.applies.isEmpty(); 1331 } 1332 1333 /** 1334 * @param value {@link #applies} (Relevant time or time-period when this Contract Provision is applicable.) 1335 */ 1336 public TermComponent setApplies(Period value) { 1337 this.applies = value; 1338 return this; 1339 } 1340 1341 /** 1342 * @return {@link #topic} (The entity that the term applies to.) 1343 */ 1344 public Type getTopic() { 1345 return this.topic; 1346 } 1347 1348 /** 1349 * @return {@link #topic} (The entity that the term applies to.) 1350 */ 1351 public CodeableConcept getTopicCodeableConcept() throws FHIRException { 1352 if (this.topic == null) 1353 return null; 1354 if (!(this.topic instanceof CodeableConcept)) 1355 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.topic.getClass().getName()+" was encountered"); 1356 return (CodeableConcept) this.topic; 1357 } 1358 1359 public boolean hasTopicCodeableConcept() { 1360 return this != null && this.topic instanceof CodeableConcept; 1361 } 1362 1363 /** 1364 * @return {@link #topic} (The entity that the term applies to.) 1365 */ 1366 public Reference getTopicReference() throws FHIRException { 1367 if (this.topic == null) 1368 return null; 1369 if (!(this.topic instanceof Reference)) 1370 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.topic.getClass().getName()+" was encountered"); 1371 return (Reference) this.topic; 1372 } 1373 1374 public boolean hasTopicReference() { 1375 return this != null && this.topic instanceof Reference; 1376 } 1377 1378 public boolean hasTopic() { 1379 return this.topic != null && !this.topic.isEmpty(); 1380 } 1381 1382 /** 1383 * @param value {@link #topic} (The entity that the term applies to.) 1384 */ 1385 public TermComponent setTopic(Type value) { 1386 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 1387 throw new Error("Not the right type for Contract.term.topic[x]: "+value.fhirType()); 1388 this.topic = value; 1389 return this; 1390 } 1391 1392 /** 1393 * @return {@link #type} (A legal clause or condition contained within a contract that requires one or both parties to perform a particular requirement by some specified time or prevents one or both parties from performing a particular requirement by some specified time.) 1394 */ 1395 public CodeableConcept getType() { 1396 if (this.type == null) 1397 if (Configuration.errorOnAutoCreate()) 1398 throw new Error("Attempt to auto-create TermComponent.type"); 1399 else if (Configuration.doAutoCreate()) 1400 this.type = new CodeableConcept(); // cc 1401 return this.type; 1402 } 1403 1404 public boolean hasType() { 1405 return this.type != null && !this.type.isEmpty(); 1406 } 1407 1408 /** 1409 * @param value {@link #type} (A legal clause or condition contained within a contract that requires one or both parties to perform a particular requirement by some specified time or prevents one or both parties from performing a particular requirement by some specified time.) 1410 */ 1411 public TermComponent setType(CodeableConcept value) { 1412 this.type = value; 1413 return this; 1414 } 1415 1416 /** 1417 * @return {@link #subType} (A specialized legal clause or condition based on overarching contract type.) 1418 */ 1419 public CodeableConcept getSubType() { 1420 if (this.subType == null) 1421 if (Configuration.errorOnAutoCreate()) 1422 throw new Error("Attempt to auto-create TermComponent.subType"); 1423 else if (Configuration.doAutoCreate()) 1424 this.subType = new CodeableConcept(); // cc 1425 return this.subType; 1426 } 1427 1428 public boolean hasSubType() { 1429 return this.subType != null && !this.subType.isEmpty(); 1430 } 1431 1432 /** 1433 * @param value {@link #subType} (A specialized legal clause or condition based on overarching contract type.) 1434 */ 1435 public TermComponent setSubType(CodeableConcept value) { 1436 this.subType = value; 1437 return this; 1438 } 1439 1440 /** 1441 * @return {@link #text} (Statement of a provision in a policy or a contract.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 1442 */ 1443 public StringType getTextElement() { 1444 if (this.text == null) 1445 if (Configuration.errorOnAutoCreate()) 1446 throw new Error("Attempt to auto-create TermComponent.text"); 1447 else if (Configuration.doAutoCreate()) 1448 this.text = new StringType(); // bb 1449 return this.text; 1450 } 1451 1452 public boolean hasTextElement() { 1453 return this.text != null && !this.text.isEmpty(); 1454 } 1455 1456 public boolean hasText() { 1457 return this.text != null && !this.text.isEmpty(); 1458 } 1459 1460 /** 1461 * @param value {@link #text} (Statement of a provision in a policy or a contract.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 1462 */ 1463 public TermComponent setTextElement(StringType value) { 1464 this.text = value; 1465 return this; 1466 } 1467 1468 /** 1469 * @return Statement of a provision in a policy or a contract. 1470 */ 1471 public String getText() { 1472 return this.text == null ? null : this.text.getValue(); 1473 } 1474 1475 /** 1476 * @param value Statement of a provision in a policy or a contract. 1477 */ 1478 public TermComponent setText(String value) { 1479 if (Utilities.noString(value)) 1480 this.text = null; 1481 else { 1482 if (this.text == null) 1483 this.text = new StringType(); 1484 this.text.setValue(value); 1485 } 1486 return this; 1487 } 1488 1489 /** 1490 * @return {@link #securityLabel} (Security labels that protect the handling of information about the term and its elements, which may be specifically identified..) 1491 */ 1492 public List<SecurityLabelComponent> getSecurityLabel() { 1493 if (this.securityLabel == null) 1494 this.securityLabel = new ArrayList<SecurityLabelComponent>(); 1495 return this.securityLabel; 1496 } 1497 1498 /** 1499 * @return Returns a reference to <code>this</code> for easy method chaining 1500 */ 1501 public TermComponent setSecurityLabel(List<SecurityLabelComponent> theSecurityLabel) { 1502 this.securityLabel = theSecurityLabel; 1503 return this; 1504 } 1505 1506 public boolean hasSecurityLabel() { 1507 if (this.securityLabel == null) 1508 return false; 1509 for (SecurityLabelComponent item : this.securityLabel) 1510 if (!item.isEmpty()) 1511 return true; 1512 return false; 1513 } 1514 1515 public SecurityLabelComponent addSecurityLabel() { //3 1516 SecurityLabelComponent t = new SecurityLabelComponent(); 1517 if (this.securityLabel == null) 1518 this.securityLabel = new ArrayList<SecurityLabelComponent>(); 1519 this.securityLabel.add(t); 1520 return t; 1521 } 1522 1523 public TermComponent addSecurityLabel(SecurityLabelComponent t) { //3 1524 if (t == null) 1525 return this; 1526 if (this.securityLabel == null) 1527 this.securityLabel = new ArrayList<SecurityLabelComponent>(); 1528 this.securityLabel.add(t); 1529 return this; 1530 } 1531 1532 /** 1533 * @return The first repetition of repeating field {@link #securityLabel}, creating it if it does not already exist 1534 */ 1535 public SecurityLabelComponent getSecurityLabelFirstRep() { 1536 if (getSecurityLabel().isEmpty()) { 1537 addSecurityLabel(); 1538 } 1539 return getSecurityLabel().get(0); 1540 } 1541 1542 /** 1543 * @return {@link #offer} (The matter of concern in the context of this provision of the agrement.) 1544 */ 1545 public ContractOfferComponent getOffer() { 1546 if (this.offer == null) 1547 if (Configuration.errorOnAutoCreate()) 1548 throw new Error("Attempt to auto-create TermComponent.offer"); 1549 else if (Configuration.doAutoCreate()) 1550 this.offer = new ContractOfferComponent(); // cc 1551 return this.offer; 1552 } 1553 1554 public boolean hasOffer() { 1555 return this.offer != null && !this.offer.isEmpty(); 1556 } 1557 1558 /** 1559 * @param value {@link #offer} (The matter of concern in the context of this provision of the agrement.) 1560 */ 1561 public TermComponent setOffer(ContractOfferComponent value) { 1562 this.offer = value; 1563 return this; 1564 } 1565 1566 /** 1567 * @return {@link #asset} (Contract Term Asset List.) 1568 */ 1569 public List<ContractAssetComponent> getAsset() { 1570 if (this.asset == null) 1571 this.asset = new ArrayList<ContractAssetComponent>(); 1572 return this.asset; 1573 } 1574 1575 /** 1576 * @return Returns a reference to <code>this</code> for easy method chaining 1577 */ 1578 public TermComponent setAsset(List<ContractAssetComponent> theAsset) { 1579 this.asset = theAsset; 1580 return this; 1581 } 1582 1583 public boolean hasAsset() { 1584 if (this.asset == null) 1585 return false; 1586 for (ContractAssetComponent item : this.asset) 1587 if (!item.isEmpty()) 1588 return true; 1589 return false; 1590 } 1591 1592 public ContractAssetComponent addAsset() { //3 1593 ContractAssetComponent t = new ContractAssetComponent(); 1594 if (this.asset == null) 1595 this.asset = new ArrayList<ContractAssetComponent>(); 1596 this.asset.add(t); 1597 return t; 1598 } 1599 1600 public TermComponent addAsset(ContractAssetComponent t) { //3 1601 if (t == null) 1602 return this; 1603 if (this.asset == null) 1604 this.asset = new ArrayList<ContractAssetComponent>(); 1605 this.asset.add(t); 1606 return this; 1607 } 1608 1609 /** 1610 * @return The first repetition of repeating field {@link #asset}, creating it if it does not already exist 1611 */ 1612 public ContractAssetComponent getAssetFirstRep() { 1613 if (getAsset().isEmpty()) { 1614 addAsset(); 1615 } 1616 return getAsset().get(0); 1617 } 1618 1619 /** 1620 * @return {@link #action} (An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.) 1621 */ 1622 public List<ActionComponent> getAction() { 1623 if (this.action == null) 1624 this.action = new ArrayList<ActionComponent>(); 1625 return this.action; 1626 } 1627 1628 /** 1629 * @return Returns a reference to <code>this</code> for easy method chaining 1630 */ 1631 public TermComponent setAction(List<ActionComponent> theAction) { 1632 this.action = theAction; 1633 return this; 1634 } 1635 1636 public boolean hasAction() { 1637 if (this.action == null) 1638 return false; 1639 for (ActionComponent item : this.action) 1640 if (!item.isEmpty()) 1641 return true; 1642 return false; 1643 } 1644 1645 public ActionComponent addAction() { //3 1646 ActionComponent t = new ActionComponent(); 1647 if (this.action == null) 1648 this.action = new ArrayList<ActionComponent>(); 1649 this.action.add(t); 1650 return t; 1651 } 1652 1653 public TermComponent addAction(ActionComponent t) { //3 1654 if (t == null) 1655 return this; 1656 if (this.action == null) 1657 this.action = new ArrayList<ActionComponent>(); 1658 this.action.add(t); 1659 return this; 1660 } 1661 1662 /** 1663 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 1664 */ 1665 public ActionComponent getActionFirstRep() { 1666 if (getAction().isEmpty()) { 1667 addAction(); 1668 } 1669 return getAction().get(0); 1670 } 1671 1672 /** 1673 * @return {@link #group} (Nested group of Contract Provisions.) 1674 */ 1675 public List<TermComponent> getGroup() { 1676 if (this.group == null) 1677 this.group = new ArrayList<TermComponent>(); 1678 return this.group; 1679 } 1680 1681 /** 1682 * @return Returns a reference to <code>this</code> for easy method chaining 1683 */ 1684 public TermComponent setGroup(List<TermComponent> theGroup) { 1685 this.group = theGroup; 1686 return this; 1687 } 1688 1689 public boolean hasGroup() { 1690 if (this.group == null) 1691 return false; 1692 for (TermComponent item : this.group) 1693 if (!item.isEmpty()) 1694 return true; 1695 return false; 1696 } 1697 1698 public TermComponent addGroup() { //3 1699 TermComponent t = new TermComponent(); 1700 if (this.group == null) 1701 this.group = new ArrayList<TermComponent>(); 1702 this.group.add(t); 1703 return t; 1704 } 1705 1706 public TermComponent addGroup(TermComponent t) { //3 1707 if (t == null) 1708 return this; 1709 if (this.group == null) 1710 this.group = new ArrayList<TermComponent>(); 1711 this.group.add(t); 1712 return this; 1713 } 1714 1715 /** 1716 * @return The first repetition of repeating field {@link #group}, creating it if it does not already exist 1717 */ 1718 public TermComponent getGroupFirstRep() { 1719 if (getGroup().isEmpty()) { 1720 addGroup(); 1721 } 1722 return getGroup().get(0); 1723 } 1724 1725 protected void listChildren(List<Property> children) { 1726 super.listChildren(children); 1727 children.add(new Property("identifier", "Identifier", "Unique identifier for this particular Contract Provision.", 0, 1, identifier)); 1728 children.add(new Property("issued", "dateTime", "When this Contract Provision was issued.", 0, 1, issued)); 1729 children.add(new Property("applies", "Period", "Relevant time or time-period when this Contract Provision is applicable.", 0, 1, applies)); 1730 children.add(new Property("topic[x]", "CodeableConcept|Reference(Any)", "The entity that the term applies to.", 0, 1, topic)); 1731 children.add(new Property("type", "CodeableConcept", "A legal clause or condition contained within a contract that requires one or both parties to perform a particular requirement by some specified time or prevents one or both parties from performing a particular requirement by some specified time.", 0, 1, type)); 1732 children.add(new Property("subType", "CodeableConcept", "A specialized legal clause or condition based on overarching contract type.", 0, 1, subType)); 1733 children.add(new Property("text", "string", "Statement of a provision in a policy or a contract.", 0, 1, text)); 1734 children.add(new Property("securityLabel", "", "Security labels that protect the handling of information about the term and its elements, which may be specifically identified..", 0, java.lang.Integer.MAX_VALUE, securityLabel)); 1735 children.add(new Property("offer", "", "The matter of concern in the context of this provision of the agrement.", 0, 1, offer)); 1736 children.add(new Property("asset", "", "Contract Term Asset List.", 0, java.lang.Integer.MAX_VALUE, asset)); 1737 children.add(new Property("action", "", "An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.", 0, java.lang.Integer.MAX_VALUE, action)); 1738 children.add(new Property("group", "@Contract.term", "Nested group of Contract Provisions.", 0, java.lang.Integer.MAX_VALUE, group)); 1739 } 1740 1741 @Override 1742 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1743 switch (_hash) { 1744 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique identifier for this particular Contract Provision.", 0, 1, identifier); 1745 case -1179159893: /*issued*/ return new Property("issued", "dateTime", "When this Contract Provision was issued.", 0, 1, issued); 1746 case -793235316: /*applies*/ return new Property("applies", "Period", "Relevant time or time-period when this Contract Provision is applicable.", 0, 1, applies); 1747 case -957295375: /*topic[x]*/ return new Property("topic[x]", "CodeableConcept|Reference(Any)", "The entity that the term applies to.", 0, 1, topic); 1748 case 110546223: /*topic*/ return new Property("topic[x]", "CodeableConcept|Reference(Any)", "The entity that the term applies to.", 0, 1, topic); 1749 case 777778802: /*topicCodeableConcept*/ return new Property("topic[x]", "CodeableConcept|Reference(Any)", "The entity that the term applies to.", 0, 1, topic); 1750 case -343345444: /*topicReference*/ return new Property("topic[x]", "CodeableConcept|Reference(Any)", "The entity that the term applies to.", 0, 1, topic); 1751 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "A legal clause or condition contained within a contract that requires one or both parties to perform a particular requirement by some specified time or prevents one or both parties from performing a particular requirement by some specified time.", 0, 1, type); 1752 case -1868521062: /*subType*/ return new Property("subType", "CodeableConcept", "A specialized legal clause or condition based on overarching contract type.", 0, 1, subType); 1753 case 3556653: /*text*/ return new Property("text", "string", "Statement of a provision in a policy or a contract.", 0, 1, text); 1754 case -722296940: /*securityLabel*/ return new Property("securityLabel", "", "Security labels that protect the handling of information about the term and its elements, which may be specifically identified..", 0, java.lang.Integer.MAX_VALUE, securityLabel); 1755 case 105650780: /*offer*/ return new Property("offer", "", "The matter of concern in the context of this provision of the agrement.", 0, 1, offer); 1756 case 93121264: /*asset*/ return new Property("asset", "", "Contract Term Asset List.", 0, java.lang.Integer.MAX_VALUE, asset); 1757 case -1422950858: /*action*/ return new Property("action", "", "An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.", 0, java.lang.Integer.MAX_VALUE, action); 1758 case 98629247: /*group*/ return new Property("group", "@Contract.term", "Nested group of Contract Provisions.", 0, java.lang.Integer.MAX_VALUE, group); 1759 default: return super.getNamedProperty(_hash, _name, _checkValid); 1760 } 1761 1762 } 1763 1764 @Override 1765 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1766 switch (hash) { 1767 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 1768 case -1179159893: /*issued*/ return this.issued == null ? new Base[0] : new Base[] {this.issued}; // DateTimeType 1769 case -793235316: /*applies*/ return this.applies == null ? new Base[0] : new Base[] {this.applies}; // Period 1770 case 110546223: /*topic*/ return this.topic == null ? new Base[0] : new Base[] {this.topic}; // Type 1771 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1772 case -1868521062: /*subType*/ return this.subType == null ? new Base[0] : new Base[] {this.subType}; // CodeableConcept 1773 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 1774 case -722296940: /*securityLabel*/ return this.securityLabel == null ? new Base[0] : this.securityLabel.toArray(new Base[this.securityLabel.size()]); // SecurityLabelComponent 1775 case 105650780: /*offer*/ return this.offer == null ? new Base[0] : new Base[] {this.offer}; // ContractOfferComponent 1776 case 93121264: /*asset*/ return this.asset == null ? new Base[0] : this.asset.toArray(new Base[this.asset.size()]); // ContractAssetComponent 1777 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // ActionComponent 1778 case 98629247: /*group*/ return this.group == null ? new Base[0] : this.group.toArray(new Base[this.group.size()]); // TermComponent 1779 default: return super.getProperty(hash, name, checkValid); 1780 } 1781 1782 } 1783 1784 @Override 1785 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1786 switch (hash) { 1787 case -1618432855: // identifier 1788 this.identifier = castToIdentifier(value); // Identifier 1789 return value; 1790 case -1179159893: // issued 1791 this.issued = castToDateTime(value); // DateTimeType 1792 return value; 1793 case -793235316: // applies 1794 this.applies = castToPeriod(value); // Period 1795 return value; 1796 case 110546223: // topic 1797 this.topic = castToType(value); // Type 1798 return value; 1799 case 3575610: // type 1800 this.type = castToCodeableConcept(value); // CodeableConcept 1801 return value; 1802 case -1868521062: // subType 1803 this.subType = castToCodeableConcept(value); // CodeableConcept 1804 return value; 1805 case 3556653: // text 1806 this.text = castToString(value); // StringType 1807 return value; 1808 case -722296940: // securityLabel 1809 this.getSecurityLabel().add((SecurityLabelComponent) value); // SecurityLabelComponent 1810 return value; 1811 case 105650780: // offer 1812 this.offer = (ContractOfferComponent) value; // ContractOfferComponent 1813 return value; 1814 case 93121264: // asset 1815 this.getAsset().add((ContractAssetComponent) value); // ContractAssetComponent 1816 return value; 1817 case -1422950858: // action 1818 this.getAction().add((ActionComponent) value); // ActionComponent 1819 return value; 1820 case 98629247: // group 1821 this.getGroup().add((TermComponent) value); // TermComponent 1822 return value; 1823 default: return super.setProperty(hash, name, value); 1824 } 1825 1826 } 1827 1828 @Override 1829 public Base setProperty(String name, Base value) throws FHIRException { 1830 if (name.equals("identifier")) { 1831 this.identifier = castToIdentifier(value); // Identifier 1832 } else if (name.equals("issued")) { 1833 this.issued = castToDateTime(value); // DateTimeType 1834 } else if (name.equals("applies")) { 1835 this.applies = castToPeriod(value); // Period 1836 } else if (name.equals("topic[x]")) { 1837 this.topic = castToType(value); // Type 1838 } else if (name.equals("type")) { 1839 this.type = castToCodeableConcept(value); // CodeableConcept 1840 } else if (name.equals("subType")) { 1841 this.subType = castToCodeableConcept(value); // CodeableConcept 1842 } else if (name.equals("text")) { 1843 this.text = castToString(value); // StringType 1844 } else if (name.equals("securityLabel")) { 1845 this.getSecurityLabel().add((SecurityLabelComponent) value); 1846 } else if (name.equals("offer")) { 1847 this.offer = (ContractOfferComponent) value; // ContractOfferComponent 1848 } else if (name.equals("asset")) { 1849 this.getAsset().add((ContractAssetComponent) value); 1850 } else if (name.equals("action")) { 1851 this.getAction().add((ActionComponent) value); 1852 } else if (name.equals("group")) { 1853 this.getGroup().add((TermComponent) value); 1854 } else 1855 return super.setProperty(name, value); 1856 return value; 1857 } 1858 1859 @Override 1860 public Base makeProperty(int hash, String name) throws FHIRException { 1861 switch (hash) { 1862 case -1618432855: return getIdentifier(); 1863 case -1179159893: return getIssuedElement(); 1864 case -793235316: return getApplies(); 1865 case -957295375: return getTopic(); 1866 case 110546223: return getTopic(); 1867 case 3575610: return getType(); 1868 case -1868521062: return getSubType(); 1869 case 3556653: return getTextElement(); 1870 case -722296940: return addSecurityLabel(); 1871 case 105650780: return getOffer(); 1872 case 93121264: return addAsset(); 1873 case -1422950858: return addAction(); 1874 case 98629247: return addGroup(); 1875 default: return super.makeProperty(hash, name); 1876 } 1877 1878 } 1879 1880 @Override 1881 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1882 switch (hash) { 1883 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1884 case -1179159893: /*issued*/ return new String[] {"dateTime"}; 1885 case -793235316: /*applies*/ return new String[] {"Period"}; 1886 case 110546223: /*topic*/ return new String[] {"CodeableConcept", "Reference"}; 1887 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1888 case -1868521062: /*subType*/ return new String[] {"CodeableConcept"}; 1889 case 3556653: /*text*/ return new String[] {"string"}; 1890 case -722296940: /*securityLabel*/ return new String[] {}; 1891 case 105650780: /*offer*/ return new String[] {}; 1892 case 93121264: /*asset*/ return new String[] {}; 1893 case -1422950858: /*action*/ return new String[] {}; 1894 case 98629247: /*group*/ return new String[] {"@Contract.term"}; 1895 default: return super.getTypesForProperty(hash, name); 1896 } 1897 1898 } 1899 1900 @Override 1901 public Base addChild(String name) throws FHIRException { 1902 if (name.equals("identifier")) { 1903 this.identifier = new Identifier(); 1904 return this.identifier; 1905 } 1906 else if (name.equals("issued")) { 1907 throw new FHIRException("Cannot call addChild on a primitive type Contract.issued"); 1908 } 1909 else if (name.equals("applies")) { 1910 this.applies = new Period(); 1911 return this.applies; 1912 } 1913 else if (name.equals("topicCodeableConcept")) { 1914 this.topic = new CodeableConcept(); 1915 return this.topic; 1916 } 1917 else if (name.equals("topicReference")) { 1918 this.topic = new Reference(); 1919 return this.topic; 1920 } 1921 else if (name.equals("type")) { 1922 this.type = new CodeableConcept(); 1923 return this.type; 1924 } 1925 else if (name.equals("subType")) { 1926 this.subType = new CodeableConcept(); 1927 return this.subType; 1928 } 1929 else if (name.equals("text")) { 1930 throw new FHIRException("Cannot call addChild on a primitive type Contract.text"); 1931 } 1932 else if (name.equals("securityLabel")) { 1933 return addSecurityLabel(); 1934 } 1935 else if (name.equals("offer")) { 1936 this.offer = new ContractOfferComponent(); 1937 return this.offer; 1938 } 1939 else if (name.equals("asset")) { 1940 return addAsset(); 1941 } 1942 else if (name.equals("action")) { 1943 return addAction(); 1944 } 1945 else if (name.equals("group")) { 1946 return addGroup(); 1947 } 1948 else 1949 return super.addChild(name); 1950 } 1951 1952 public TermComponent copy() { 1953 TermComponent dst = new TermComponent(); 1954 copyValues(dst); 1955 dst.identifier = identifier == null ? null : identifier.copy(); 1956 dst.issued = issued == null ? null : issued.copy(); 1957 dst.applies = applies == null ? null : applies.copy(); 1958 dst.topic = topic == null ? null : topic.copy(); 1959 dst.type = type == null ? null : type.copy(); 1960 dst.subType = subType == null ? null : subType.copy(); 1961 dst.text = text == null ? null : text.copy(); 1962 if (securityLabel != null) { 1963 dst.securityLabel = new ArrayList<SecurityLabelComponent>(); 1964 for (SecurityLabelComponent i : securityLabel) 1965 dst.securityLabel.add(i.copy()); 1966 }; 1967 dst.offer = offer == null ? null : offer.copy(); 1968 if (asset != null) { 1969 dst.asset = new ArrayList<ContractAssetComponent>(); 1970 for (ContractAssetComponent i : asset) 1971 dst.asset.add(i.copy()); 1972 }; 1973 if (action != null) { 1974 dst.action = new ArrayList<ActionComponent>(); 1975 for (ActionComponent i : action) 1976 dst.action.add(i.copy()); 1977 }; 1978 if (group != null) { 1979 dst.group = new ArrayList<TermComponent>(); 1980 for (TermComponent i : group) 1981 dst.group.add(i.copy()); 1982 }; 1983 return dst; 1984 } 1985 1986 @Override 1987 public boolean equalsDeep(Base other_) { 1988 if (!super.equalsDeep(other_)) 1989 return false; 1990 if (!(other_ instanceof TermComponent)) 1991 return false; 1992 TermComponent o = (TermComponent) other_; 1993 return compareDeep(identifier, o.identifier, true) && compareDeep(issued, o.issued, true) && compareDeep(applies, o.applies, true) 1994 && compareDeep(topic, o.topic, true) && compareDeep(type, o.type, true) && compareDeep(subType, o.subType, true) 1995 && compareDeep(text, o.text, true) && compareDeep(securityLabel, o.securityLabel, true) && compareDeep(offer, o.offer, true) 1996 && compareDeep(asset, o.asset, true) && compareDeep(action, o.action, true) && compareDeep(group, o.group, true) 1997 ; 1998 } 1999 2000 @Override 2001 public boolean equalsShallow(Base other_) { 2002 if (!super.equalsShallow(other_)) 2003 return false; 2004 if (!(other_ instanceof TermComponent)) 2005 return false; 2006 TermComponent o = (TermComponent) other_; 2007 return compareValues(issued, o.issued, true) && compareValues(text, o.text, true); 2008 } 2009 2010 public boolean isEmpty() { 2011 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, issued, applies 2012 , topic, type, subType, text, securityLabel, offer, asset, action, group); 2013 } 2014 2015 public String fhirType() { 2016 return "Contract.term"; 2017 2018 } 2019 2020 } 2021 2022 @Block() 2023 public static class SecurityLabelComponent extends BackboneElement implements IBaseBackboneElement { 2024 /** 2025 * Number used to link this term or term element to the applicable Security Label. 2026 */ 2027 @Child(name = "number", type = {UnsignedIntType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2028 @Description(shortDefinition="Link to Security Labels", formalDefinition="Number used to link this term or term element to the applicable Security Label." ) 2029 protected List<UnsignedIntType> number; 2030 2031 /** 2032 * Security label privacy tag that species the level of confidentiality protection required for this term and/or term elements. 2033 */ 2034 @Child(name = "classification", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false) 2035 @Description(shortDefinition="Confidentiality Protection", formalDefinition="Security label privacy tag that species the level of confidentiality protection required for this term and/or term elements." ) 2036 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-security-classification") 2037 protected Coding classification; 2038 2039 /** 2040 * Security label privacy tag that species the applicable privacy and security policies governing this term and/or term elements. 2041 */ 2042 @Child(name = "category", type = {Coding.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2043 @Description(shortDefinition="Applicable Policy", formalDefinition="Security label privacy tag that species the applicable privacy and security policies governing this term and/or term elements." ) 2044 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-security-category") 2045 protected List<Coding> category; 2046 2047 /** 2048 * Security label privacy tag that species the manner in which term and/or term elements are to be protected. 2049 */ 2050 @Child(name = "control", type = {Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2051 @Description(shortDefinition="Handling Instructions", formalDefinition="Security label privacy tag that species the manner in which term and/or term elements are to be protected." ) 2052 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-security-control") 2053 protected List<Coding> control; 2054 2055 private static final long serialVersionUID = 788281758L; 2056 2057 /** 2058 * Constructor 2059 */ 2060 public SecurityLabelComponent() { 2061 super(); 2062 } 2063 2064 /** 2065 * Constructor 2066 */ 2067 public SecurityLabelComponent(Coding classification) { 2068 super(); 2069 this.classification = classification; 2070 } 2071 2072 /** 2073 * @return {@link #number} (Number used to link this term or term element to the applicable Security Label.) 2074 */ 2075 public List<UnsignedIntType> getNumber() { 2076 if (this.number == null) 2077 this.number = new ArrayList<UnsignedIntType>(); 2078 return this.number; 2079 } 2080 2081 /** 2082 * @return Returns a reference to <code>this</code> for easy method chaining 2083 */ 2084 public SecurityLabelComponent setNumber(List<UnsignedIntType> theNumber) { 2085 this.number = theNumber; 2086 return this; 2087 } 2088 2089 public boolean hasNumber() { 2090 if (this.number == null) 2091 return false; 2092 for (UnsignedIntType item : this.number) 2093 if (!item.isEmpty()) 2094 return true; 2095 return false; 2096 } 2097 2098 /** 2099 * @return {@link #number} (Number used to link this term or term element to the applicable Security Label.) 2100 */ 2101 public UnsignedIntType addNumberElement() {//2 2102 UnsignedIntType t = new UnsignedIntType(); 2103 if (this.number == null) 2104 this.number = new ArrayList<UnsignedIntType>(); 2105 this.number.add(t); 2106 return t; 2107 } 2108 2109 /** 2110 * @param value {@link #number} (Number used to link this term or term element to the applicable Security Label.) 2111 */ 2112 public SecurityLabelComponent addNumber(int value) { //1 2113 UnsignedIntType t = new UnsignedIntType(); 2114 t.setValue(value); 2115 if (this.number == null) 2116 this.number = new ArrayList<UnsignedIntType>(); 2117 this.number.add(t); 2118 return this; 2119 } 2120 2121 /** 2122 * @param value {@link #number} (Number used to link this term or term element to the applicable Security Label.) 2123 */ 2124 public boolean hasNumber(int value) { 2125 if (this.number == null) 2126 return false; 2127 for (UnsignedIntType v : this.number) 2128 if (v.getValue().equals(value)) // unsignedInt 2129 return true; 2130 return false; 2131 } 2132 2133 /** 2134 * @return {@link #classification} (Security label privacy tag that species the level of confidentiality protection required for this term and/or term elements.) 2135 */ 2136 public Coding getClassification() { 2137 if (this.classification == null) 2138 if (Configuration.errorOnAutoCreate()) 2139 throw new Error("Attempt to auto-create SecurityLabelComponent.classification"); 2140 else if (Configuration.doAutoCreate()) 2141 this.classification = new Coding(); // cc 2142 return this.classification; 2143 } 2144 2145 public boolean hasClassification() { 2146 return this.classification != null && !this.classification.isEmpty(); 2147 } 2148 2149 /** 2150 * @param value {@link #classification} (Security label privacy tag that species the level of confidentiality protection required for this term and/or term elements.) 2151 */ 2152 public SecurityLabelComponent setClassification(Coding value) { 2153 this.classification = value; 2154 return this; 2155 } 2156 2157 /** 2158 * @return {@link #category} (Security label privacy tag that species the applicable privacy and security policies governing this term and/or term elements.) 2159 */ 2160 public List<Coding> getCategory() { 2161 if (this.category == null) 2162 this.category = new ArrayList<Coding>(); 2163 return this.category; 2164 } 2165 2166 /** 2167 * @return Returns a reference to <code>this</code> for easy method chaining 2168 */ 2169 public SecurityLabelComponent setCategory(List<Coding> theCategory) { 2170 this.category = theCategory; 2171 return this; 2172 } 2173 2174 public boolean hasCategory() { 2175 if (this.category == null) 2176 return false; 2177 for (Coding item : this.category) 2178 if (!item.isEmpty()) 2179 return true; 2180 return false; 2181 } 2182 2183 public Coding addCategory() { //3 2184 Coding t = new Coding(); 2185 if (this.category == null) 2186 this.category = new ArrayList<Coding>(); 2187 this.category.add(t); 2188 return t; 2189 } 2190 2191 public SecurityLabelComponent addCategory(Coding t) { //3 2192 if (t == null) 2193 return this; 2194 if (this.category == null) 2195 this.category = new ArrayList<Coding>(); 2196 this.category.add(t); 2197 return this; 2198 } 2199 2200 /** 2201 * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist 2202 */ 2203 public Coding getCategoryFirstRep() { 2204 if (getCategory().isEmpty()) { 2205 addCategory(); 2206 } 2207 return getCategory().get(0); 2208 } 2209 2210 /** 2211 * @return {@link #control} (Security label privacy tag that species the manner in which term and/or term elements are to be protected.) 2212 */ 2213 public List<Coding> getControl() { 2214 if (this.control == null) 2215 this.control = new ArrayList<Coding>(); 2216 return this.control; 2217 } 2218 2219 /** 2220 * @return Returns a reference to <code>this</code> for easy method chaining 2221 */ 2222 public SecurityLabelComponent setControl(List<Coding> theControl) { 2223 this.control = theControl; 2224 return this; 2225 } 2226 2227 public boolean hasControl() { 2228 if (this.control == null) 2229 return false; 2230 for (Coding item : this.control) 2231 if (!item.isEmpty()) 2232 return true; 2233 return false; 2234 } 2235 2236 public Coding addControl() { //3 2237 Coding t = new Coding(); 2238 if (this.control == null) 2239 this.control = new ArrayList<Coding>(); 2240 this.control.add(t); 2241 return t; 2242 } 2243 2244 public SecurityLabelComponent addControl(Coding t) { //3 2245 if (t == null) 2246 return this; 2247 if (this.control == null) 2248 this.control = new ArrayList<Coding>(); 2249 this.control.add(t); 2250 return this; 2251 } 2252 2253 /** 2254 * @return The first repetition of repeating field {@link #control}, creating it if it does not already exist 2255 */ 2256 public Coding getControlFirstRep() { 2257 if (getControl().isEmpty()) { 2258 addControl(); 2259 } 2260 return getControl().get(0); 2261 } 2262 2263 protected void listChildren(List<Property> children) { 2264 super.listChildren(children); 2265 children.add(new Property("number", "unsignedInt", "Number used to link this term or term element to the applicable Security Label.", 0, java.lang.Integer.MAX_VALUE, number)); 2266 children.add(new Property("classification", "Coding", "Security label privacy tag that species the level of confidentiality protection required for this term and/or term elements.", 0, 1, classification)); 2267 children.add(new Property("category", "Coding", "Security label privacy tag that species the applicable privacy and security policies governing this term and/or term elements.", 0, java.lang.Integer.MAX_VALUE, category)); 2268 children.add(new Property("control", "Coding", "Security label privacy tag that species the manner in which term and/or term elements are to be protected.", 0, java.lang.Integer.MAX_VALUE, control)); 2269 } 2270 2271 @Override 2272 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2273 switch (_hash) { 2274 case -1034364087: /*number*/ return new Property("number", "unsignedInt", "Number used to link this term or term element to the applicable Security Label.", 0, java.lang.Integer.MAX_VALUE, number); 2275 case 382350310: /*classification*/ return new Property("classification", "Coding", "Security label privacy tag that species the level of confidentiality protection required for this term and/or term elements.", 0, 1, classification); 2276 case 50511102: /*category*/ return new Property("category", "Coding", "Security label privacy tag that species the applicable privacy and security policies governing this term and/or term elements.", 0, java.lang.Integer.MAX_VALUE, category); 2277 case 951543133: /*control*/ return new Property("control", "Coding", "Security label privacy tag that species the manner in which term and/or term elements are to be protected.", 0, java.lang.Integer.MAX_VALUE, control); 2278 default: return super.getNamedProperty(_hash, _name, _checkValid); 2279 } 2280 2281 } 2282 2283 @Override 2284 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2285 switch (hash) { 2286 case -1034364087: /*number*/ return this.number == null ? new Base[0] : this.number.toArray(new Base[this.number.size()]); // UnsignedIntType 2287 case 382350310: /*classification*/ return this.classification == null ? new Base[0] : new Base[] {this.classification}; // Coding 2288 case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // Coding 2289 case 951543133: /*control*/ return this.control == null ? new Base[0] : this.control.toArray(new Base[this.control.size()]); // Coding 2290 default: return super.getProperty(hash, name, checkValid); 2291 } 2292 2293 } 2294 2295 @Override 2296 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2297 switch (hash) { 2298 case -1034364087: // number 2299 this.getNumber().add(castToUnsignedInt(value)); // UnsignedIntType 2300 return value; 2301 case 382350310: // classification 2302 this.classification = castToCoding(value); // Coding 2303 return value; 2304 case 50511102: // category 2305 this.getCategory().add(castToCoding(value)); // Coding 2306 return value; 2307 case 951543133: // control 2308 this.getControl().add(castToCoding(value)); // Coding 2309 return value; 2310 default: return super.setProperty(hash, name, value); 2311 } 2312 2313 } 2314 2315 @Override 2316 public Base setProperty(String name, Base value) throws FHIRException { 2317 if (name.equals("number")) { 2318 this.getNumber().add(castToUnsignedInt(value)); 2319 } else if (name.equals("classification")) { 2320 this.classification = castToCoding(value); // Coding 2321 } else if (name.equals("category")) { 2322 this.getCategory().add(castToCoding(value)); 2323 } else if (name.equals("control")) { 2324 this.getControl().add(castToCoding(value)); 2325 } else 2326 return super.setProperty(name, value); 2327 return value; 2328 } 2329 2330 @Override 2331 public Base makeProperty(int hash, String name) throws FHIRException { 2332 switch (hash) { 2333 case -1034364087: return addNumberElement(); 2334 case 382350310: return getClassification(); 2335 case 50511102: return addCategory(); 2336 case 951543133: return addControl(); 2337 default: return super.makeProperty(hash, name); 2338 } 2339 2340 } 2341 2342 @Override 2343 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2344 switch (hash) { 2345 case -1034364087: /*number*/ return new String[] {"unsignedInt"}; 2346 case 382350310: /*classification*/ return new String[] {"Coding"}; 2347 case 50511102: /*category*/ return new String[] {"Coding"}; 2348 case 951543133: /*control*/ return new String[] {"Coding"}; 2349 default: return super.getTypesForProperty(hash, name); 2350 } 2351 2352 } 2353 2354 @Override 2355 public Base addChild(String name) throws FHIRException { 2356 if (name.equals("number")) { 2357 throw new FHIRException("Cannot call addChild on a primitive type Contract.number"); 2358 } 2359 else if (name.equals("classification")) { 2360 this.classification = new Coding(); 2361 return this.classification; 2362 } 2363 else if (name.equals("category")) { 2364 return addCategory(); 2365 } 2366 else if (name.equals("control")) { 2367 return addControl(); 2368 } 2369 else 2370 return super.addChild(name); 2371 } 2372 2373 public SecurityLabelComponent copy() { 2374 SecurityLabelComponent dst = new SecurityLabelComponent(); 2375 copyValues(dst); 2376 if (number != null) { 2377 dst.number = new ArrayList<UnsignedIntType>(); 2378 for (UnsignedIntType i : number) 2379 dst.number.add(i.copy()); 2380 }; 2381 dst.classification = classification == null ? null : classification.copy(); 2382 if (category != null) { 2383 dst.category = new ArrayList<Coding>(); 2384 for (Coding i : category) 2385 dst.category.add(i.copy()); 2386 }; 2387 if (control != null) { 2388 dst.control = new ArrayList<Coding>(); 2389 for (Coding i : control) 2390 dst.control.add(i.copy()); 2391 }; 2392 return dst; 2393 } 2394 2395 @Override 2396 public boolean equalsDeep(Base other_) { 2397 if (!super.equalsDeep(other_)) 2398 return false; 2399 if (!(other_ instanceof SecurityLabelComponent)) 2400 return false; 2401 SecurityLabelComponent o = (SecurityLabelComponent) other_; 2402 return compareDeep(number, o.number, true) && compareDeep(classification, o.classification, true) 2403 && compareDeep(category, o.category, true) && compareDeep(control, o.control, true); 2404 } 2405 2406 @Override 2407 public boolean equalsShallow(Base other_) { 2408 if (!super.equalsShallow(other_)) 2409 return false; 2410 if (!(other_ instanceof SecurityLabelComponent)) 2411 return false; 2412 SecurityLabelComponent o = (SecurityLabelComponent) other_; 2413 return compareValues(number, o.number, true); 2414 } 2415 2416 public boolean isEmpty() { 2417 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(number, classification, category 2418 , control); 2419 } 2420 2421 public String fhirType() { 2422 return "Contract.term.securityLabel"; 2423 2424 } 2425 2426 } 2427 2428 @Block() 2429 public static class ContractOfferComponent extends BackboneElement implements IBaseBackboneElement { 2430 /** 2431 * Unique identifier for this particular Contract Provision. 2432 */ 2433 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2434 @Description(shortDefinition="Offer business ID", formalDefinition="Unique identifier for this particular Contract Provision." ) 2435 protected List<Identifier> identifier; 2436 2437 /** 2438 * Offer Recipient. 2439 */ 2440 @Child(name = "party", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2441 @Description(shortDefinition="Offer Recipient", formalDefinition="Offer Recipient." ) 2442 protected List<ContractPartyComponent> party; 2443 2444 /** 2445 * The owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30). 2446 */ 2447 @Child(name = "topic", type = {Reference.class}, order=3, min=0, max=1, modifier=false, summary=true) 2448 @Description(shortDefinition="Negotiable offer asset", formalDefinition="The owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30)." ) 2449 protected Reference topic; 2450 2451 /** 2452 * The actual object that is the target of the reference (The owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30).) 2453 */ 2454 protected Resource topicTarget; 2455 2456 /** 2457 * Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit. 2458 */ 2459 @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 2460 @Description(shortDefinition="Contract Offer Type or Form", formalDefinition="Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit." ) 2461 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-term-type") 2462 protected CodeableConcept type; 2463 2464 /** 2465 * Type of choice made by accepting party with respect to an offer made by an offeror/ grantee. 2466 */ 2467 @Child(name = "decision", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) 2468 @Description(shortDefinition="Accepting party choice", formalDefinition="Type of choice made by accepting party with respect to an offer made by an offeror/ grantee." ) 2469 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ActConsentDirective") 2470 protected CodeableConcept decision; 2471 2472 /** 2473 * How the decision about a Contract was conveyed. 2474 */ 2475 @Child(name = "decisionMode", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2476 @Description(shortDefinition="How decision is conveyed", formalDefinition="How the decision about a Contract was conveyed." ) 2477 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-decision-mode") 2478 protected List<CodeableConcept> decisionMode; 2479 2480 /** 2481 * Response to offer text. 2482 */ 2483 @Child(name = "answer", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2484 @Description(shortDefinition="Response to offer text", formalDefinition="Response to offer text." ) 2485 protected List<AnswerComponent> answer; 2486 2487 /** 2488 * Human readable form of this Contract Offer. 2489 */ 2490 @Child(name = "text", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) 2491 @Description(shortDefinition="Human readable offer text", formalDefinition="Human readable form of this Contract Offer." ) 2492 protected StringType text; 2493 2494 /** 2495 * The id of the clause or question text of the offer in the referenced questionnaire/response. 2496 */ 2497 @Child(name = "linkId", type = {StringType.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2498 @Description(shortDefinition="Pointer to text", formalDefinition="The id of the clause or question text of the offer in the referenced questionnaire/response." ) 2499 protected List<StringType> linkId; 2500 2501 /** 2502 * Security labels that protects the offer. 2503 */ 2504 @Child(name = "securityLabelNumber", type = {UnsignedIntType.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2505 @Description(shortDefinition="Offer restriction numbers", formalDefinition="Security labels that protects the offer." ) 2506 protected List<UnsignedIntType> securityLabelNumber; 2507 2508 private static final long serialVersionUID = -395674449L; 2509 2510 /** 2511 * Constructor 2512 */ 2513 public ContractOfferComponent() { 2514 super(); 2515 } 2516 2517 /** 2518 * @return {@link #identifier} (Unique identifier for this particular Contract Provision.) 2519 */ 2520 public List<Identifier> getIdentifier() { 2521 if (this.identifier == null) 2522 this.identifier = new ArrayList<Identifier>(); 2523 return this.identifier; 2524 } 2525 2526 /** 2527 * @return Returns a reference to <code>this</code> for easy method chaining 2528 */ 2529 public ContractOfferComponent setIdentifier(List<Identifier> theIdentifier) { 2530 this.identifier = theIdentifier; 2531 return this; 2532 } 2533 2534 public boolean hasIdentifier() { 2535 if (this.identifier == null) 2536 return false; 2537 for (Identifier item : this.identifier) 2538 if (!item.isEmpty()) 2539 return true; 2540 return false; 2541 } 2542 2543 public Identifier addIdentifier() { //3 2544 Identifier t = new Identifier(); 2545 if (this.identifier == null) 2546 this.identifier = new ArrayList<Identifier>(); 2547 this.identifier.add(t); 2548 return t; 2549 } 2550 2551 public ContractOfferComponent addIdentifier(Identifier t) { //3 2552 if (t == null) 2553 return this; 2554 if (this.identifier == null) 2555 this.identifier = new ArrayList<Identifier>(); 2556 this.identifier.add(t); 2557 return this; 2558 } 2559 2560 /** 2561 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 2562 */ 2563 public Identifier getIdentifierFirstRep() { 2564 if (getIdentifier().isEmpty()) { 2565 addIdentifier(); 2566 } 2567 return getIdentifier().get(0); 2568 } 2569 2570 /** 2571 * @return {@link #party} (Offer Recipient.) 2572 */ 2573 public List<ContractPartyComponent> getParty() { 2574 if (this.party == null) 2575 this.party = new ArrayList<ContractPartyComponent>(); 2576 return this.party; 2577 } 2578 2579 /** 2580 * @return Returns a reference to <code>this</code> for easy method chaining 2581 */ 2582 public ContractOfferComponent setParty(List<ContractPartyComponent> theParty) { 2583 this.party = theParty; 2584 return this; 2585 } 2586 2587 public boolean hasParty() { 2588 if (this.party == null) 2589 return false; 2590 for (ContractPartyComponent item : this.party) 2591 if (!item.isEmpty()) 2592 return true; 2593 return false; 2594 } 2595 2596 public ContractPartyComponent addParty() { //3 2597 ContractPartyComponent t = new ContractPartyComponent(); 2598 if (this.party == null) 2599 this.party = new ArrayList<ContractPartyComponent>(); 2600 this.party.add(t); 2601 return t; 2602 } 2603 2604 public ContractOfferComponent addParty(ContractPartyComponent t) { //3 2605 if (t == null) 2606 return this; 2607 if (this.party == null) 2608 this.party = new ArrayList<ContractPartyComponent>(); 2609 this.party.add(t); 2610 return this; 2611 } 2612 2613 /** 2614 * @return The first repetition of repeating field {@link #party}, creating it if it does not already exist 2615 */ 2616 public ContractPartyComponent getPartyFirstRep() { 2617 if (getParty().isEmpty()) { 2618 addParty(); 2619 } 2620 return getParty().get(0); 2621 } 2622 2623 /** 2624 * @return {@link #topic} (The owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30).) 2625 */ 2626 public Reference getTopic() { 2627 if (this.topic == null) 2628 if (Configuration.errorOnAutoCreate()) 2629 throw new Error("Attempt to auto-create ContractOfferComponent.topic"); 2630 else if (Configuration.doAutoCreate()) 2631 this.topic = new Reference(); // cc 2632 return this.topic; 2633 } 2634 2635 public boolean hasTopic() { 2636 return this.topic != null && !this.topic.isEmpty(); 2637 } 2638 2639 /** 2640 * @param value {@link #topic} (The owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30).) 2641 */ 2642 public ContractOfferComponent setTopic(Reference value) { 2643 this.topic = value; 2644 return this; 2645 } 2646 2647 /** 2648 * @return {@link #topic} 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 owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30).) 2649 */ 2650 public Resource getTopicTarget() { 2651 return this.topicTarget; 2652 } 2653 2654 /** 2655 * @param value {@link #topic} 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 owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30).) 2656 */ 2657 public ContractOfferComponent setTopicTarget(Resource value) { 2658 this.topicTarget = value; 2659 return this; 2660 } 2661 2662 /** 2663 * @return {@link #type} (Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.) 2664 */ 2665 public CodeableConcept getType() { 2666 if (this.type == null) 2667 if (Configuration.errorOnAutoCreate()) 2668 throw new Error("Attempt to auto-create ContractOfferComponent.type"); 2669 else if (Configuration.doAutoCreate()) 2670 this.type = new CodeableConcept(); // cc 2671 return this.type; 2672 } 2673 2674 public boolean hasType() { 2675 return this.type != null && !this.type.isEmpty(); 2676 } 2677 2678 /** 2679 * @param value {@link #type} (Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.) 2680 */ 2681 public ContractOfferComponent setType(CodeableConcept value) { 2682 this.type = value; 2683 return this; 2684 } 2685 2686 /** 2687 * @return {@link #decision} (Type of choice made by accepting party with respect to an offer made by an offeror/ grantee.) 2688 */ 2689 public CodeableConcept getDecision() { 2690 if (this.decision == null) 2691 if (Configuration.errorOnAutoCreate()) 2692 throw new Error("Attempt to auto-create ContractOfferComponent.decision"); 2693 else if (Configuration.doAutoCreate()) 2694 this.decision = new CodeableConcept(); // cc 2695 return this.decision; 2696 } 2697 2698 public boolean hasDecision() { 2699 return this.decision != null && !this.decision.isEmpty(); 2700 } 2701 2702 /** 2703 * @param value {@link #decision} (Type of choice made by accepting party with respect to an offer made by an offeror/ grantee.) 2704 */ 2705 public ContractOfferComponent setDecision(CodeableConcept value) { 2706 this.decision = value; 2707 return this; 2708 } 2709 2710 /** 2711 * @return {@link #decisionMode} (How the decision about a Contract was conveyed.) 2712 */ 2713 public List<CodeableConcept> getDecisionMode() { 2714 if (this.decisionMode == null) 2715 this.decisionMode = new ArrayList<CodeableConcept>(); 2716 return this.decisionMode; 2717 } 2718 2719 /** 2720 * @return Returns a reference to <code>this</code> for easy method chaining 2721 */ 2722 public ContractOfferComponent setDecisionMode(List<CodeableConcept> theDecisionMode) { 2723 this.decisionMode = theDecisionMode; 2724 return this; 2725 } 2726 2727 public boolean hasDecisionMode() { 2728 if (this.decisionMode == null) 2729 return false; 2730 for (CodeableConcept item : this.decisionMode) 2731 if (!item.isEmpty()) 2732 return true; 2733 return false; 2734 } 2735 2736 public CodeableConcept addDecisionMode() { //3 2737 CodeableConcept t = new CodeableConcept(); 2738 if (this.decisionMode == null) 2739 this.decisionMode = new ArrayList<CodeableConcept>(); 2740 this.decisionMode.add(t); 2741 return t; 2742 } 2743 2744 public ContractOfferComponent addDecisionMode(CodeableConcept t) { //3 2745 if (t == null) 2746 return this; 2747 if (this.decisionMode == null) 2748 this.decisionMode = new ArrayList<CodeableConcept>(); 2749 this.decisionMode.add(t); 2750 return this; 2751 } 2752 2753 /** 2754 * @return The first repetition of repeating field {@link #decisionMode}, creating it if it does not already exist 2755 */ 2756 public CodeableConcept getDecisionModeFirstRep() { 2757 if (getDecisionMode().isEmpty()) { 2758 addDecisionMode(); 2759 } 2760 return getDecisionMode().get(0); 2761 } 2762 2763 /** 2764 * @return {@link #answer} (Response to offer text.) 2765 */ 2766 public List<AnswerComponent> getAnswer() { 2767 if (this.answer == null) 2768 this.answer = new ArrayList<AnswerComponent>(); 2769 return this.answer; 2770 } 2771 2772 /** 2773 * @return Returns a reference to <code>this</code> for easy method chaining 2774 */ 2775 public ContractOfferComponent setAnswer(List<AnswerComponent> theAnswer) { 2776 this.answer = theAnswer; 2777 return this; 2778 } 2779 2780 public boolean hasAnswer() { 2781 if (this.answer == null) 2782 return false; 2783 for (AnswerComponent item : this.answer) 2784 if (!item.isEmpty()) 2785 return true; 2786 return false; 2787 } 2788 2789 public AnswerComponent addAnswer() { //3 2790 AnswerComponent t = new AnswerComponent(); 2791 if (this.answer == null) 2792 this.answer = new ArrayList<AnswerComponent>(); 2793 this.answer.add(t); 2794 return t; 2795 } 2796 2797 public ContractOfferComponent addAnswer(AnswerComponent t) { //3 2798 if (t == null) 2799 return this; 2800 if (this.answer == null) 2801 this.answer = new ArrayList<AnswerComponent>(); 2802 this.answer.add(t); 2803 return this; 2804 } 2805 2806 /** 2807 * @return The first repetition of repeating field {@link #answer}, creating it if it does not already exist 2808 */ 2809 public AnswerComponent getAnswerFirstRep() { 2810 if (getAnswer().isEmpty()) { 2811 addAnswer(); 2812 } 2813 return getAnswer().get(0); 2814 } 2815 2816 /** 2817 * @return {@link #text} (Human readable form of this Contract Offer.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 2818 */ 2819 public StringType getTextElement() { 2820 if (this.text == null) 2821 if (Configuration.errorOnAutoCreate()) 2822 throw new Error("Attempt to auto-create ContractOfferComponent.text"); 2823 else if (Configuration.doAutoCreate()) 2824 this.text = new StringType(); // bb 2825 return this.text; 2826 } 2827 2828 public boolean hasTextElement() { 2829 return this.text != null && !this.text.isEmpty(); 2830 } 2831 2832 public boolean hasText() { 2833 return this.text != null && !this.text.isEmpty(); 2834 } 2835 2836 /** 2837 * @param value {@link #text} (Human readable form of this Contract Offer.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 2838 */ 2839 public ContractOfferComponent setTextElement(StringType value) { 2840 this.text = value; 2841 return this; 2842 } 2843 2844 /** 2845 * @return Human readable form of this Contract Offer. 2846 */ 2847 public String getText() { 2848 return this.text == null ? null : this.text.getValue(); 2849 } 2850 2851 /** 2852 * @param value Human readable form of this Contract Offer. 2853 */ 2854 public ContractOfferComponent setText(String value) { 2855 if (Utilities.noString(value)) 2856 this.text = null; 2857 else { 2858 if (this.text == null) 2859 this.text = new StringType(); 2860 this.text.setValue(value); 2861 } 2862 return this; 2863 } 2864 2865 /** 2866 * @return {@link #linkId} (The id of the clause or question text of the offer in the referenced questionnaire/response.) 2867 */ 2868 public List<StringType> getLinkId() { 2869 if (this.linkId == null) 2870 this.linkId = new ArrayList<StringType>(); 2871 return this.linkId; 2872 } 2873 2874 /** 2875 * @return Returns a reference to <code>this</code> for easy method chaining 2876 */ 2877 public ContractOfferComponent setLinkId(List<StringType> theLinkId) { 2878 this.linkId = theLinkId; 2879 return this; 2880 } 2881 2882 public boolean hasLinkId() { 2883 if (this.linkId == null) 2884 return false; 2885 for (StringType item : this.linkId) 2886 if (!item.isEmpty()) 2887 return true; 2888 return false; 2889 } 2890 2891 /** 2892 * @return {@link #linkId} (The id of the clause or question text of the offer in the referenced questionnaire/response.) 2893 */ 2894 public StringType addLinkIdElement() {//2 2895 StringType t = new StringType(); 2896 if (this.linkId == null) 2897 this.linkId = new ArrayList<StringType>(); 2898 this.linkId.add(t); 2899 return t; 2900 } 2901 2902 /** 2903 * @param value {@link #linkId} (The id of the clause or question text of the offer in the referenced questionnaire/response.) 2904 */ 2905 public ContractOfferComponent addLinkId(String value) { //1 2906 StringType t = new StringType(); 2907 t.setValue(value); 2908 if (this.linkId == null) 2909 this.linkId = new ArrayList<StringType>(); 2910 this.linkId.add(t); 2911 return this; 2912 } 2913 2914 /** 2915 * @param value {@link #linkId} (The id of the clause or question text of the offer in the referenced questionnaire/response.) 2916 */ 2917 public boolean hasLinkId(String value) { 2918 if (this.linkId == null) 2919 return false; 2920 for (StringType v : this.linkId) 2921 if (v.getValue().equals(value)) // string 2922 return true; 2923 return false; 2924 } 2925 2926 /** 2927 * @return {@link #securityLabelNumber} (Security labels that protects the offer.) 2928 */ 2929 public List<UnsignedIntType> getSecurityLabelNumber() { 2930 if (this.securityLabelNumber == null) 2931 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 2932 return this.securityLabelNumber; 2933 } 2934 2935 /** 2936 * @return Returns a reference to <code>this</code> for easy method chaining 2937 */ 2938 public ContractOfferComponent setSecurityLabelNumber(List<UnsignedIntType> theSecurityLabelNumber) { 2939 this.securityLabelNumber = theSecurityLabelNumber; 2940 return this; 2941 } 2942 2943 public boolean hasSecurityLabelNumber() { 2944 if (this.securityLabelNumber == null) 2945 return false; 2946 for (UnsignedIntType item : this.securityLabelNumber) 2947 if (!item.isEmpty()) 2948 return true; 2949 return false; 2950 } 2951 2952 /** 2953 * @return {@link #securityLabelNumber} (Security labels that protects the offer.) 2954 */ 2955 public UnsignedIntType addSecurityLabelNumberElement() {//2 2956 UnsignedIntType t = new UnsignedIntType(); 2957 if (this.securityLabelNumber == null) 2958 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 2959 this.securityLabelNumber.add(t); 2960 return t; 2961 } 2962 2963 /** 2964 * @param value {@link #securityLabelNumber} (Security labels that protects the offer.) 2965 */ 2966 public ContractOfferComponent addSecurityLabelNumber(int value) { //1 2967 UnsignedIntType t = new UnsignedIntType(); 2968 t.setValue(value); 2969 if (this.securityLabelNumber == null) 2970 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 2971 this.securityLabelNumber.add(t); 2972 return this; 2973 } 2974 2975 /** 2976 * @param value {@link #securityLabelNumber} (Security labels that protects the offer.) 2977 */ 2978 public boolean hasSecurityLabelNumber(int value) { 2979 if (this.securityLabelNumber == null) 2980 return false; 2981 for (UnsignedIntType v : this.securityLabelNumber) 2982 if (v.getValue().equals(value)) // unsignedInt 2983 return true; 2984 return false; 2985 } 2986 2987 protected void listChildren(List<Property> children) { 2988 super.listChildren(children); 2989 children.add(new Property("identifier", "Identifier", "Unique identifier for this particular Contract Provision.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2990 children.add(new Property("party", "", "Offer Recipient.", 0, java.lang.Integer.MAX_VALUE, party)); 2991 children.add(new Property("topic", "Reference(Any)", "The owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30).", 0, 1, topic)); 2992 children.add(new Property("type", "CodeableConcept", "Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.", 0, 1, type)); 2993 children.add(new Property("decision", "CodeableConcept", "Type of choice made by accepting party with respect to an offer made by an offeror/ grantee.", 0, 1, decision)); 2994 children.add(new Property("decisionMode", "CodeableConcept", "How the decision about a Contract was conveyed.", 0, java.lang.Integer.MAX_VALUE, decisionMode)); 2995 children.add(new Property("answer", "", "Response to offer text.", 0, java.lang.Integer.MAX_VALUE, answer)); 2996 children.add(new Property("text", "string", "Human readable form of this Contract Offer.", 0, 1, text)); 2997 children.add(new Property("linkId", "string", "The id of the clause or question text of the offer in the referenced questionnaire/response.", 0, java.lang.Integer.MAX_VALUE, linkId)); 2998 children.add(new Property("securityLabelNumber", "unsignedInt", "Security labels that protects the offer.", 0, java.lang.Integer.MAX_VALUE, securityLabelNumber)); 2999 } 3000 3001 @Override 3002 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3003 switch (_hash) { 3004 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique identifier for this particular Contract Provision.", 0, java.lang.Integer.MAX_VALUE, identifier); 3005 case 106437350: /*party*/ return new Property("party", "", "Offer Recipient.", 0, java.lang.Integer.MAX_VALUE, party); 3006 case 110546223: /*topic*/ return new Property("topic", "Reference(Any)", "The owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30).", 0, 1, topic); 3007 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.", 0, 1, type); 3008 case 565719004: /*decision*/ return new Property("decision", "CodeableConcept", "Type of choice made by accepting party with respect to an offer made by an offeror/ grantee.", 0, 1, decision); 3009 case 675909535: /*decisionMode*/ return new Property("decisionMode", "CodeableConcept", "How the decision about a Contract was conveyed.", 0, java.lang.Integer.MAX_VALUE, decisionMode); 3010 case -1412808770: /*answer*/ return new Property("answer", "", "Response to offer text.", 0, java.lang.Integer.MAX_VALUE, answer); 3011 case 3556653: /*text*/ return new Property("text", "string", "Human readable form of this Contract Offer.", 0, 1, text); 3012 case -1102667083: /*linkId*/ return new Property("linkId", "string", "The id of the clause or question text of the offer in the referenced questionnaire/response.", 0, java.lang.Integer.MAX_VALUE, linkId); 3013 case -149460995: /*securityLabelNumber*/ return new Property("securityLabelNumber", "unsignedInt", "Security labels that protects the offer.", 0, java.lang.Integer.MAX_VALUE, securityLabelNumber); 3014 default: return super.getNamedProperty(_hash, _name, _checkValid); 3015 } 3016 3017 } 3018 3019 @Override 3020 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3021 switch (hash) { 3022 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 3023 case 106437350: /*party*/ return this.party == null ? new Base[0] : this.party.toArray(new Base[this.party.size()]); // ContractPartyComponent 3024 case 110546223: /*topic*/ return this.topic == null ? new Base[0] : new Base[] {this.topic}; // Reference 3025 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 3026 case 565719004: /*decision*/ return this.decision == null ? new Base[0] : new Base[] {this.decision}; // CodeableConcept 3027 case 675909535: /*decisionMode*/ return this.decisionMode == null ? new Base[0] : this.decisionMode.toArray(new Base[this.decisionMode.size()]); // CodeableConcept 3028 case -1412808770: /*answer*/ return this.answer == null ? new Base[0] : this.answer.toArray(new Base[this.answer.size()]); // AnswerComponent 3029 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 3030 case -1102667083: /*linkId*/ return this.linkId == null ? new Base[0] : this.linkId.toArray(new Base[this.linkId.size()]); // StringType 3031 case -149460995: /*securityLabelNumber*/ return this.securityLabelNumber == null ? new Base[0] : this.securityLabelNumber.toArray(new Base[this.securityLabelNumber.size()]); // UnsignedIntType 3032 default: return super.getProperty(hash, name, checkValid); 3033 } 3034 3035 } 3036 3037 @Override 3038 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3039 switch (hash) { 3040 case -1618432855: // identifier 3041 this.getIdentifier().add(castToIdentifier(value)); // Identifier 3042 return value; 3043 case 106437350: // party 3044 this.getParty().add((ContractPartyComponent) value); // ContractPartyComponent 3045 return value; 3046 case 110546223: // topic 3047 this.topic = castToReference(value); // Reference 3048 return value; 3049 case 3575610: // type 3050 this.type = castToCodeableConcept(value); // CodeableConcept 3051 return value; 3052 case 565719004: // decision 3053 this.decision = castToCodeableConcept(value); // CodeableConcept 3054 return value; 3055 case 675909535: // decisionMode 3056 this.getDecisionMode().add(castToCodeableConcept(value)); // CodeableConcept 3057 return value; 3058 case -1412808770: // answer 3059 this.getAnswer().add((AnswerComponent) value); // AnswerComponent 3060 return value; 3061 case 3556653: // text 3062 this.text = castToString(value); // StringType 3063 return value; 3064 case -1102667083: // linkId 3065 this.getLinkId().add(castToString(value)); // StringType 3066 return value; 3067 case -149460995: // securityLabelNumber 3068 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); // UnsignedIntType 3069 return value; 3070 default: return super.setProperty(hash, name, value); 3071 } 3072 3073 } 3074 3075 @Override 3076 public Base setProperty(String name, Base value) throws FHIRException { 3077 if (name.equals("identifier")) { 3078 this.getIdentifier().add(castToIdentifier(value)); 3079 } else if (name.equals("party")) { 3080 this.getParty().add((ContractPartyComponent) value); 3081 } else if (name.equals("topic")) { 3082 this.topic = castToReference(value); // Reference 3083 } else if (name.equals("type")) { 3084 this.type = castToCodeableConcept(value); // CodeableConcept 3085 } else if (name.equals("decision")) { 3086 this.decision = castToCodeableConcept(value); // CodeableConcept 3087 } else if (name.equals("decisionMode")) { 3088 this.getDecisionMode().add(castToCodeableConcept(value)); 3089 } else if (name.equals("answer")) { 3090 this.getAnswer().add((AnswerComponent) value); 3091 } else if (name.equals("text")) { 3092 this.text = castToString(value); // StringType 3093 } else if (name.equals("linkId")) { 3094 this.getLinkId().add(castToString(value)); 3095 } else if (name.equals("securityLabelNumber")) { 3096 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); 3097 } else 3098 return super.setProperty(name, value); 3099 return value; 3100 } 3101 3102 @Override 3103 public Base makeProperty(int hash, String name) throws FHIRException { 3104 switch (hash) { 3105 case -1618432855: return addIdentifier(); 3106 case 106437350: return addParty(); 3107 case 110546223: return getTopic(); 3108 case 3575610: return getType(); 3109 case 565719004: return getDecision(); 3110 case 675909535: return addDecisionMode(); 3111 case -1412808770: return addAnswer(); 3112 case 3556653: return getTextElement(); 3113 case -1102667083: return addLinkIdElement(); 3114 case -149460995: return addSecurityLabelNumberElement(); 3115 default: return super.makeProperty(hash, name); 3116 } 3117 3118 } 3119 3120 @Override 3121 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3122 switch (hash) { 3123 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 3124 case 106437350: /*party*/ return new String[] {}; 3125 case 110546223: /*topic*/ return new String[] {"Reference"}; 3126 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 3127 case 565719004: /*decision*/ return new String[] {"CodeableConcept"}; 3128 case 675909535: /*decisionMode*/ return new String[] {"CodeableConcept"}; 3129 case -1412808770: /*answer*/ return new String[] {}; 3130 case 3556653: /*text*/ return new String[] {"string"}; 3131 case -1102667083: /*linkId*/ return new String[] {"string"}; 3132 case -149460995: /*securityLabelNumber*/ return new String[] {"unsignedInt"}; 3133 default: return super.getTypesForProperty(hash, name); 3134 } 3135 3136 } 3137 3138 @Override 3139 public Base addChild(String name) throws FHIRException { 3140 if (name.equals("identifier")) { 3141 return addIdentifier(); 3142 } 3143 else if (name.equals("party")) { 3144 return addParty(); 3145 } 3146 else if (name.equals("topic")) { 3147 this.topic = new Reference(); 3148 return this.topic; 3149 } 3150 else if (name.equals("type")) { 3151 this.type = new CodeableConcept(); 3152 return this.type; 3153 } 3154 else if (name.equals("decision")) { 3155 this.decision = new CodeableConcept(); 3156 return this.decision; 3157 } 3158 else if (name.equals("decisionMode")) { 3159 return addDecisionMode(); 3160 } 3161 else if (name.equals("answer")) { 3162 return addAnswer(); 3163 } 3164 else if (name.equals("text")) { 3165 throw new FHIRException("Cannot call addChild on a primitive type Contract.text"); 3166 } 3167 else if (name.equals("linkId")) { 3168 throw new FHIRException("Cannot call addChild on a primitive type Contract.linkId"); 3169 } 3170 else if (name.equals("securityLabelNumber")) { 3171 throw new FHIRException("Cannot call addChild on a primitive type Contract.securityLabelNumber"); 3172 } 3173 else 3174 return super.addChild(name); 3175 } 3176 3177 public ContractOfferComponent copy() { 3178 ContractOfferComponent dst = new ContractOfferComponent(); 3179 copyValues(dst); 3180 if (identifier != null) { 3181 dst.identifier = new ArrayList<Identifier>(); 3182 for (Identifier i : identifier) 3183 dst.identifier.add(i.copy()); 3184 }; 3185 if (party != null) { 3186 dst.party = new ArrayList<ContractPartyComponent>(); 3187 for (ContractPartyComponent i : party) 3188 dst.party.add(i.copy()); 3189 }; 3190 dst.topic = topic == null ? null : topic.copy(); 3191 dst.type = type == null ? null : type.copy(); 3192 dst.decision = decision == null ? null : decision.copy(); 3193 if (decisionMode != null) { 3194 dst.decisionMode = new ArrayList<CodeableConcept>(); 3195 for (CodeableConcept i : decisionMode) 3196 dst.decisionMode.add(i.copy()); 3197 }; 3198 if (answer != null) { 3199 dst.answer = new ArrayList<AnswerComponent>(); 3200 for (AnswerComponent i : answer) 3201 dst.answer.add(i.copy()); 3202 }; 3203 dst.text = text == null ? null : text.copy(); 3204 if (linkId != null) { 3205 dst.linkId = new ArrayList<StringType>(); 3206 for (StringType i : linkId) 3207 dst.linkId.add(i.copy()); 3208 }; 3209 if (securityLabelNumber != null) { 3210 dst.securityLabelNumber = new ArrayList<UnsignedIntType>(); 3211 for (UnsignedIntType i : securityLabelNumber) 3212 dst.securityLabelNumber.add(i.copy()); 3213 }; 3214 return dst; 3215 } 3216 3217 @Override 3218 public boolean equalsDeep(Base other_) { 3219 if (!super.equalsDeep(other_)) 3220 return false; 3221 if (!(other_ instanceof ContractOfferComponent)) 3222 return false; 3223 ContractOfferComponent o = (ContractOfferComponent) other_; 3224 return compareDeep(identifier, o.identifier, true) && compareDeep(party, o.party, true) && compareDeep(topic, o.topic, true) 3225 && compareDeep(type, o.type, true) && compareDeep(decision, o.decision, true) && compareDeep(decisionMode, o.decisionMode, true) 3226 && compareDeep(answer, o.answer, true) && compareDeep(text, o.text, true) && compareDeep(linkId, o.linkId, true) 3227 && compareDeep(securityLabelNumber, o.securityLabelNumber, true); 3228 } 3229 3230 @Override 3231 public boolean equalsShallow(Base other_) { 3232 if (!super.equalsShallow(other_)) 3233 return false; 3234 if (!(other_ instanceof ContractOfferComponent)) 3235 return false; 3236 ContractOfferComponent o = (ContractOfferComponent) other_; 3237 return compareValues(text, o.text, true) && compareValues(linkId, o.linkId, true) && compareValues(securityLabelNumber, o.securityLabelNumber, true) 3238 ; 3239 } 3240 3241 public boolean isEmpty() { 3242 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, party, topic 3243 , type, decision, decisionMode, answer, text, linkId, securityLabelNumber); 3244 } 3245 3246 public String fhirType() { 3247 return "Contract.term.offer"; 3248 3249 } 3250 3251 } 3252 3253 @Block() 3254 public static class ContractPartyComponent extends BackboneElement implements IBaseBackboneElement { 3255 /** 3256 * Participant in the offer. 3257 */ 3258 @Child(name = "reference", type = {Patient.class, Person.class, RelatedPerson.class, Practitioner.class, Device.class, Group.class, Organization.class}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3259 @Description(shortDefinition="Referenced entity", formalDefinition="Participant in the offer." ) 3260 protected List<Reference> reference; 3261 /** 3262 * The actual objects that are the target of the reference (Participant in the offer.) 3263 */ 3264 protected List<Resource> referenceTarget; 3265 3266 3267 /** 3268 * How the party participates in the offer. 3269 */ 3270 @Child(name = "role", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false) 3271 @Description(shortDefinition="Participant engagement type", formalDefinition="How the party participates in the offer." ) 3272 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-party-role") 3273 protected CodeableConcept role; 3274 3275 private static final long serialVersionUID = 128949255L; 3276 3277 /** 3278 * Constructor 3279 */ 3280 public ContractPartyComponent() { 3281 super(); 3282 } 3283 3284 /** 3285 * Constructor 3286 */ 3287 public ContractPartyComponent(CodeableConcept role) { 3288 super(); 3289 this.role = role; 3290 } 3291 3292 /** 3293 * @return {@link #reference} (Participant in the offer.) 3294 */ 3295 public List<Reference> getReference() { 3296 if (this.reference == null) 3297 this.reference = new ArrayList<Reference>(); 3298 return this.reference; 3299 } 3300 3301 /** 3302 * @return Returns a reference to <code>this</code> for easy method chaining 3303 */ 3304 public ContractPartyComponent setReference(List<Reference> theReference) { 3305 this.reference = theReference; 3306 return this; 3307 } 3308 3309 public boolean hasReference() { 3310 if (this.reference == null) 3311 return false; 3312 for (Reference item : this.reference) 3313 if (!item.isEmpty()) 3314 return true; 3315 return false; 3316 } 3317 3318 public Reference addReference() { //3 3319 Reference t = new Reference(); 3320 if (this.reference == null) 3321 this.reference = new ArrayList<Reference>(); 3322 this.reference.add(t); 3323 return t; 3324 } 3325 3326 public ContractPartyComponent addReference(Reference t) { //3 3327 if (t == null) 3328 return this; 3329 if (this.reference == null) 3330 this.reference = new ArrayList<Reference>(); 3331 this.reference.add(t); 3332 return this; 3333 } 3334 3335 /** 3336 * @return The first repetition of repeating field {@link #reference}, creating it if it does not already exist 3337 */ 3338 public Reference getReferenceFirstRep() { 3339 if (getReference().isEmpty()) { 3340 addReference(); 3341 } 3342 return getReference().get(0); 3343 } 3344 3345 /** 3346 * @deprecated Use Reference#setResource(IBaseResource) instead 3347 */ 3348 @Deprecated 3349 public List<Resource> getReferenceTarget() { 3350 if (this.referenceTarget == null) 3351 this.referenceTarget = new ArrayList<Resource>(); 3352 return this.referenceTarget; 3353 } 3354 3355 /** 3356 * @return {@link #role} (How the party participates in the offer.) 3357 */ 3358 public CodeableConcept getRole() { 3359 if (this.role == null) 3360 if (Configuration.errorOnAutoCreate()) 3361 throw new Error("Attempt to auto-create ContractPartyComponent.role"); 3362 else if (Configuration.doAutoCreate()) 3363 this.role = new CodeableConcept(); // cc 3364 return this.role; 3365 } 3366 3367 public boolean hasRole() { 3368 return this.role != null && !this.role.isEmpty(); 3369 } 3370 3371 /** 3372 * @param value {@link #role} (How the party participates in the offer.) 3373 */ 3374 public ContractPartyComponent setRole(CodeableConcept value) { 3375 this.role = value; 3376 return this; 3377 } 3378 3379 protected void listChildren(List<Property> children) { 3380 super.listChildren(children); 3381 children.add(new Property("reference", "Reference(Patient|Person|RelatedPerson|Practitioner|Device|Group|Organization)", "Participant in the offer.", 0, java.lang.Integer.MAX_VALUE, reference)); 3382 children.add(new Property("role", "CodeableConcept", "How the party participates in the offer.", 0, 1, role)); 3383 } 3384 3385 @Override 3386 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3387 switch (_hash) { 3388 case -925155509: /*reference*/ return new Property("reference", "Reference(Patient|Person|RelatedPerson|Practitioner|Device|Group|Organization)", "Participant in the offer.", 0, java.lang.Integer.MAX_VALUE, reference); 3389 case 3506294: /*role*/ return new Property("role", "CodeableConcept", "How the party participates in the offer.", 0, 1, role); 3390 default: return super.getNamedProperty(_hash, _name, _checkValid); 3391 } 3392 3393 } 3394 3395 @Override 3396 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3397 switch (hash) { 3398 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : this.reference.toArray(new Base[this.reference.size()]); // Reference 3399 case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept 3400 default: return super.getProperty(hash, name, checkValid); 3401 } 3402 3403 } 3404 3405 @Override 3406 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3407 switch (hash) { 3408 case -925155509: // reference 3409 this.getReference().add(castToReference(value)); // Reference 3410 return value; 3411 case 3506294: // role 3412 this.role = castToCodeableConcept(value); // CodeableConcept 3413 return value; 3414 default: return super.setProperty(hash, name, value); 3415 } 3416 3417 } 3418 3419 @Override 3420 public Base setProperty(String name, Base value) throws FHIRException { 3421 if (name.equals("reference")) { 3422 this.getReference().add(castToReference(value)); 3423 } else if (name.equals("role")) { 3424 this.role = castToCodeableConcept(value); // CodeableConcept 3425 } else 3426 return super.setProperty(name, value); 3427 return value; 3428 } 3429 3430 @Override 3431 public Base makeProperty(int hash, String name) throws FHIRException { 3432 switch (hash) { 3433 case -925155509: return addReference(); 3434 case 3506294: return getRole(); 3435 default: return super.makeProperty(hash, name); 3436 } 3437 3438 } 3439 3440 @Override 3441 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3442 switch (hash) { 3443 case -925155509: /*reference*/ return new String[] {"Reference"}; 3444 case 3506294: /*role*/ return new String[] {"CodeableConcept"}; 3445 default: return super.getTypesForProperty(hash, name); 3446 } 3447 3448 } 3449 3450 @Override 3451 public Base addChild(String name) throws FHIRException { 3452 if (name.equals("reference")) { 3453 return addReference(); 3454 } 3455 else if (name.equals("role")) { 3456 this.role = new CodeableConcept(); 3457 return this.role; 3458 } 3459 else 3460 return super.addChild(name); 3461 } 3462 3463 public ContractPartyComponent copy() { 3464 ContractPartyComponent dst = new ContractPartyComponent(); 3465 copyValues(dst); 3466 if (reference != null) { 3467 dst.reference = new ArrayList<Reference>(); 3468 for (Reference i : reference) 3469 dst.reference.add(i.copy()); 3470 }; 3471 dst.role = role == null ? null : role.copy(); 3472 return dst; 3473 } 3474 3475 @Override 3476 public boolean equalsDeep(Base other_) { 3477 if (!super.equalsDeep(other_)) 3478 return false; 3479 if (!(other_ instanceof ContractPartyComponent)) 3480 return false; 3481 ContractPartyComponent o = (ContractPartyComponent) other_; 3482 return compareDeep(reference, o.reference, true) && compareDeep(role, o.role, true); 3483 } 3484 3485 @Override 3486 public boolean equalsShallow(Base other_) { 3487 if (!super.equalsShallow(other_)) 3488 return false; 3489 if (!(other_ instanceof ContractPartyComponent)) 3490 return false; 3491 ContractPartyComponent o = (ContractPartyComponent) other_; 3492 return true; 3493 } 3494 3495 public boolean isEmpty() { 3496 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(reference, role); 3497 } 3498 3499 public String fhirType() { 3500 return "Contract.term.offer.party"; 3501 3502 } 3503 3504 } 3505 3506 @Block() 3507 public static class AnswerComponent extends BackboneElement implements IBaseBackboneElement { 3508 /** 3509 * Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research. 3510 */ 3511 @Child(name = "value", type = {BooleanType.class, DecimalType.class, IntegerType.class, DateType.class, DateTimeType.class, TimeType.class, StringType.class, UriType.class, Attachment.class, Coding.class, Quantity.class, Reference.class}, order=1, min=1, max=1, modifier=false, summary=false) 3512 @Description(shortDefinition="The actual answer response", formalDefinition="Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research." ) 3513 protected Type value; 3514 3515 private static final long serialVersionUID = -732981989L; 3516 3517 /** 3518 * Constructor 3519 */ 3520 public AnswerComponent() { 3521 super(); 3522 } 3523 3524 /** 3525 * Constructor 3526 */ 3527 public AnswerComponent(Type value) { 3528 super(); 3529 this.value = value; 3530 } 3531 3532 /** 3533 * @return {@link #value} (Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.) 3534 */ 3535 public Type getValue() { 3536 return this.value; 3537 } 3538 3539 /** 3540 * @return {@link #value} (Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.) 3541 */ 3542 public BooleanType getValueBooleanType() throws FHIRException { 3543 if (this.value == null) 3544 return null; 3545 if (!(this.value instanceof BooleanType)) 3546 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 3547 return (BooleanType) this.value; 3548 } 3549 3550 public boolean hasValueBooleanType() { 3551 return this != null && this.value instanceof BooleanType; 3552 } 3553 3554 /** 3555 * @return {@link #value} (Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.) 3556 */ 3557 public DecimalType getValueDecimalType() throws FHIRException { 3558 if (this.value == null) 3559 return null; 3560 if (!(this.value instanceof DecimalType)) 3561 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered"); 3562 return (DecimalType) this.value; 3563 } 3564 3565 public boolean hasValueDecimalType() { 3566 return this != null && this.value instanceof DecimalType; 3567 } 3568 3569 /** 3570 * @return {@link #value} (Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.) 3571 */ 3572 public IntegerType getValueIntegerType() throws FHIRException { 3573 if (this.value == null) 3574 return null; 3575 if (!(this.value instanceof IntegerType)) 3576 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); 3577 return (IntegerType) this.value; 3578 } 3579 3580 public boolean hasValueIntegerType() { 3581 return this != null && this.value instanceof IntegerType; 3582 } 3583 3584 /** 3585 * @return {@link #value} (Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.) 3586 */ 3587 public DateType getValueDateType() throws FHIRException { 3588 if (this.value == null) 3589 return null; 3590 if (!(this.value instanceof DateType)) 3591 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered"); 3592 return (DateType) this.value; 3593 } 3594 3595 public boolean hasValueDateType() { 3596 return this != null && this.value instanceof DateType; 3597 } 3598 3599 /** 3600 * @return {@link #value} (Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.) 3601 */ 3602 public DateTimeType getValueDateTimeType() throws FHIRException { 3603 if (this.value == null) 3604 return null; 3605 if (!(this.value instanceof DateTimeType)) 3606 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 3607 return (DateTimeType) this.value; 3608 } 3609 3610 public boolean hasValueDateTimeType() { 3611 return this != null && this.value instanceof DateTimeType; 3612 } 3613 3614 /** 3615 * @return {@link #value} (Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.) 3616 */ 3617 public TimeType getValueTimeType() throws FHIRException { 3618 if (this.value == null) 3619 return null; 3620 if (!(this.value instanceof TimeType)) 3621 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 3622 return (TimeType) this.value; 3623 } 3624 3625 public boolean hasValueTimeType() { 3626 return this != null && this.value instanceof TimeType; 3627 } 3628 3629 /** 3630 * @return {@link #value} (Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.) 3631 */ 3632 public StringType getValueStringType() throws FHIRException { 3633 if (this.value == null) 3634 return null; 3635 if (!(this.value instanceof StringType)) 3636 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); 3637 return (StringType) this.value; 3638 } 3639 3640 public boolean hasValueStringType() { 3641 return this != null && this.value instanceof StringType; 3642 } 3643 3644 /** 3645 * @return {@link #value} (Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.) 3646 */ 3647 public UriType getValueUriType() throws FHIRException { 3648 if (this.value == null) 3649 return null; 3650 if (!(this.value instanceof UriType)) 3651 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered"); 3652 return (UriType) this.value; 3653 } 3654 3655 public boolean hasValueUriType() { 3656 return this != null && this.value instanceof UriType; 3657 } 3658 3659 /** 3660 * @return {@link #value} (Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.) 3661 */ 3662 public Attachment getValueAttachment() throws FHIRException { 3663 if (this.value == null) 3664 return null; 3665 if (!(this.value instanceof Attachment)) 3666 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered"); 3667 return (Attachment) this.value; 3668 } 3669 3670 public boolean hasValueAttachment() { 3671 return this != null && this.value instanceof Attachment; 3672 } 3673 3674 /** 3675 * @return {@link #value} (Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.) 3676 */ 3677 public Coding getValueCoding() throws FHIRException { 3678 if (this.value == null) 3679 return null; 3680 if (!(this.value instanceof Coding)) 3681 throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered"); 3682 return (Coding) this.value; 3683 } 3684 3685 public boolean hasValueCoding() { 3686 return this != null && this.value instanceof Coding; 3687 } 3688 3689 /** 3690 * @return {@link #value} (Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.) 3691 */ 3692 public Quantity getValueQuantity() throws FHIRException { 3693 if (this.value == null) 3694 return null; 3695 if (!(this.value instanceof Quantity)) 3696 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 3697 return (Quantity) this.value; 3698 } 3699 3700 public boolean hasValueQuantity() { 3701 return this != null && this.value instanceof Quantity; 3702 } 3703 3704 /** 3705 * @return {@link #value} (Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.) 3706 */ 3707 public Reference getValueReference() throws FHIRException { 3708 if (this.value == null) 3709 return null; 3710 if (!(this.value instanceof Reference)) 3711 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered"); 3712 return (Reference) this.value; 3713 } 3714 3715 public boolean hasValueReference() { 3716 return this != null && this.value instanceof Reference; 3717 } 3718 3719 public boolean hasValue() { 3720 return this.value != null && !this.value.isEmpty(); 3721 } 3722 3723 /** 3724 * @param value {@link #value} (Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.) 3725 */ 3726 public AnswerComponent setValue(Type value) { 3727 if (value != null && !(value instanceof BooleanType || value instanceof DecimalType || value instanceof IntegerType || value instanceof DateType || value instanceof DateTimeType || value instanceof TimeType || value instanceof StringType || value instanceof UriType || value instanceof Attachment || value instanceof Coding || value instanceof Quantity || value instanceof Reference)) 3728 throw new Error("Not the right type for Contract.term.offer.answer.value[x]: "+value.fhirType()); 3729 this.value = value; 3730 return this; 3731 } 3732 3733 protected void listChildren(List<Property> children) { 3734 super.listChildren(children); 3735 children.add(new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", 0, 1, value)); 3736 } 3737 3738 @Override 3739 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3740 switch (_hash) { 3741 case -1410166417: /*value[x]*/ return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", 0, 1, value); 3742 case 111972721: /*value*/ return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", 0, 1, value); 3743 case 733421943: /*valueBoolean*/ return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", 0, 1, value); 3744 case -2083993440: /*valueDecimal*/ return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", 0, 1, value); 3745 case -1668204915: /*valueInteger*/ return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", 0, 1, value); 3746 case -766192449: /*valueDate*/ return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", 0, 1, value); 3747 case 1047929900: /*valueDateTime*/ return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", 0, 1, value); 3748 case -765708322: /*valueTime*/ return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", 0, 1, value); 3749 case -1424603934: /*valueString*/ return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", 0, 1, value); 3750 case -1410172357: /*valueUri*/ return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", 0, 1, value); 3751 case -475566732: /*valueAttachment*/ return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", 0, 1, value); 3752 case -1887705029: /*valueCoding*/ return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", 0, 1, value); 3753 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", 0, 1, value); 3754 case 1755241690: /*valueReference*/ return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.", 0, 1, value); 3755 default: return super.getNamedProperty(_hash, _name, _checkValid); 3756 } 3757 3758 } 3759 3760 @Override 3761 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3762 switch (hash) { 3763 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type 3764 default: return super.getProperty(hash, name, checkValid); 3765 } 3766 3767 } 3768 3769 @Override 3770 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3771 switch (hash) { 3772 case 111972721: // value 3773 this.value = castToType(value); // Type 3774 return value; 3775 default: return super.setProperty(hash, name, value); 3776 } 3777 3778 } 3779 3780 @Override 3781 public Base setProperty(String name, Base value) throws FHIRException { 3782 if (name.equals("value[x]")) { 3783 this.value = castToType(value); // Type 3784 } else 3785 return super.setProperty(name, value); 3786 return value; 3787 } 3788 3789 @Override 3790 public Base makeProperty(int hash, String name) throws FHIRException { 3791 switch (hash) { 3792 case -1410166417: return getValue(); 3793 case 111972721: return getValue(); 3794 default: return super.makeProperty(hash, name); 3795 } 3796 3797 } 3798 3799 @Override 3800 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3801 switch (hash) { 3802 case 111972721: /*value*/ return new String[] {"boolean", "decimal", "integer", "date", "dateTime", "time", "string", "uri", "Attachment", "Coding", "Quantity", "Reference"}; 3803 default: return super.getTypesForProperty(hash, name); 3804 } 3805 3806 } 3807 3808 @Override 3809 public Base addChild(String name) throws FHIRException { 3810 if (name.equals("valueBoolean")) { 3811 this.value = new BooleanType(); 3812 return this.value; 3813 } 3814 else if (name.equals("valueDecimal")) { 3815 this.value = new DecimalType(); 3816 return this.value; 3817 } 3818 else if (name.equals("valueInteger")) { 3819 this.value = new IntegerType(); 3820 return this.value; 3821 } 3822 else if (name.equals("valueDate")) { 3823 this.value = new DateType(); 3824 return this.value; 3825 } 3826 else if (name.equals("valueDateTime")) { 3827 this.value = new DateTimeType(); 3828 return this.value; 3829 } 3830 else if (name.equals("valueTime")) { 3831 this.value = new TimeType(); 3832 return this.value; 3833 } 3834 else if (name.equals("valueString")) { 3835 this.value = new StringType(); 3836 return this.value; 3837 } 3838 else if (name.equals("valueUri")) { 3839 this.value = new UriType(); 3840 return this.value; 3841 } 3842 else if (name.equals("valueAttachment")) { 3843 this.value = new Attachment(); 3844 return this.value; 3845 } 3846 else if (name.equals("valueCoding")) { 3847 this.value = new Coding(); 3848 return this.value; 3849 } 3850 else if (name.equals("valueQuantity")) { 3851 this.value = new Quantity(); 3852 return this.value; 3853 } 3854 else if (name.equals("valueReference")) { 3855 this.value = new Reference(); 3856 return this.value; 3857 } 3858 else 3859 return super.addChild(name); 3860 } 3861 3862 public AnswerComponent copy() { 3863 AnswerComponent dst = new AnswerComponent(); 3864 copyValues(dst); 3865 dst.value = value == null ? null : value.copy(); 3866 return dst; 3867 } 3868 3869 @Override 3870 public boolean equalsDeep(Base other_) { 3871 if (!super.equalsDeep(other_)) 3872 return false; 3873 if (!(other_ instanceof AnswerComponent)) 3874 return false; 3875 AnswerComponent o = (AnswerComponent) other_; 3876 return compareDeep(value, o.value, true); 3877 } 3878 3879 @Override 3880 public boolean equalsShallow(Base other_) { 3881 if (!super.equalsShallow(other_)) 3882 return false; 3883 if (!(other_ instanceof AnswerComponent)) 3884 return false; 3885 AnswerComponent o = (AnswerComponent) other_; 3886 return true; 3887 } 3888 3889 public boolean isEmpty() { 3890 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(value); 3891 } 3892 3893 public String fhirType() { 3894 return "Contract.term.offer.answer"; 3895 3896 } 3897 3898 } 3899 3900 @Block() 3901 public static class ContractAssetComponent extends BackboneElement implements IBaseBackboneElement { 3902 /** 3903 * Differentiates the kind of the asset . 3904 */ 3905 @Child(name = "scope", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 3906 @Description(shortDefinition="Range of asset", formalDefinition="Differentiates the kind of the asset ." ) 3907 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-assetscope") 3908 protected CodeableConcept scope; 3909 3910 /** 3911 * Target entity type about which the term may be concerned. 3912 */ 3913 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3914 @Description(shortDefinition="Asset category", formalDefinition="Target entity type about which the term may be concerned." ) 3915 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-assettype") 3916 protected List<CodeableConcept> type; 3917 3918 /** 3919 * Associated entities. 3920 */ 3921 @Child(name = "typeReference", type = {Reference.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3922 @Description(shortDefinition="Associated entities", formalDefinition="Associated entities." ) 3923 protected List<Reference> typeReference; 3924 /** 3925 * The actual objects that are the target of the reference (Associated entities.) 3926 */ 3927 protected List<Resource> typeReferenceTarget; 3928 3929 3930 /** 3931 * May be a subtype or part of an offered asset. 3932 */ 3933 @Child(name = "subtype", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3934 @Description(shortDefinition="Asset sub-category", formalDefinition="May be a subtype or part of an offered asset." ) 3935 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-assetsubtype") 3936 protected List<CodeableConcept> subtype; 3937 3938 /** 3939 * Specifies the applicability of the term to an asset resource instance, and instances it refers to orinstances that refer to it, and/or are owned by the offeree. 3940 */ 3941 @Child(name = "relationship", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=false) 3942 @Description(shortDefinition="Kinship of the asset", formalDefinition="Specifies the applicability of the term to an asset resource instance, and instances it refers to orinstances that refer to it, and/or are owned by the offeree." ) 3943 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/consent-content-class") 3944 protected Coding relationship; 3945 3946 /** 3947 * Circumstance of the asset. 3948 */ 3949 @Child(name = "context", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3950 @Description(shortDefinition="Circumstance of the asset", formalDefinition="Circumstance of the asset." ) 3951 protected List<AssetContextComponent> context; 3952 3953 /** 3954 * Description of the quality and completeness of the asset that imay be a factor in its valuation. 3955 */ 3956 @Child(name = "condition", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) 3957 @Description(shortDefinition="Quality desctiption of asset", formalDefinition="Description of the quality and completeness of the asset that imay be a factor in its valuation." ) 3958 protected StringType condition; 3959 3960 /** 3961 * Type of Asset availability for use or ownership. 3962 */ 3963 @Child(name = "periodType", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3964 @Description(shortDefinition="Asset availability types", formalDefinition="Type of Asset availability for use or ownership." ) 3965 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/asset-availability") 3966 protected List<CodeableConcept> periodType; 3967 3968 /** 3969 * Asset relevant contractual time period. 3970 */ 3971 @Child(name = "period", type = {Period.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3972 @Description(shortDefinition="Time period of the asset", formalDefinition="Asset relevant contractual time period." ) 3973 protected List<Period> period; 3974 3975 /** 3976 * Time period of asset use. 3977 */ 3978 @Child(name = "usePeriod", type = {Period.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3979 @Description(shortDefinition="Time period", formalDefinition="Time period of asset use." ) 3980 protected List<Period> usePeriod; 3981 3982 /** 3983 * Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract. 3984 */ 3985 @Child(name = "text", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) 3986 @Description(shortDefinition="Asset clause or question text", formalDefinition="Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract." ) 3987 protected StringType text; 3988 3989 /** 3990 * Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse. 3991 */ 3992 @Child(name = "linkId", type = {StringType.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3993 @Description(shortDefinition="Pointer to asset text", formalDefinition="Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse." ) 3994 protected List<StringType> linkId; 3995 3996 /** 3997 * Response to assets. 3998 */ 3999 @Child(name = "answer", type = {AnswerComponent.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4000 @Description(shortDefinition="Response to assets", formalDefinition="Response to assets." ) 4001 protected List<AnswerComponent> answer; 4002 4003 /** 4004 * Security labels that protects the asset. 4005 */ 4006 @Child(name = "securityLabelNumber", type = {UnsignedIntType.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4007 @Description(shortDefinition="Asset restriction numbers", formalDefinition="Security labels that protects the asset." ) 4008 protected List<UnsignedIntType> securityLabelNumber; 4009 4010 /** 4011 * Contract Valued Item List. 4012 */ 4013 @Child(name = "valuedItem", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4014 @Description(shortDefinition="Contract Valued Item List", formalDefinition="Contract Valued Item List." ) 4015 protected List<ValuedItemComponent> valuedItem; 4016 4017 private static final long serialVersionUID = -1080398792L; 4018 4019 /** 4020 * Constructor 4021 */ 4022 public ContractAssetComponent() { 4023 super(); 4024 } 4025 4026 /** 4027 * @return {@link #scope} (Differentiates the kind of the asset .) 4028 */ 4029 public CodeableConcept getScope() { 4030 if (this.scope == null) 4031 if (Configuration.errorOnAutoCreate()) 4032 throw new Error("Attempt to auto-create ContractAssetComponent.scope"); 4033 else if (Configuration.doAutoCreate()) 4034 this.scope = new CodeableConcept(); // cc 4035 return this.scope; 4036 } 4037 4038 public boolean hasScope() { 4039 return this.scope != null && !this.scope.isEmpty(); 4040 } 4041 4042 /** 4043 * @param value {@link #scope} (Differentiates the kind of the asset .) 4044 */ 4045 public ContractAssetComponent setScope(CodeableConcept value) { 4046 this.scope = value; 4047 return this; 4048 } 4049 4050 /** 4051 * @return {@link #type} (Target entity type about which the term may be concerned.) 4052 */ 4053 public List<CodeableConcept> getType() { 4054 if (this.type == null) 4055 this.type = new ArrayList<CodeableConcept>(); 4056 return this.type; 4057 } 4058 4059 /** 4060 * @return Returns a reference to <code>this</code> for easy method chaining 4061 */ 4062 public ContractAssetComponent setType(List<CodeableConcept> theType) { 4063 this.type = theType; 4064 return this; 4065 } 4066 4067 public boolean hasType() { 4068 if (this.type == null) 4069 return false; 4070 for (CodeableConcept item : this.type) 4071 if (!item.isEmpty()) 4072 return true; 4073 return false; 4074 } 4075 4076 public CodeableConcept addType() { //3 4077 CodeableConcept t = new CodeableConcept(); 4078 if (this.type == null) 4079 this.type = new ArrayList<CodeableConcept>(); 4080 this.type.add(t); 4081 return t; 4082 } 4083 4084 public ContractAssetComponent addType(CodeableConcept t) { //3 4085 if (t == null) 4086 return this; 4087 if (this.type == null) 4088 this.type = new ArrayList<CodeableConcept>(); 4089 this.type.add(t); 4090 return this; 4091 } 4092 4093 /** 4094 * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist 4095 */ 4096 public CodeableConcept getTypeFirstRep() { 4097 if (getType().isEmpty()) { 4098 addType(); 4099 } 4100 return getType().get(0); 4101 } 4102 4103 /** 4104 * @return {@link #typeReference} (Associated entities.) 4105 */ 4106 public List<Reference> getTypeReference() { 4107 if (this.typeReference == null) 4108 this.typeReference = new ArrayList<Reference>(); 4109 return this.typeReference; 4110 } 4111 4112 /** 4113 * @return Returns a reference to <code>this</code> for easy method chaining 4114 */ 4115 public ContractAssetComponent setTypeReference(List<Reference> theTypeReference) { 4116 this.typeReference = theTypeReference; 4117 return this; 4118 } 4119 4120 public boolean hasTypeReference() { 4121 if (this.typeReference == null) 4122 return false; 4123 for (Reference item : this.typeReference) 4124 if (!item.isEmpty()) 4125 return true; 4126 return false; 4127 } 4128 4129 public Reference addTypeReference() { //3 4130 Reference t = new Reference(); 4131 if (this.typeReference == null) 4132 this.typeReference = new ArrayList<Reference>(); 4133 this.typeReference.add(t); 4134 return t; 4135 } 4136 4137 public ContractAssetComponent addTypeReference(Reference t) { //3 4138 if (t == null) 4139 return this; 4140 if (this.typeReference == null) 4141 this.typeReference = new ArrayList<Reference>(); 4142 this.typeReference.add(t); 4143 return this; 4144 } 4145 4146 /** 4147 * @return The first repetition of repeating field {@link #typeReference}, creating it if it does not already exist 4148 */ 4149 public Reference getTypeReferenceFirstRep() { 4150 if (getTypeReference().isEmpty()) { 4151 addTypeReference(); 4152 } 4153 return getTypeReference().get(0); 4154 } 4155 4156 /** 4157 * @deprecated Use Reference#setResource(IBaseResource) instead 4158 */ 4159 @Deprecated 4160 public List<Resource> getTypeReferenceTarget() { 4161 if (this.typeReferenceTarget == null) 4162 this.typeReferenceTarget = new ArrayList<Resource>(); 4163 return this.typeReferenceTarget; 4164 } 4165 4166 /** 4167 * @return {@link #subtype} (May be a subtype or part of an offered asset.) 4168 */ 4169 public List<CodeableConcept> getSubtype() { 4170 if (this.subtype == null) 4171 this.subtype = new ArrayList<CodeableConcept>(); 4172 return this.subtype; 4173 } 4174 4175 /** 4176 * @return Returns a reference to <code>this</code> for easy method chaining 4177 */ 4178 public ContractAssetComponent setSubtype(List<CodeableConcept> theSubtype) { 4179 this.subtype = theSubtype; 4180 return this; 4181 } 4182 4183 public boolean hasSubtype() { 4184 if (this.subtype == null) 4185 return false; 4186 for (CodeableConcept item : this.subtype) 4187 if (!item.isEmpty()) 4188 return true; 4189 return false; 4190 } 4191 4192 public CodeableConcept addSubtype() { //3 4193 CodeableConcept t = new CodeableConcept(); 4194 if (this.subtype == null) 4195 this.subtype = new ArrayList<CodeableConcept>(); 4196 this.subtype.add(t); 4197 return t; 4198 } 4199 4200 public ContractAssetComponent addSubtype(CodeableConcept t) { //3 4201 if (t == null) 4202 return this; 4203 if (this.subtype == null) 4204 this.subtype = new ArrayList<CodeableConcept>(); 4205 this.subtype.add(t); 4206 return this; 4207 } 4208 4209 /** 4210 * @return The first repetition of repeating field {@link #subtype}, creating it if it does not already exist 4211 */ 4212 public CodeableConcept getSubtypeFirstRep() { 4213 if (getSubtype().isEmpty()) { 4214 addSubtype(); 4215 } 4216 return getSubtype().get(0); 4217 } 4218 4219 /** 4220 * @return {@link #relationship} (Specifies the applicability of the term to an asset resource instance, and instances it refers to orinstances that refer to it, and/or are owned by the offeree.) 4221 */ 4222 public Coding getRelationship() { 4223 if (this.relationship == null) 4224 if (Configuration.errorOnAutoCreate()) 4225 throw new Error("Attempt to auto-create ContractAssetComponent.relationship"); 4226 else if (Configuration.doAutoCreate()) 4227 this.relationship = new Coding(); // cc 4228 return this.relationship; 4229 } 4230 4231 public boolean hasRelationship() { 4232 return this.relationship != null && !this.relationship.isEmpty(); 4233 } 4234 4235 /** 4236 * @param value {@link #relationship} (Specifies the applicability of the term to an asset resource instance, and instances it refers to orinstances that refer to it, and/or are owned by the offeree.) 4237 */ 4238 public ContractAssetComponent setRelationship(Coding value) { 4239 this.relationship = value; 4240 return this; 4241 } 4242 4243 /** 4244 * @return {@link #context} (Circumstance of the asset.) 4245 */ 4246 public List<AssetContextComponent> getContext() { 4247 if (this.context == null) 4248 this.context = new ArrayList<AssetContextComponent>(); 4249 return this.context; 4250 } 4251 4252 /** 4253 * @return Returns a reference to <code>this</code> for easy method chaining 4254 */ 4255 public ContractAssetComponent setContext(List<AssetContextComponent> theContext) { 4256 this.context = theContext; 4257 return this; 4258 } 4259 4260 public boolean hasContext() { 4261 if (this.context == null) 4262 return false; 4263 for (AssetContextComponent item : this.context) 4264 if (!item.isEmpty()) 4265 return true; 4266 return false; 4267 } 4268 4269 public AssetContextComponent addContext() { //3 4270 AssetContextComponent t = new AssetContextComponent(); 4271 if (this.context == null) 4272 this.context = new ArrayList<AssetContextComponent>(); 4273 this.context.add(t); 4274 return t; 4275 } 4276 4277 public ContractAssetComponent addContext(AssetContextComponent t) { //3 4278 if (t == null) 4279 return this; 4280 if (this.context == null) 4281 this.context = new ArrayList<AssetContextComponent>(); 4282 this.context.add(t); 4283 return this; 4284 } 4285 4286 /** 4287 * @return The first repetition of repeating field {@link #context}, creating it if it does not already exist 4288 */ 4289 public AssetContextComponent getContextFirstRep() { 4290 if (getContext().isEmpty()) { 4291 addContext(); 4292 } 4293 return getContext().get(0); 4294 } 4295 4296 /** 4297 * @return {@link #condition} (Description of the quality and completeness of the asset that imay be a factor in its valuation.). This is the underlying object with id, value and extensions. The accessor "getCondition" gives direct access to the value 4298 */ 4299 public StringType getConditionElement() { 4300 if (this.condition == null) 4301 if (Configuration.errorOnAutoCreate()) 4302 throw new Error("Attempt to auto-create ContractAssetComponent.condition"); 4303 else if (Configuration.doAutoCreate()) 4304 this.condition = new StringType(); // bb 4305 return this.condition; 4306 } 4307 4308 public boolean hasConditionElement() { 4309 return this.condition != null && !this.condition.isEmpty(); 4310 } 4311 4312 public boolean hasCondition() { 4313 return this.condition != null && !this.condition.isEmpty(); 4314 } 4315 4316 /** 4317 * @param value {@link #condition} (Description of the quality and completeness of the asset that imay be a factor in its valuation.). This is the underlying object with id, value and extensions. The accessor "getCondition" gives direct access to the value 4318 */ 4319 public ContractAssetComponent setConditionElement(StringType value) { 4320 this.condition = value; 4321 return this; 4322 } 4323 4324 /** 4325 * @return Description of the quality and completeness of the asset that imay be a factor in its valuation. 4326 */ 4327 public String getCondition() { 4328 return this.condition == null ? null : this.condition.getValue(); 4329 } 4330 4331 /** 4332 * @param value Description of the quality and completeness of the asset that imay be a factor in its valuation. 4333 */ 4334 public ContractAssetComponent setCondition(String value) { 4335 if (Utilities.noString(value)) 4336 this.condition = null; 4337 else { 4338 if (this.condition == null) 4339 this.condition = new StringType(); 4340 this.condition.setValue(value); 4341 } 4342 return this; 4343 } 4344 4345 /** 4346 * @return {@link #periodType} (Type of Asset availability for use or ownership.) 4347 */ 4348 public List<CodeableConcept> getPeriodType() { 4349 if (this.periodType == null) 4350 this.periodType = new ArrayList<CodeableConcept>(); 4351 return this.periodType; 4352 } 4353 4354 /** 4355 * @return Returns a reference to <code>this</code> for easy method chaining 4356 */ 4357 public ContractAssetComponent setPeriodType(List<CodeableConcept> thePeriodType) { 4358 this.periodType = thePeriodType; 4359 return this; 4360 } 4361 4362 public boolean hasPeriodType() { 4363 if (this.periodType == null) 4364 return false; 4365 for (CodeableConcept item : this.periodType) 4366 if (!item.isEmpty()) 4367 return true; 4368 return false; 4369 } 4370 4371 public CodeableConcept addPeriodType() { //3 4372 CodeableConcept t = new CodeableConcept(); 4373 if (this.periodType == null) 4374 this.periodType = new ArrayList<CodeableConcept>(); 4375 this.periodType.add(t); 4376 return t; 4377 } 4378 4379 public ContractAssetComponent addPeriodType(CodeableConcept t) { //3 4380 if (t == null) 4381 return this; 4382 if (this.periodType == null) 4383 this.periodType = new ArrayList<CodeableConcept>(); 4384 this.periodType.add(t); 4385 return this; 4386 } 4387 4388 /** 4389 * @return The first repetition of repeating field {@link #periodType}, creating it if it does not already exist 4390 */ 4391 public CodeableConcept getPeriodTypeFirstRep() { 4392 if (getPeriodType().isEmpty()) { 4393 addPeriodType(); 4394 } 4395 return getPeriodType().get(0); 4396 } 4397 4398 /** 4399 * @return {@link #period} (Asset relevant contractual time period.) 4400 */ 4401 public List<Period> getPeriod() { 4402 if (this.period == null) 4403 this.period = new ArrayList<Period>(); 4404 return this.period; 4405 } 4406 4407 /** 4408 * @return Returns a reference to <code>this</code> for easy method chaining 4409 */ 4410 public ContractAssetComponent setPeriod(List<Period> thePeriod) { 4411 this.period = thePeriod; 4412 return this; 4413 } 4414 4415 public boolean hasPeriod() { 4416 if (this.period == null) 4417 return false; 4418 for (Period item : this.period) 4419 if (!item.isEmpty()) 4420 return true; 4421 return false; 4422 } 4423 4424 public Period addPeriod() { //3 4425 Period t = new Period(); 4426 if (this.period == null) 4427 this.period = new ArrayList<Period>(); 4428 this.period.add(t); 4429 return t; 4430 } 4431 4432 public ContractAssetComponent addPeriod(Period t) { //3 4433 if (t == null) 4434 return this; 4435 if (this.period == null) 4436 this.period = new ArrayList<Period>(); 4437 this.period.add(t); 4438 return this; 4439 } 4440 4441 /** 4442 * @return The first repetition of repeating field {@link #period}, creating it if it does not already exist 4443 */ 4444 public Period getPeriodFirstRep() { 4445 if (getPeriod().isEmpty()) { 4446 addPeriod(); 4447 } 4448 return getPeriod().get(0); 4449 } 4450 4451 /** 4452 * @return {@link #usePeriod} (Time period of asset use.) 4453 */ 4454 public List<Period> getUsePeriod() { 4455 if (this.usePeriod == null) 4456 this.usePeriod = new ArrayList<Period>(); 4457 return this.usePeriod; 4458 } 4459 4460 /** 4461 * @return Returns a reference to <code>this</code> for easy method chaining 4462 */ 4463 public ContractAssetComponent setUsePeriod(List<Period> theUsePeriod) { 4464 this.usePeriod = theUsePeriod; 4465 return this; 4466 } 4467 4468 public boolean hasUsePeriod() { 4469 if (this.usePeriod == null) 4470 return false; 4471 for (Period item : this.usePeriod) 4472 if (!item.isEmpty()) 4473 return true; 4474 return false; 4475 } 4476 4477 public Period addUsePeriod() { //3 4478 Period t = new Period(); 4479 if (this.usePeriod == null) 4480 this.usePeriod = new ArrayList<Period>(); 4481 this.usePeriod.add(t); 4482 return t; 4483 } 4484 4485 public ContractAssetComponent addUsePeriod(Period t) { //3 4486 if (t == null) 4487 return this; 4488 if (this.usePeriod == null) 4489 this.usePeriod = new ArrayList<Period>(); 4490 this.usePeriod.add(t); 4491 return this; 4492 } 4493 4494 /** 4495 * @return The first repetition of repeating field {@link #usePeriod}, creating it if it does not already exist 4496 */ 4497 public Period getUsePeriodFirstRep() { 4498 if (getUsePeriod().isEmpty()) { 4499 addUsePeriod(); 4500 } 4501 return getUsePeriod().get(0); 4502 } 4503 4504 /** 4505 * @return {@link #text} (Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 4506 */ 4507 public StringType getTextElement() { 4508 if (this.text == null) 4509 if (Configuration.errorOnAutoCreate()) 4510 throw new Error("Attempt to auto-create ContractAssetComponent.text"); 4511 else if (Configuration.doAutoCreate()) 4512 this.text = new StringType(); // bb 4513 return this.text; 4514 } 4515 4516 public boolean hasTextElement() { 4517 return this.text != null && !this.text.isEmpty(); 4518 } 4519 4520 public boolean hasText() { 4521 return this.text != null && !this.text.isEmpty(); 4522 } 4523 4524 /** 4525 * @param value {@link #text} (Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 4526 */ 4527 public ContractAssetComponent setTextElement(StringType value) { 4528 this.text = value; 4529 return this; 4530 } 4531 4532 /** 4533 * @return Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract. 4534 */ 4535 public String getText() { 4536 return this.text == null ? null : this.text.getValue(); 4537 } 4538 4539 /** 4540 * @param value Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract. 4541 */ 4542 public ContractAssetComponent setText(String value) { 4543 if (Utilities.noString(value)) 4544 this.text = null; 4545 else { 4546 if (this.text == null) 4547 this.text = new StringType(); 4548 this.text.setValue(value); 4549 } 4550 return this; 4551 } 4552 4553 /** 4554 * @return {@link #linkId} (Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.) 4555 */ 4556 public List<StringType> getLinkId() { 4557 if (this.linkId == null) 4558 this.linkId = new ArrayList<StringType>(); 4559 return this.linkId; 4560 } 4561 4562 /** 4563 * @return Returns a reference to <code>this</code> for easy method chaining 4564 */ 4565 public ContractAssetComponent setLinkId(List<StringType> theLinkId) { 4566 this.linkId = theLinkId; 4567 return this; 4568 } 4569 4570 public boolean hasLinkId() { 4571 if (this.linkId == null) 4572 return false; 4573 for (StringType item : this.linkId) 4574 if (!item.isEmpty()) 4575 return true; 4576 return false; 4577 } 4578 4579 /** 4580 * @return {@link #linkId} (Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.) 4581 */ 4582 public StringType addLinkIdElement() {//2 4583 StringType t = new StringType(); 4584 if (this.linkId == null) 4585 this.linkId = new ArrayList<StringType>(); 4586 this.linkId.add(t); 4587 return t; 4588 } 4589 4590 /** 4591 * @param value {@link #linkId} (Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.) 4592 */ 4593 public ContractAssetComponent addLinkId(String value) { //1 4594 StringType t = new StringType(); 4595 t.setValue(value); 4596 if (this.linkId == null) 4597 this.linkId = new ArrayList<StringType>(); 4598 this.linkId.add(t); 4599 return this; 4600 } 4601 4602 /** 4603 * @param value {@link #linkId} (Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.) 4604 */ 4605 public boolean hasLinkId(String value) { 4606 if (this.linkId == null) 4607 return false; 4608 for (StringType v : this.linkId) 4609 if (v.getValue().equals(value)) // string 4610 return true; 4611 return false; 4612 } 4613 4614 /** 4615 * @return {@link #answer} (Response to assets.) 4616 */ 4617 public List<AnswerComponent> getAnswer() { 4618 if (this.answer == null) 4619 this.answer = new ArrayList<AnswerComponent>(); 4620 return this.answer; 4621 } 4622 4623 /** 4624 * @return Returns a reference to <code>this</code> for easy method chaining 4625 */ 4626 public ContractAssetComponent setAnswer(List<AnswerComponent> theAnswer) { 4627 this.answer = theAnswer; 4628 return this; 4629 } 4630 4631 public boolean hasAnswer() { 4632 if (this.answer == null) 4633 return false; 4634 for (AnswerComponent item : this.answer) 4635 if (!item.isEmpty()) 4636 return true; 4637 return false; 4638 } 4639 4640 public AnswerComponent addAnswer() { //3 4641 AnswerComponent t = new AnswerComponent(); 4642 if (this.answer == null) 4643 this.answer = new ArrayList<AnswerComponent>(); 4644 this.answer.add(t); 4645 return t; 4646 } 4647 4648 public ContractAssetComponent addAnswer(AnswerComponent t) { //3 4649 if (t == null) 4650 return this; 4651 if (this.answer == null) 4652 this.answer = new ArrayList<AnswerComponent>(); 4653 this.answer.add(t); 4654 return this; 4655 } 4656 4657 /** 4658 * @return The first repetition of repeating field {@link #answer}, creating it if it does not already exist 4659 */ 4660 public AnswerComponent getAnswerFirstRep() { 4661 if (getAnswer().isEmpty()) { 4662 addAnswer(); 4663 } 4664 return getAnswer().get(0); 4665 } 4666 4667 /** 4668 * @return {@link #securityLabelNumber} (Security labels that protects the asset.) 4669 */ 4670 public List<UnsignedIntType> getSecurityLabelNumber() { 4671 if (this.securityLabelNumber == null) 4672 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 4673 return this.securityLabelNumber; 4674 } 4675 4676 /** 4677 * @return Returns a reference to <code>this</code> for easy method chaining 4678 */ 4679 public ContractAssetComponent setSecurityLabelNumber(List<UnsignedIntType> theSecurityLabelNumber) { 4680 this.securityLabelNumber = theSecurityLabelNumber; 4681 return this; 4682 } 4683 4684 public boolean hasSecurityLabelNumber() { 4685 if (this.securityLabelNumber == null) 4686 return false; 4687 for (UnsignedIntType item : this.securityLabelNumber) 4688 if (!item.isEmpty()) 4689 return true; 4690 return false; 4691 } 4692 4693 /** 4694 * @return {@link #securityLabelNumber} (Security labels that protects the asset.) 4695 */ 4696 public UnsignedIntType addSecurityLabelNumberElement() {//2 4697 UnsignedIntType t = new UnsignedIntType(); 4698 if (this.securityLabelNumber == null) 4699 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 4700 this.securityLabelNumber.add(t); 4701 return t; 4702 } 4703 4704 /** 4705 * @param value {@link #securityLabelNumber} (Security labels that protects the asset.) 4706 */ 4707 public ContractAssetComponent addSecurityLabelNumber(int value) { //1 4708 UnsignedIntType t = new UnsignedIntType(); 4709 t.setValue(value); 4710 if (this.securityLabelNumber == null) 4711 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 4712 this.securityLabelNumber.add(t); 4713 return this; 4714 } 4715 4716 /** 4717 * @param value {@link #securityLabelNumber} (Security labels that protects the asset.) 4718 */ 4719 public boolean hasSecurityLabelNumber(int value) { 4720 if (this.securityLabelNumber == null) 4721 return false; 4722 for (UnsignedIntType v : this.securityLabelNumber) 4723 if (v.getValue().equals(value)) // unsignedInt 4724 return true; 4725 return false; 4726 } 4727 4728 /** 4729 * @return {@link #valuedItem} (Contract Valued Item List.) 4730 */ 4731 public List<ValuedItemComponent> getValuedItem() { 4732 if (this.valuedItem == null) 4733 this.valuedItem = new ArrayList<ValuedItemComponent>(); 4734 return this.valuedItem; 4735 } 4736 4737 /** 4738 * @return Returns a reference to <code>this</code> for easy method chaining 4739 */ 4740 public ContractAssetComponent setValuedItem(List<ValuedItemComponent> theValuedItem) { 4741 this.valuedItem = theValuedItem; 4742 return this; 4743 } 4744 4745 public boolean hasValuedItem() { 4746 if (this.valuedItem == null) 4747 return false; 4748 for (ValuedItemComponent item : this.valuedItem) 4749 if (!item.isEmpty()) 4750 return true; 4751 return false; 4752 } 4753 4754 public ValuedItemComponent addValuedItem() { //3 4755 ValuedItemComponent t = new ValuedItemComponent(); 4756 if (this.valuedItem == null) 4757 this.valuedItem = new ArrayList<ValuedItemComponent>(); 4758 this.valuedItem.add(t); 4759 return t; 4760 } 4761 4762 public ContractAssetComponent addValuedItem(ValuedItemComponent t) { //3 4763 if (t == null) 4764 return this; 4765 if (this.valuedItem == null) 4766 this.valuedItem = new ArrayList<ValuedItemComponent>(); 4767 this.valuedItem.add(t); 4768 return this; 4769 } 4770 4771 /** 4772 * @return The first repetition of repeating field {@link #valuedItem}, creating it if it does not already exist 4773 */ 4774 public ValuedItemComponent getValuedItemFirstRep() { 4775 if (getValuedItem().isEmpty()) { 4776 addValuedItem(); 4777 } 4778 return getValuedItem().get(0); 4779 } 4780 4781 protected void listChildren(List<Property> children) { 4782 super.listChildren(children); 4783 children.add(new Property("scope", "CodeableConcept", "Differentiates the kind of the asset .", 0, 1, scope)); 4784 children.add(new Property("type", "CodeableConcept", "Target entity type about which the term may be concerned.", 0, java.lang.Integer.MAX_VALUE, type)); 4785 children.add(new Property("typeReference", "Reference(Any)", "Associated entities.", 0, java.lang.Integer.MAX_VALUE, typeReference)); 4786 children.add(new Property("subtype", "CodeableConcept", "May be a subtype or part of an offered asset.", 0, java.lang.Integer.MAX_VALUE, subtype)); 4787 children.add(new Property("relationship", "Coding", "Specifies the applicability of the term to an asset resource instance, and instances it refers to orinstances that refer to it, and/or are owned by the offeree.", 0, 1, relationship)); 4788 children.add(new Property("context", "", "Circumstance of the asset.", 0, java.lang.Integer.MAX_VALUE, context)); 4789 children.add(new Property("condition", "string", "Description of the quality and completeness of the asset that imay be a factor in its valuation.", 0, 1, condition)); 4790 children.add(new Property("periodType", "CodeableConcept", "Type of Asset availability for use or ownership.", 0, java.lang.Integer.MAX_VALUE, periodType)); 4791 children.add(new Property("period", "Period", "Asset relevant contractual time period.", 0, java.lang.Integer.MAX_VALUE, period)); 4792 children.add(new Property("usePeriod", "Period", "Time period of asset use.", 0, java.lang.Integer.MAX_VALUE, usePeriod)); 4793 children.add(new Property("text", "string", "Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract.", 0, 1, text)); 4794 children.add(new Property("linkId", "string", "Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, linkId)); 4795 children.add(new Property("answer", "@Contract.term.offer.answer", "Response to assets.", 0, java.lang.Integer.MAX_VALUE, answer)); 4796 children.add(new Property("securityLabelNumber", "unsignedInt", "Security labels that protects the asset.", 0, java.lang.Integer.MAX_VALUE, securityLabelNumber)); 4797 children.add(new Property("valuedItem", "", "Contract Valued Item List.", 0, java.lang.Integer.MAX_VALUE, valuedItem)); 4798 } 4799 4800 @Override 4801 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4802 switch (_hash) { 4803 case 109264468: /*scope*/ return new Property("scope", "CodeableConcept", "Differentiates the kind of the asset .", 0, 1, scope); 4804 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Target entity type about which the term may be concerned.", 0, java.lang.Integer.MAX_VALUE, type); 4805 case 2074825009: /*typeReference*/ return new Property("typeReference", "Reference(Any)", "Associated entities.", 0, java.lang.Integer.MAX_VALUE, typeReference); 4806 case -1867567750: /*subtype*/ return new Property("subtype", "CodeableConcept", "May be a subtype or part of an offered asset.", 0, java.lang.Integer.MAX_VALUE, subtype); 4807 case -261851592: /*relationship*/ return new Property("relationship", "Coding", "Specifies the applicability of the term to an asset resource instance, and instances it refers to orinstances that refer to it, and/or are owned by the offeree.", 0, 1, relationship); 4808 case 951530927: /*context*/ return new Property("context", "", "Circumstance of the asset.", 0, java.lang.Integer.MAX_VALUE, context); 4809 case -861311717: /*condition*/ return new Property("condition", "string", "Description of the quality and completeness of the asset that imay be a factor in its valuation.", 0, 1, condition); 4810 case 384348315: /*periodType*/ return new Property("periodType", "CodeableConcept", "Type of Asset availability for use or ownership.", 0, java.lang.Integer.MAX_VALUE, periodType); 4811 case -991726143: /*period*/ return new Property("period", "Period", "Asset relevant contractual time period.", 0, java.lang.Integer.MAX_VALUE, period); 4812 case -628382168: /*usePeriod*/ return new Property("usePeriod", "Period", "Time period of asset use.", 0, java.lang.Integer.MAX_VALUE, usePeriod); 4813 case 3556653: /*text*/ return new Property("text", "string", "Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract.", 0, 1, text); 4814 case -1102667083: /*linkId*/ return new Property("linkId", "string", "Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, linkId); 4815 case -1412808770: /*answer*/ return new Property("answer", "@Contract.term.offer.answer", "Response to assets.", 0, java.lang.Integer.MAX_VALUE, answer); 4816 case -149460995: /*securityLabelNumber*/ return new Property("securityLabelNumber", "unsignedInt", "Security labels that protects the asset.", 0, java.lang.Integer.MAX_VALUE, securityLabelNumber); 4817 case 2046675654: /*valuedItem*/ return new Property("valuedItem", "", "Contract Valued Item List.", 0, java.lang.Integer.MAX_VALUE, valuedItem); 4818 default: return super.getNamedProperty(_hash, _name, _checkValid); 4819 } 4820 4821 } 4822 4823 @Override 4824 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4825 switch (hash) { 4826 case 109264468: /*scope*/ return this.scope == null ? new Base[0] : new Base[] {this.scope}; // CodeableConcept 4827 case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept 4828 case 2074825009: /*typeReference*/ return this.typeReference == null ? new Base[0] : this.typeReference.toArray(new Base[this.typeReference.size()]); // Reference 4829 case -1867567750: /*subtype*/ return this.subtype == null ? new Base[0] : this.subtype.toArray(new Base[this.subtype.size()]); // CodeableConcept 4830 case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // Coding 4831 case 951530927: /*context*/ return this.context == null ? new Base[0] : this.context.toArray(new Base[this.context.size()]); // AssetContextComponent 4832 case -861311717: /*condition*/ return this.condition == null ? new Base[0] : new Base[] {this.condition}; // StringType 4833 case 384348315: /*periodType*/ return this.periodType == null ? new Base[0] : this.periodType.toArray(new Base[this.periodType.size()]); // CodeableConcept 4834 case -991726143: /*period*/ return this.period == null ? new Base[0] : this.period.toArray(new Base[this.period.size()]); // Period 4835 case -628382168: /*usePeriod*/ return this.usePeriod == null ? new Base[0] : this.usePeriod.toArray(new Base[this.usePeriod.size()]); // Period 4836 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 4837 case -1102667083: /*linkId*/ return this.linkId == null ? new Base[0] : this.linkId.toArray(new Base[this.linkId.size()]); // StringType 4838 case -1412808770: /*answer*/ return this.answer == null ? new Base[0] : this.answer.toArray(new Base[this.answer.size()]); // AnswerComponent 4839 case -149460995: /*securityLabelNumber*/ return this.securityLabelNumber == null ? new Base[0] : this.securityLabelNumber.toArray(new Base[this.securityLabelNumber.size()]); // UnsignedIntType 4840 case 2046675654: /*valuedItem*/ return this.valuedItem == null ? new Base[0] : this.valuedItem.toArray(new Base[this.valuedItem.size()]); // ValuedItemComponent 4841 default: return super.getProperty(hash, name, checkValid); 4842 } 4843 4844 } 4845 4846 @Override 4847 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4848 switch (hash) { 4849 case 109264468: // scope 4850 this.scope = castToCodeableConcept(value); // CodeableConcept 4851 return value; 4852 case 3575610: // type 4853 this.getType().add(castToCodeableConcept(value)); // CodeableConcept 4854 return value; 4855 case 2074825009: // typeReference 4856 this.getTypeReference().add(castToReference(value)); // Reference 4857 return value; 4858 case -1867567750: // subtype 4859 this.getSubtype().add(castToCodeableConcept(value)); // CodeableConcept 4860 return value; 4861 case -261851592: // relationship 4862 this.relationship = castToCoding(value); // Coding 4863 return value; 4864 case 951530927: // context 4865 this.getContext().add((AssetContextComponent) value); // AssetContextComponent 4866 return value; 4867 case -861311717: // condition 4868 this.condition = castToString(value); // StringType 4869 return value; 4870 case 384348315: // periodType 4871 this.getPeriodType().add(castToCodeableConcept(value)); // CodeableConcept 4872 return value; 4873 case -991726143: // period 4874 this.getPeriod().add(castToPeriod(value)); // Period 4875 return value; 4876 case -628382168: // usePeriod 4877 this.getUsePeriod().add(castToPeriod(value)); // Period 4878 return value; 4879 case 3556653: // text 4880 this.text = castToString(value); // StringType 4881 return value; 4882 case -1102667083: // linkId 4883 this.getLinkId().add(castToString(value)); // StringType 4884 return value; 4885 case -1412808770: // answer 4886 this.getAnswer().add((AnswerComponent) value); // AnswerComponent 4887 return value; 4888 case -149460995: // securityLabelNumber 4889 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); // UnsignedIntType 4890 return value; 4891 case 2046675654: // valuedItem 4892 this.getValuedItem().add((ValuedItemComponent) value); // ValuedItemComponent 4893 return value; 4894 default: return super.setProperty(hash, name, value); 4895 } 4896 4897 } 4898 4899 @Override 4900 public Base setProperty(String name, Base value) throws FHIRException { 4901 if (name.equals("scope")) { 4902 this.scope = castToCodeableConcept(value); // CodeableConcept 4903 } else if (name.equals("type")) { 4904 this.getType().add(castToCodeableConcept(value)); 4905 } else if (name.equals("typeReference")) { 4906 this.getTypeReference().add(castToReference(value)); 4907 } else if (name.equals("subtype")) { 4908 this.getSubtype().add(castToCodeableConcept(value)); 4909 } else if (name.equals("relationship")) { 4910 this.relationship = castToCoding(value); // Coding 4911 } else if (name.equals("context")) { 4912 this.getContext().add((AssetContextComponent) value); 4913 } else if (name.equals("condition")) { 4914 this.condition = castToString(value); // StringType 4915 } else if (name.equals("periodType")) { 4916 this.getPeriodType().add(castToCodeableConcept(value)); 4917 } else if (name.equals("period")) { 4918 this.getPeriod().add(castToPeriod(value)); 4919 } else if (name.equals("usePeriod")) { 4920 this.getUsePeriod().add(castToPeriod(value)); 4921 } else if (name.equals("text")) { 4922 this.text = castToString(value); // StringType 4923 } else if (name.equals("linkId")) { 4924 this.getLinkId().add(castToString(value)); 4925 } else if (name.equals("answer")) { 4926 this.getAnswer().add((AnswerComponent) value); 4927 } else if (name.equals("securityLabelNumber")) { 4928 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); 4929 } else if (name.equals("valuedItem")) { 4930 this.getValuedItem().add((ValuedItemComponent) value); 4931 } else 4932 return super.setProperty(name, value); 4933 return value; 4934 } 4935 4936 @Override 4937 public Base makeProperty(int hash, String name) throws FHIRException { 4938 switch (hash) { 4939 case 109264468: return getScope(); 4940 case 3575610: return addType(); 4941 case 2074825009: return addTypeReference(); 4942 case -1867567750: return addSubtype(); 4943 case -261851592: return getRelationship(); 4944 case 951530927: return addContext(); 4945 case -861311717: return getConditionElement(); 4946 case 384348315: return addPeriodType(); 4947 case -991726143: return addPeriod(); 4948 case -628382168: return addUsePeriod(); 4949 case 3556653: return getTextElement(); 4950 case -1102667083: return addLinkIdElement(); 4951 case -1412808770: return addAnswer(); 4952 case -149460995: return addSecurityLabelNumberElement(); 4953 case 2046675654: return addValuedItem(); 4954 default: return super.makeProperty(hash, name); 4955 } 4956 4957 } 4958 4959 @Override 4960 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4961 switch (hash) { 4962 case 109264468: /*scope*/ return new String[] {"CodeableConcept"}; 4963 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 4964 case 2074825009: /*typeReference*/ return new String[] {"Reference"}; 4965 case -1867567750: /*subtype*/ return new String[] {"CodeableConcept"}; 4966 case -261851592: /*relationship*/ return new String[] {"Coding"}; 4967 case 951530927: /*context*/ return new String[] {}; 4968 case -861311717: /*condition*/ return new String[] {"string"}; 4969 case 384348315: /*periodType*/ return new String[] {"CodeableConcept"}; 4970 case -991726143: /*period*/ return new String[] {"Period"}; 4971 case -628382168: /*usePeriod*/ return new String[] {"Period"}; 4972 case 3556653: /*text*/ return new String[] {"string"}; 4973 case -1102667083: /*linkId*/ return new String[] {"string"}; 4974 case -1412808770: /*answer*/ return new String[] {"@Contract.term.offer.answer"}; 4975 case -149460995: /*securityLabelNumber*/ return new String[] {"unsignedInt"}; 4976 case 2046675654: /*valuedItem*/ return new String[] {}; 4977 default: return super.getTypesForProperty(hash, name); 4978 } 4979 4980 } 4981 4982 @Override 4983 public Base addChild(String name) throws FHIRException { 4984 if (name.equals("scope")) { 4985 this.scope = new CodeableConcept(); 4986 return this.scope; 4987 } 4988 else if (name.equals("type")) { 4989 return addType(); 4990 } 4991 else if (name.equals("typeReference")) { 4992 return addTypeReference(); 4993 } 4994 else if (name.equals("subtype")) { 4995 return addSubtype(); 4996 } 4997 else if (name.equals("relationship")) { 4998 this.relationship = new Coding(); 4999 return this.relationship; 5000 } 5001 else if (name.equals("context")) { 5002 return addContext(); 5003 } 5004 else if (name.equals("condition")) { 5005 throw new FHIRException("Cannot call addChild on a primitive type Contract.condition"); 5006 } 5007 else if (name.equals("periodType")) { 5008 return addPeriodType(); 5009 } 5010 else if (name.equals("period")) { 5011 return addPeriod(); 5012 } 5013 else if (name.equals("usePeriod")) { 5014 return addUsePeriod(); 5015 } 5016 else if (name.equals("text")) { 5017 throw new FHIRException("Cannot call addChild on a primitive type Contract.text"); 5018 } 5019 else if (name.equals("linkId")) { 5020 throw new FHIRException("Cannot call addChild on a primitive type Contract.linkId"); 5021 } 5022 else if (name.equals("answer")) { 5023 return addAnswer(); 5024 } 5025 else if (name.equals("securityLabelNumber")) { 5026 throw new FHIRException("Cannot call addChild on a primitive type Contract.securityLabelNumber"); 5027 } 5028 else if (name.equals("valuedItem")) { 5029 return addValuedItem(); 5030 } 5031 else 5032 return super.addChild(name); 5033 } 5034 5035 public ContractAssetComponent copy() { 5036 ContractAssetComponent dst = new ContractAssetComponent(); 5037 copyValues(dst); 5038 dst.scope = scope == null ? null : scope.copy(); 5039 if (type != null) { 5040 dst.type = new ArrayList<CodeableConcept>(); 5041 for (CodeableConcept i : type) 5042 dst.type.add(i.copy()); 5043 }; 5044 if (typeReference != null) { 5045 dst.typeReference = new ArrayList<Reference>(); 5046 for (Reference i : typeReference) 5047 dst.typeReference.add(i.copy()); 5048 }; 5049 if (subtype != null) { 5050 dst.subtype = new ArrayList<CodeableConcept>(); 5051 for (CodeableConcept i : subtype) 5052 dst.subtype.add(i.copy()); 5053 }; 5054 dst.relationship = relationship == null ? null : relationship.copy(); 5055 if (context != null) { 5056 dst.context = new ArrayList<AssetContextComponent>(); 5057 for (AssetContextComponent i : context) 5058 dst.context.add(i.copy()); 5059 }; 5060 dst.condition = condition == null ? null : condition.copy(); 5061 if (periodType != null) { 5062 dst.periodType = new ArrayList<CodeableConcept>(); 5063 for (CodeableConcept i : periodType) 5064 dst.periodType.add(i.copy()); 5065 }; 5066 if (period != null) { 5067 dst.period = new ArrayList<Period>(); 5068 for (Period i : period) 5069 dst.period.add(i.copy()); 5070 }; 5071 if (usePeriod != null) { 5072 dst.usePeriod = new ArrayList<Period>(); 5073 for (Period i : usePeriod) 5074 dst.usePeriod.add(i.copy()); 5075 }; 5076 dst.text = text == null ? null : text.copy(); 5077 if (linkId != null) { 5078 dst.linkId = new ArrayList<StringType>(); 5079 for (StringType i : linkId) 5080 dst.linkId.add(i.copy()); 5081 }; 5082 if (answer != null) { 5083 dst.answer = new ArrayList<AnswerComponent>(); 5084 for (AnswerComponent i : answer) 5085 dst.answer.add(i.copy()); 5086 }; 5087 if (securityLabelNumber != null) { 5088 dst.securityLabelNumber = new ArrayList<UnsignedIntType>(); 5089 for (UnsignedIntType i : securityLabelNumber) 5090 dst.securityLabelNumber.add(i.copy()); 5091 }; 5092 if (valuedItem != null) { 5093 dst.valuedItem = new ArrayList<ValuedItemComponent>(); 5094 for (ValuedItemComponent i : valuedItem) 5095 dst.valuedItem.add(i.copy()); 5096 }; 5097 return dst; 5098 } 5099 5100 @Override 5101 public boolean equalsDeep(Base other_) { 5102 if (!super.equalsDeep(other_)) 5103 return false; 5104 if (!(other_ instanceof ContractAssetComponent)) 5105 return false; 5106 ContractAssetComponent o = (ContractAssetComponent) other_; 5107 return compareDeep(scope, o.scope, true) && compareDeep(type, o.type, true) && compareDeep(typeReference, o.typeReference, true) 5108 && compareDeep(subtype, o.subtype, true) && compareDeep(relationship, o.relationship, true) && compareDeep(context, o.context, true) 5109 && compareDeep(condition, o.condition, true) && compareDeep(periodType, o.periodType, true) && compareDeep(period, o.period, true) 5110 && compareDeep(usePeriod, o.usePeriod, true) && compareDeep(text, o.text, true) && compareDeep(linkId, o.linkId, true) 5111 && compareDeep(answer, o.answer, true) && compareDeep(securityLabelNumber, o.securityLabelNumber, true) 5112 && compareDeep(valuedItem, o.valuedItem, true); 5113 } 5114 5115 @Override 5116 public boolean equalsShallow(Base other_) { 5117 if (!super.equalsShallow(other_)) 5118 return false; 5119 if (!(other_ instanceof ContractAssetComponent)) 5120 return false; 5121 ContractAssetComponent o = (ContractAssetComponent) other_; 5122 return compareValues(condition, o.condition, true) && compareValues(text, o.text, true) && compareValues(linkId, o.linkId, true) 5123 && compareValues(securityLabelNumber, o.securityLabelNumber, true); 5124 } 5125 5126 public boolean isEmpty() { 5127 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(scope, type, typeReference 5128 , subtype, relationship, context, condition, periodType, period, usePeriod, text 5129 , linkId, answer, securityLabelNumber, valuedItem); 5130 } 5131 5132 public String fhirType() { 5133 return "Contract.term.asset"; 5134 5135 } 5136 5137 } 5138 5139 @Block() 5140 public static class AssetContextComponent extends BackboneElement implements IBaseBackboneElement { 5141 /** 5142 * Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository), location held, e.g., building, jurisdiction. 5143 */ 5144 @Child(name = "reference", type = {Reference.class}, order=1, min=0, max=1, modifier=false, summary=false) 5145 @Description(shortDefinition="Creator,custodian or owner", formalDefinition="Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository), location held, e.g., building, jurisdiction." ) 5146 protected Reference reference; 5147 5148 /** 5149 * The actual object that is the target of the reference (Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository), location held, e.g., building, jurisdiction.) 5150 */ 5151 protected Resource referenceTarget; 5152 5153 /** 5154 * Coded representation of the context generally or of the Referenced entity, such as the asset holder type or location. 5155 */ 5156 @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5157 @Description(shortDefinition="Codeable asset context", formalDefinition="Coded representation of the context generally or of the Referenced entity, such as the asset holder type or location." ) 5158 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-assetcontext") 5159 protected List<CodeableConcept> code; 5160 5161 /** 5162 * Context description. 5163 */ 5164 @Child(name = "text", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 5165 @Description(shortDefinition="Context description", formalDefinition="Context description." ) 5166 protected StringType text; 5167 5168 private static final long serialVersionUID = -634115628L; 5169 5170 /** 5171 * Constructor 5172 */ 5173 public AssetContextComponent() { 5174 super(); 5175 } 5176 5177 /** 5178 * @return {@link #reference} (Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository), location held, e.g., building, jurisdiction.) 5179 */ 5180 public Reference getReference() { 5181 if (this.reference == null) 5182 if (Configuration.errorOnAutoCreate()) 5183 throw new Error("Attempt to auto-create AssetContextComponent.reference"); 5184 else if (Configuration.doAutoCreate()) 5185 this.reference = new Reference(); // cc 5186 return this.reference; 5187 } 5188 5189 public boolean hasReference() { 5190 return this.reference != null && !this.reference.isEmpty(); 5191 } 5192 5193 /** 5194 * @param value {@link #reference} (Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository), location held, e.g., building, jurisdiction.) 5195 */ 5196 public AssetContextComponent setReference(Reference value) { 5197 this.reference = value; 5198 return this; 5199 } 5200 5201 /** 5202 * @return {@link #reference} 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. (Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository), location held, e.g., building, jurisdiction.) 5203 */ 5204 public Resource getReferenceTarget() { 5205 return this.referenceTarget; 5206 } 5207 5208 /** 5209 * @param value {@link #reference} 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. (Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository), location held, e.g., building, jurisdiction.) 5210 */ 5211 public AssetContextComponent setReferenceTarget(Resource value) { 5212 this.referenceTarget = value; 5213 return this; 5214 } 5215 5216 /** 5217 * @return {@link #code} (Coded representation of the context generally or of the Referenced entity, such as the asset holder type or location.) 5218 */ 5219 public List<CodeableConcept> getCode() { 5220 if (this.code == null) 5221 this.code = new ArrayList<CodeableConcept>(); 5222 return this.code; 5223 } 5224 5225 /** 5226 * @return Returns a reference to <code>this</code> for easy method chaining 5227 */ 5228 public AssetContextComponent setCode(List<CodeableConcept> theCode) { 5229 this.code = theCode; 5230 return this; 5231 } 5232 5233 public boolean hasCode() { 5234 if (this.code == null) 5235 return false; 5236 for (CodeableConcept item : this.code) 5237 if (!item.isEmpty()) 5238 return true; 5239 return false; 5240 } 5241 5242 public CodeableConcept addCode() { //3 5243 CodeableConcept t = new CodeableConcept(); 5244 if (this.code == null) 5245 this.code = new ArrayList<CodeableConcept>(); 5246 this.code.add(t); 5247 return t; 5248 } 5249 5250 public AssetContextComponent addCode(CodeableConcept t) { //3 5251 if (t == null) 5252 return this; 5253 if (this.code == null) 5254 this.code = new ArrayList<CodeableConcept>(); 5255 this.code.add(t); 5256 return this; 5257 } 5258 5259 /** 5260 * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist 5261 */ 5262 public CodeableConcept getCodeFirstRep() { 5263 if (getCode().isEmpty()) { 5264 addCode(); 5265 } 5266 return getCode().get(0); 5267 } 5268 5269 /** 5270 * @return {@link #text} (Context description.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 5271 */ 5272 public StringType getTextElement() { 5273 if (this.text == null) 5274 if (Configuration.errorOnAutoCreate()) 5275 throw new Error("Attempt to auto-create AssetContextComponent.text"); 5276 else if (Configuration.doAutoCreate()) 5277 this.text = new StringType(); // bb 5278 return this.text; 5279 } 5280 5281 public boolean hasTextElement() { 5282 return this.text != null && !this.text.isEmpty(); 5283 } 5284 5285 public boolean hasText() { 5286 return this.text != null && !this.text.isEmpty(); 5287 } 5288 5289 /** 5290 * @param value {@link #text} (Context description.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 5291 */ 5292 public AssetContextComponent setTextElement(StringType value) { 5293 this.text = value; 5294 return this; 5295 } 5296 5297 /** 5298 * @return Context description. 5299 */ 5300 public String getText() { 5301 return this.text == null ? null : this.text.getValue(); 5302 } 5303 5304 /** 5305 * @param value Context description. 5306 */ 5307 public AssetContextComponent setText(String value) { 5308 if (Utilities.noString(value)) 5309 this.text = null; 5310 else { 5311 if (this.text == null) 5312 this.text = new StringType(); 5313 this.text.setValue(value); 5314 } 5315 return this; 5316 } 5317 5318 protected void listChildren(List<Property> children) { 5319 super.listChildren(children); 5320 children.add(new Property("reference", "Reference(Any)", "Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository), location held, e.g., building, jurisdiction.", 0, 1, reference)); 5321 children.add(new Property("code", "CodeableConcept", "Coded representation of the context generally or of the Referenced entity, such as the asset holder type or location.", 0, java.lang.Integer.MAX_VALUE, code)); 5322 children.add(new Property("text", "string", "Context description.", 0, 1, text)); 5323 } 5324 5325 @Override 5326 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 5327 switch (_hash) { 5328 case -925155509: /*reference*/ return new Property("reference", "Reference(Any)", "Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository), location held, e.g., building, jurisdiction.", 0, 1, reference); 5329 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "Coded representation of the context generally or of the Referenced entity, such as the asset holder type or location.", 0, java.lang.Integer.MAX_VALUE, code); 5330 case 3556653: /*text*/ return new Property("text", "string", "Context description.", 0, 1, text); 5331 default: return super.getNamedProperty(_hash, _name, _checkValid); 5332 } 5333 5334 } 5335 5336 @Override 5337 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5338 switch (hash) { 5339 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference 5340 case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // CodeableConcept 5341 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 5342 default: return super.getProperty(hash, name, checkValid); 5343 } 5344 5345 } 5346 5347 @Override 5348 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5349 switch (hash) { 5350 case -925155509: // reference 5351 this.reference = castToReference(value); // Reference 5352 return value; 5353 case 3059181: // code 5354 this.getCode().add(castToCodeableConcept(value)); // CodeableConcept 5355 return value; 5356 case 3556653: // text 5357 this.text = castToString(value); // StringType 5358 return value; 5359 default: return super.setProperty(hash, name, value); 5360 } 5361 5362 } 5363 5364 @Override 5365 public Base setProperty(String name, Base value) throws FHIRException { 5366 if (name.equals("reference")) { 5367 this.reference = castToReference(value); // Reference 5368 } else if (name.equals("code")) { 5369 this.getCode().add(castToCodeableConcept(value)); 5370 } else if (name.equals("text")) { 5371 this.text = castToString(value); // StringType 5372 } else 5373 return super.setProperty(name, value); 5374 return value; 5375 } 5376 5377 @Override 5378 public Base makeProperty(int hash, String name) throws FHIRException { 5379 switch (hash) { 5380 case -925155509: return getReference(); 5381 case 3059181: return addCode(); 5382 case 3556653: return getTextElement(); 5383 default: return super.makeProperty(hash, name); 5384 } 5385 5386 } 5387 5388 @Override 5389 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5390 switch (hash) { 5391 case -925155509: /*reference*/ return new String[] {"Reference"}; 5392 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 5393 case 3556653: /*text*/ return new String[] {"string"}; 5394 default: return super.getTypesForProperty(hash, name); 5395 } 5396 5397 } 5398 5399 @Override 5400 public Base addChild(String name) throws FHIRException { 5401 if (name.equals("reference")) { 5402 this.reference = new Reference(); 5403 return this.reference; 5404 } 5405 else if (name.equals("code")) { 5406 return addCode(); 5407 } 5408 else if (name.equals("text")) { 5409 throw new FHIRException("Cannot call addChild on a primitive type Contract.text"); 5410 } 5411 else 5412 return super.addChild(name); 5413 } 5414 5415 public AssetContextComponent copy() { 5416 AssetContextComponent dst = new AssetContextComponent(); 5417 copyValues(dst); 5418 dst.reference = reference == null ? null : reference.copy(); 5419 if (code != null) { 5420 dst.code = new ArrayList<CodeableConcept>(); 5421 for (CodeableConcept i : code) 5422 dst.code.add(i.copy()); 5423 }; 5424 dst.text = text == null ? null : text.copy(); 5425 return dst; 5426 } 5427 5428 @Override 5429 public boolean equalsDeep(Base other_) { 5430 if (!super.equalsDeep(other_)) 5431 return false; 5432 if (!(other_ instanceof AssetContextComponent)) 5433 return false; 5434 AssetContextComponent o = (AssetContextComponent) other_; 5435 return compareDeep(reference, o.reference, true) && compareDeep(code, o.code, true) && compareDeep(text, o.text, true) 5436 ; 5437 } 5438 5439 @Override 5440 public boolean equalsShallow(Base other_) { 5441 if (!super.equalsShallow(other_)) 5442 return false; 5443 if (!(other_ instanceof AssetContextComponent)) 5444 return false; 5445 AssetContextComponent o = (AssetContextComponent) other_; 5446 return compareValues(text, o.text, true); 5447 } 5448 5449 public boolean isEmpty() { 5450 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(reference, code, text); 5451 } 5452 5453 public String fhirType() { 5454 return "Contract.term.asset.context"; 5455 5456 } 5457 5458 } 5459 5460 @Block() 5461 public static class ValuedItemComponent extends BackboneElement implements IBaseBackboneElement { 5462 /** 5463 * Specific type of Contract Valued Item that may be priced. 5464 */ 5465 @Child(name = "entity", type = {CodeableConcept.class, Reference.class}, order=1, min=0, max=1, modifier=false, summary=false) 5466 @Description(shortDefinition="Contract Valued Item Type", formalDefinition="Specific type of Contract Valued Item that may be priced." ) 5467 protected Type entity; 5468 5469 /** 5470 * Identifies a Contract Valued Item instance. 5471 */ 5472 @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=false) 5473 @Description(shortDefinition="Contract Valued Item Number", formalDefinition="Identifies a Contract Valued Item instance." ) 5474 protected Identifier identifier; 5475 5476 /** 5477 * Indicates the time during which this Contract ValuedItem information is effective. 5478 */ 5479 @Child(name = "effectiveTime", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 5480 @Description(shortDefinition="Contract Valued Item Effective Tiem", formalDefinition="Indicates the time during which this Contract ValuedItem information is effective." ) 5481 protected DateTimeType effectiveTime; 5482 5483 /** 5484 * Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances. 5485 */ 5486 @Child(name = "quantity", type = {Quantity.class}, order=4, min=0, max=1, modifier=false, summary=false) 5487 @Description(shortDefinition="Count of Contract Valued Items", formalDefinition="Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances." ) 5488 protected Quantity quantity; 5489 5490 /** 5491 * A Contract Valued Item unit valuation measure. 5492 */ 5493 @Child(name = "unitPrice", type = {Money.class}, order=5, min=0, max=1, modifier=false, summary=false) 5494 @Description(shortDefinition="Contract Valued Item fee, charge, or cost", formalDefinition="A Contract Valued Item unit valuation measure." ) 5495 protected Money unitPrice; 5496 5497 /** 5498 * A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 5499 */ 5500 @Child(name = "factor", type = {DecimalType.class}, order=6, min=0, max=1, modifier=false, summary=false) 5501 @Description(shortDefinition="Contract Valued Item Price Scaling Factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) 5502 protected DecimalType factor; 5503 5504 /** 5505 * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point. 5506 */ 5507 @Child(name = "points", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=false) 5508 @Description(shortDefinition="Contract Valued Item Difficulty Scaling Factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point." ) 5509 protected DecimalType points; 5510 5511 /** 5512 * Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. 5513 */ 5514 @Child(name = "net", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=false) 5515 @Description(shortDefinition="Total Contract Valued Item Value", formalDefinition="Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) 5516 protected Money net; 5517 5518 /** 5519 * Terms of valuation. 5520 */ 5521 @Child(name = "payment", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) 5522 @Description(shortDefinition="Terms of valuation", formalDefinition="Terms of valuation." ) 5523 protected StringType payment; 5524 5525 /** 5526 * When payment is due. 5527 */ 5528 @Child(name = "paymentDate", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=false) 5529 @Description(shortDefinition="When payment is due", formalDefinition="When payment is due." ) 5530 protected DateTimeType paymentDate; 5531 5532 /** 5533 * Who will make payment. 5534 */ 5535 @Child(name = "responsible", type = {Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=11, min=0, max=1, modifier=false, summary=false) 5536 @Description(shortDefinition="Who will make payment", formalDefinition="Who will make payment." ) 5537 protected Reference responsible; 5538 5539 /** 5540 * The actual object that is the target of the reference (Who will make payment.) 5541 */ 5542 protected Resource responsibleTarget; 5543 5544 /** 5545 * Who will receive payment. 5546 */ 5547 @Child(name = "recipient", type = {Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=12, min=0, max=1, modifier=false, summary=false) 5548 @Description(shortDefinition="Who will receive payment", formalDefinition="Who will receive payment." ) 5549 protected Reference recipient; 5550 5551 /** 5552 * The actual object that is the target of the reference (Who will receive payment.) 5553 */ 5554 protected Resource recipientTarget; 5555 5556 /** 5557 * Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse. 5558 */ 5559 @Child(name = "linkId", type = {StringType.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5560 @Description(shortDefinition="Pointer to specific item", formalDefinition="Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse." ) 5561 protected List<StringType> linkId; 5562 5563 /** 5564 * A set of security labels that define which terms are controlled by this condition. 5565 */ 5566 @Child(name = "securityLabelNumber", type = {UnsignedIntType.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5567 @Description(shortDefinition="Security Labels that define affected terms", formalDefinition="A set of security labels that define which terms are controlled by this condition." ) 5568 protected List<UnsignedIntType> securityLabelNumber; 5569 5570 private static final long serialVersionUID = 1894951601L; 5571 5572 /** 5573 * Constructor 5574 */ 5575 public ValuedItemComponent() { 5576 super(); 5577 } 5578 5579 /** 5580 * @return {@link #entity} (Specific type of Contract Valued Item that may be priced.) 5581 */ 5582 public Type getEntity() { 5583 return this.entity; 5584 } 5585 5586 /** 5587 * @return {@link #entity} (Specific type of Contract Valued Item that may be priced.) 5588 */ 5589 public CodeableConcept getEntityCodeableConcept() throws FHIRException { 5590 if (this.entity == null) 5591 return null; 5592 if (!(this.entity instanceof CodeableConcept)) 5593 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.entity.getClass().getName()+" was encountered"); 5594 return (CodeableConcept) this.entity; 5595 } 5596 5597 public boolean hasEntityCodeableConcept() { 5598 return this != null && this.entity instanceof CodeableConcept; 5599 } 5600 5601 /** 5602 * @return {@link #entity} (Specific type of Contract Valued Item that may be priced.) 5603 */ 5604 public Reference getEntityReference() throws FHIRException { 5605 if (this.entity == null) 5606 return null; 5607 if (!(this.entity instanceof Reference)) 5608 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.entity.getClass().getName()+" was encountered"); 5609 return (Reference) this.entity; 5610 } 5611 5612 public boolean hasEntityReference() { 5613 return this != null && this.entity instanceof Reference; 5614 } 5615 5616 public boolean hasEntity() { 5617 return this.entity != null && !this.entity.isEmpty(); 5618 } 5619 5620 /** 5621 * @param value {@link #entity} (Specific type of Contract Valued Item that may be priced.) 5622 */ 5623 public ValuedItemComponent setEntity(Type value) { 5624 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 5625 throw new Error("Not the right type for Contract.term.asset.valuedItem.entity[x]: "+value.fhirType()); 5626 this.entity = value; 5627 return this; 5628 } 5629 5630 /** 5631 * @return {@link #identifier} (Identifies a Contract Valued Item instance.) 5632 */ 5633 public Identifier getIdentifier() { 5634 if (this.identifier == null) 5635 if (Configuration.errorOnAutoCreate()) 5636 throw new Error("Attempt to auto-create ValuedItemComponent.identifier"); 5637 else if (Configuration.doAutoCreate()) 5638 this.identifier = new Identifier(); // cc 5639 return this.identifier; 5640 } 5641 5642 public boolean hasIdentifier() { 5643 return this.identifier != null && !this.identifier.isEmpty(); 5644 } 5645 5646 /** 5647 * @param value {@link #identifier} (Identifies a Contract Valued Item instance.) 5648 */ 5649 public ValuedItemComponent setIdentifier(Identifier value) { 5650 this.identifier = value; 5651 return this; 5652 } 5653 5654 /** 5655 * @return {@link #effectiveTime} (Indicates the time during which this Contract ValuedItem information is effective.). This is the underlying object with id, value and extensions. The accessor "getEffectiveTime" gives direct access to the value 5656 */ 5657 public DateTimeType getEffectiveTimeElement() { 5658 if (this.effectiveTime == null) 5659 if (Configuration.errorOnAutoCreate()) 5660 throw new Error("Attempt to auto-create ValuedItemComponent.effectiveTime"); 5661 else if (Configuration.doAutoCreate()) 5662 this.effectiveTime = new DateTimeType(); // bb 5663 return this.effectiveTime; 5664 } 5665 5666 public boolean hasEffectiveTimeElement() { 5667 return this.effectiveTime != null && !this.effectiveTime.isEmpty(); 5668 } 5669 5670 public boolean hasEffectiveTime() { 5671 return this.effectiveTime != null && !this.effectiveTime.isEmpty(); 5672 } 5673 5674 /** 5675 * @param value {@link #effectiveTime} (Indicates the time during which this Contract ValuedItem information is effective.). This is the underlying object with id, value and extensions. The accessor "getEffectiveTime" gives direct access to the value 5676 */ 5677 public ValuedItemComponent setEffectiveTimeElement(DateTimeType value) { 5678 this.effectiveTime = value; 5679 return this; 5680 } 5681 5682 /** 5683 * @return Indicates the time during which this Contract ValuedItem information is effective. 5684 */ 5685 public Date getEffectiveTime() { 5686 return this.effectiveTime == null ? null : this.effectiveTime.getValue(); 5687 } 5688 5689 /** 5690 * @param value Indicates the time during which this Contract ValuedItem information is effective. 5691 */ 5692 public ValuedItemComponent setEffectiveTime(Date value) { 5693 if (value == null) 5694 this.effectiveTime = null; 5695 else { 5696 if (this.effectiveTime == null) 5697 this.effectiveTime = new DateTimeType(); 5698 this.effectiveTime.setValue(value); 5699 } 5700 return this; 5701 } 5702 5703 /** 5704 * @return {@link #quantity} (Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.) 5705 */ 5706 public Quantity getQuantity() { 5707 if (this.quantity == null) 5708 if (Configuration.errorOnAutoCreate()) 5709 throw new Error("Attempt to auto-create ValuedItemComponent.quantity"); 5710 else if (Configuration.doAutoCreate()) 5711 this.quantity = new Quantity(); // cc 5712 return this.quantity; 5713 } 5714 5715 public boolean hasQuantity() { 5716 return this.quantity != null && !this.quantity.isEmpty(); 5717 } 5718 5719 /** 5720 * @param value {@link #quantity} (Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.) 5721 */ 5722 public ValuedItemComponent setQuantity(Quantity value) { 5723 this.quantity = value; 5724 return this; 5725 } 5726 5727 /** 5728 * @return {@link #unitPrice} (A Contract Valued Item unit valuation measure.) 5729 */ 5730 public Money getUnitPrice() { 5731 if (this.unitPrice == null) 5732 if (Configuration.errorOnAutoCreate()) 5733 throw new Error("Attempt to auto-create ValuedItemComponent.unitPrice"); 5734 else if (Configuration.doAutoCreate()) 5735 this.unitPrice = new Money(); // cc 5736 return this.unitPrice; 5737 } 5738 5739 public boolean hasUnitPrice() { 5740 return this.unitPrice != null && !this.unitPrice.isEmpty(); 5741 } 5742 5743 /** 5744 * @param value {@link #unitPrice} (A Contract Valued Item unit valuation measure.) 5745 */ 5746 public ValuedItemComponent setUnitPrice(Money value) { 5747 this.unitPrice = value; 5748 return this; 5749 } 5750 5751 /** 5752 * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 5753 */ 5754 public DecimalType getFactorElement() { 5755 if (this.factor == null) 5756 if (Configuration.errorOnAutoCreate()) 5757 throw new Error("Attempt to auto-create ValuedItemComponent.factor"); 5758 else if (Configuration.doAutoCreate()) 5759 this.factor = new DecimalType(); // bb 5760 return this.factor; 5761 } 5762 5763 public boolean hasFactorElement() { 5764 return this.factor != null && !this.factor.isEmpty(); 5765 } 5766 5767 public boolean hasFactor() { 5768 return this.factor != null && !this.factor.isEmpty(); 5769 } 5770 5771 /** 5772 * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 5773 */ 5774 public ValuedItemComponent setFactorElement(DecimalType value) { 5775 this.factor = value; 5776 return this; 5777 } 5778 5779 /** 5780 * @return A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 5781 */ 5782 public BigDecimal getFactor() { 5783 return this.factor == null ? null : this.factor.getValue(); 5784 } 5785 5786 /** 5787 * @param value A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 5788 */ 5789 public ValuedItemComponent setFactor(BigDecimal value) { 5790 if (value == null) 5791 this.factor = null; 5792 else { 5793 if (this.factor == null) 5794 this.factor = new DecimalType(); 5795 this.factor.setValue(value); 5796 } 5797 return this; 5798 } 5799 5800 /** 5801 * @param value A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 5802 */ 5803 public ValuedItemComponent setFactor(long value) { 5804 this.factor = new DecimalType(); 5805 this.factor.setValue(value); 5806 return this; 5807 } 5808 5809 /** 5810 * @param value A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 5811 */ 5812 public ValuedItemComponent setFactor(double value) { 5813 this.factor = new DecimalType(); 5814 this.factor.setValue(value); 5815 return this; 5816 } 5817 5818 /** 5819 * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value 5820 */ 5821 public DecimalType getPointsElement() { 5822 if (this.points == null) 5823 if (Configuration.errorOnAutoCreate()) 5824 throw new Error("Attempt to auto-create ValuedItemComponent.points"); 5825 else if (Configuration.doAutoCreate()) 5826 this.points = new DecimalType(); // bb 5827 return this.points; 5828 } 5829 5830 public boolean hasPointsElement() { 5831 return this.points != null && !this.points.isEmpty(); 5832 } 5833 5834 public boolean hasPoints() { 5835 return this.points != null && !this.points.isEmpty(); 5836 } 5837 5838 /** 5839 * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value 5840 */ 5841 public ValuedItemComponent setPointsElement(DecimalType value) { 5842 this.points = value; 5843 return this; 5844 } 5845 5846 /** 5847 * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point. 5848 */ 5849 public BigDecimal getPoints() { 5850 return this.points == null ? null : this.points.getValue(); 5851 } 5852 5853 /** 5854 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point. 5855 */ 5856 public ValuedItemComponent setPoints(BigDecimal value) { 5857 if (value == null) 5858 this.points = null; 5859 else { 5860 if (this.points == null) 5861 this.points = new DecimalType(); 5862 this.points.setValue(value); 5863 } 5864 return this; 5865 } 5866 5867 /** 5868 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point. 5869 */ 5870 public ValuedItemComponent setPoints(long value) { 5871 this.points = new DecimalType(); 5872 this.points.setValue(value); 5873 return this; 5874 } 5875 5876 /** 5877 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point. 5878 */ 5879 public ValuedItemComponent setPoints(double value) { 5880 this.points = new DecimalType(); 5881 this.points.setValue(value); 5882 return this; 5883 } 5884 5885 /** 5886 * @return {@link #net} (Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) 5887 */ 5888 public Money getNet() { 5889 if (this.net == null) 5890 if (Configuration.errorOnAutoCreate()) 5891 throw new Error("Attempt to auto-create ValuedItemComponent.net"); 5892 else if (Configuration.doAutoCreate()) 5893 this.net = new Money(); // cc 5894 return this.net; 5895 } 5896 5897 public boolean hasNet() { 5898 return this.net != null && !this.net.isEmpty(); 5899 } 5900 5901 /** 5902 * @param value {@link #net} (Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) 5903 */ 5904 public ValuedItemComponent setNet(Money value) { 5905 this.net = value; 5906 return this; 5907 } 5908 5909 /** 5910 * @return {@link #payment} (Terms of valuation.). This is the underlying object with id, value and extensions. The accessor "getPayment" gives direct access to the value 5911 */ 5912 public StringType getPaymentElement() { 5913 if (this.payment == null) 5914 if (Configuration.errorOnAutoCreate()) 5915 throw new Error("Attempt to auto-create ValuedItemComponent.payment"); 5916 else if (Configuration.doAutoCreate()) 5917 this.payment = new StringType(); // bb 5918 return this.payment; 5919 } 5920 5921 public boolean hasPaymentElement() { 5922 return this.payment != null && !this.payment.isEmpty(); 5923 } 5924 5925 public boolean hasPayment() { 5926 return this.payment != null && !this.payment.isEmpty(); 5927 } 5928 5929 /** 5930 * @param value {@link #payment} (Terms of valuation.). This is the underlying object with id, value and extensions. The accessor "getPayment" gives direct access to the value 5931 */ 5932 public ValuedItemComponent setPaymentElement(StringType value) { 5933 this.payment = value; 5934 return this; 5935 } 5936 5937 /** 5938 * @return Terms of valuation. 5939 */ 5940 public String getPayment() { 5941 return this.payment == null ? null : this.payment.getValue(); 5942 } 5943 5944 /** 5945 * @param value Terms of valuation. 5946 */ 5947 public ValuedItemComponent setPayment(String value) { 5948 if (Utilities.noString(value)) 5949 this.payment = null; 5950 else { 5951 if (this.payment == null) 5952 this.payment = new StringType(); 5953 this.payment.setValue(value); 5954 } 5955 return this; 5956 } 5957 5958 /** 5959 * @return {@link #paymentDate} (When payment is due.). This is the underlying object with id, value and extensions. The accessor "getPaymentDate" gives direct access to the value 5960 */ 5961 public DateTimeType getPaymentDateElement() { 5962 if (this.paymentDate == null) 5963 if (Configuration.errorOnAutoCreate()) 5964 throw new Error("Attempt to auto-create ValuedItemComponent.paymentDate"); 5965 else if (Configuration.doAutoCreate()) 5966 this.paymentDate = new DateTimeType(); // bb 5967 return this.paymentDate; 5968 } 5969 5970 public boolean hasPaymentDateElement() { 5971 return this.paymentDate != null && !this.paymentDate.isEmpty(); 5972 } 5973 5974 public boolean hasPaymentDate() { 5975 return this.paymentDate != null && !this.paymentDate.isEmpty(); 5976 } 5977 5978 /** 5979 * @param value {@link #paymentDate} (When payment is due.). This is the underlying object with id, value and extensions. The accessor "getPaymentDate" gives direct access to the value 5980 */ 5981 public ValuedItemComponent setPaymentDateElement(DateTimeType value) { 5982 this.paymentDate = value; 5983 return this; 5984 } 5985 5986 /** 5987 * @return When payment is due. 5988 */ 5989 public Date getPaymentDate() { 5990 return this.paymentDate == null ? null : this.paymentDate.getValue(); 5991 } 5992 5993 /** 5994 * @param value When payment is due. 5995 */ 5996 public ValuedItemComponent setPaymentDate(Date value) { 5997 if (value == null) 5998 this.paymentDate = null; 5999 else { 6000 if (this.paymentDate == null) 6001 this.paymentDate = new DateTimeType(); 6002 this.paymentDate.setValue(value); 6003 } 6004 return this; 6005 } 6006 6007 /** 6008 * @return {@link #responsible} (Who will make payment.) 6009 */ 6010 public Reference getResponsible() { 6011 if (this.responsible == null) 6012 if (Configuration.errorOnAutoCreate()) 6013 throw new Error("Attempt to auto-create ValuedItemComponent.responsible"); 6014 else if (Configuration.doAutoCreate()) 6015 this.responsible = new Reference(); // cc 6016 return this.responsible; 6017 } 6018 6019 public boolean hasResponsible() { 6020 return this.responsible != null && !this.responsible.isEmpty(); 6021 } 6022 6023 /** 6024 * @param value {@link #responsible} (Who will make payment.) 6025 */ 6026 public ValuedItemComponent setResponsible(Reference value) { 6027 this.responsible = value; 6028 return this; 6029 } 6030 6031 /** 6032 * @return {@link #responsible} 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. (Who will make payment.) 6033 */ 6034 public Resource getResponsibleTarget() { 6035 return this.responsibleTarget; 6036 } 6037 6038 /** 6039 * @param value {@link #responsible} 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. (Who will make payment.) 6040 */ 6041 public ValuedItemComponent setResponsibleTarget(Resource value) { 6042 this.responsibleTarget = value; 6043 return this; 6044 } 6045 6046 /** 6047 * @return {@link #recipient} (Who will receive payment.) 6048 */ 6049 public Reference getRecipient() { 6050 if (this.recipient == null) 6051 if (Configuration.errorOnAutoCreate()) 6052 throw new Error("Attempt to auto-create ValuedItemComponent.recipient"); 6053 else if (Configuration.doAutoCreate()) 6054 this.recipient = new Reference(); // cc 6055 return this.recipient; 6056 } 6057 6058 public boolean hasRecipient() { 6059 return this.recipient != null && !this.recipient.isEmpty(); 6060 } 6061 6062 /** 6063 * @param value {@link #recipient} (Who will receive payment.) 6064 */ 6065 public ValuedItemComponent setRecipient(Reference value) { 6066 this.recipient = value; 6067 return this; 6068 } 6069 6070 /** 6071 * @return {@link #recipient} 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. (Who will receive payment.) 6072 */ 6073 public Resource getRecipientTarget() { 6074 return this.recipientTarget; 6075 } 6076 6077 /** 6078 * @param value {@link #recipient} 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. (Who will receive payment.) 6079 */ 6080 public ValuedItemComponent setRecipientTarget(Resource value) { 6081 this.recipientTarget = value; 6082 return this; 6083 } 6084 6085 /** 6086 * @return {@link #linkId} (Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.) 6087 */ 6088 public List<StringType> getLinkId() { 6089 if (this.linkId == null) 6090 this.linkId = new ArrayList<StringType>(); 6091 return this.linkId; 6092 } 6093 6094 /** 6095 * @return Returns a reference to <code>this</code> for easy method chaining 6096 */ 6097 public ValuedItemComponent setLinkId(List<StringType> theLinkId) { 6098 this.linkId = theLinkId; 6099 return this; 6100 } 6101 6102 public boolean hasLinkId() { 6103 if (this.linkId == null) 6104 return false; 6105 for (StringType item : this.linkId) 6106 if (!item.isEmpty()) 6107 return true; 6108 return false; 6109 } 6110 6111 /** 6112 * @return {@link #linkId} (Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.) 6113 */ 6114 public StringType addLinkIdElement() {//2 6115 StringType t = new StringType(); 6116 if (this.linkId == null) 6117 this.linkId = new ArrayList<StringType>(); 6118 this.linkId.add(t); 6119 return t; 6120 } 6121 6122 /** 6123 * @param value {@link #linkId} (Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.) 6124 */ 6125 public ValuedItemComponent addLinkId(String value) { //1 6126 StringType t = new StringType(); 6127 t.setValue(value); 6128 if (this.linkId == null) 6129 this.linkId = new ArrayList<StringType>(); 6130 this.linkId.add(t); 6131 return this; 6132 } 6133 6134 /** 6135 * @param value {@link #linkId} (Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.) 6136 */ 6137 public boolean hasLinkId(String value) { 6138 if (this.linkId == null) 6139 return false; 6140 for (StringType v : this.linkId) 6141 if (v.getValue().equals(value)) // string 6142 return true; 6143 return false; 6144 } 6145 6146 /** 6147 * @return {@link #securityLabelNumber} (A set of security labels that define which terms are controlled by this condition.) 6148 */ 6149 public List<UnsignedIntType> getSecurityLabelNumber() { 6150 if (this.securityLabelNumber == null) 6151 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 6152 return this.securityLabelNumber; 6153 } 6154 6155 /** 6156 * @return Returns a reference to <code>this</code> for easy method chaining 6157 */ 6158 public ValuedItemComponent setSecurityLabelNumber(List<UnsignedIntType> theSecurityLabelNumber) { 6159 this.securityLabelNumber = theSecurityLabelNumber; 6160 return this; 6161 } 6162 6163 public boolean hasSecurityLabelNumber() { 6164 if (this.securityLabelNumber == null) 6165 return false; 6166 for (UnsignedIntType item : this.securityLabelNumber) 6167 if (!item.isEmpty()) 6168 return true; 6169 return false; 6170 } 6171 6172 /** 6173 * @return {@link #securityLabelNumber} (A set of security labels that define which terms are controlled by this condition.) 6174 */ 6175 public UnsignedIntType addSecurityLabelNumberElement() {//2 6176 UnsignedIntType t = new UnsignedIntType(); 6177 if (this.securityLabelNumber == null) 6178 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 6179 this.securityLabelNumber.add(t); 6180 return t; 6181 } 6182 6183 /** 6184 * @param value {@link #securityLabelNumber} (A set of security labels that define which terms are controlled by this condition.) 6185 */ 6186 public ValuedItemComponent addSecurityLabelNumber(int value) { //1 6187 UnsignedIntType t = new UnsignedIntType(); 6188 t.setValue(value); 6189 if (this.securityLabelNumber == null) 6190 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 6191 this.securityLabelNumber.add(t); 6192 return this; 6193 } 6194 6195 /** 6196 * @param value {@link #securityLabelNumber} (A set of security labels that define which terms are controlled by this condition.) 6197 */ 6198 public boolean hasSecurityLabelNumber(int value) { 6199 if (this.securityLabelNumber == null) 6200 return false; 6201 for (UnsignedIntType v : this.securityLabelNumber) 6202 if (v.getValue().equals(value)) // unsignedInt 6203 return true; 6204 return false; 6205 } 6206 6207 protected void listChildren(List<Property> children) { 6208 super.listChildren(children); 6209 children.add(new Property("entity[x]", "CodeableConcept|Reference(Any)", "Specific type of Contract Valued Item that may be priced.", 0, 1, entity)); 6210 children.add(new Property("identifier", "Identifier", "Identifies a Contract Valued Item instance.", 0, 1, identifier)); 6211 children.add(new Property("effectiveTime", "dateTime", "Indicates the time during which this Contract ValuedItem information is effective.", 0, 1, effectiveTime)); 6212 children.add(new Property("quantity", "SimpleQuantity", "Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.", 0, 1, quantity)); 6213 children.add(new Property("unitPrice", "Money", "A Contract Valued Item unit valuation measure.", 0, 1, unitPrice)); 6214 children.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor)); 6215 children.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.", 0, 1, points)); 6216 children.add(new Property("net", "Money", "Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, 1, net)); 6217 children.add(new Property("payment", "string", "Terms of valuation.", 0, 1, payment)); 6218 children.add(new Property("paymentDate", "dateTime", "When payment is due.", 0, 1, paymentDate)); 6219 children.add(new Property("responsible", "Reference(Organization|Patient|Practitioner|RelatedPerson)", "Who will make payment.", 0, 1, responsible)); 6220 children.add(new Property("recipient", "Reference(Organization|Patient|Practitioner|RelatedPerson)", "Who will receive payment.", 0, 1, recipient)); 6221 children.add(new Property("linkId", "string", "Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, linkId)); 6222 children.add(new Property("securityLabelNumber", "unsignedInt", "A set of security labels that define which terms are controlled by this condition.", 0, java.lang.Integer.MAX_VALUE, securityLabelNumber)); 6223 } 6224 6225 @Override 6226 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 6227 switch (_hash) { 6228 case -740568643: /*entity[x]*/ return new Property("entity[x]", "CodeableConcept|Reference(Any)", "Specific type of Contract Valued Item that may be priced.", 0, 1, entity); 6229 case -1298275357: /*entity*/ return new Property("entity[x]", "CodeableConcept|Reference(Any)", "Specific type of Contract Valued Item that may be priced.", 0, 1, entity); 6230 case 924197182: /*entityCodeableConcept*/ return new Property("entity[x]", "CodeableConcept|Reference(Any)", "Specific type of Contract Valued Item that may be priced.", 0, 1, entity); 6231 case -356635992: /*entityReference*/ return new Property("entity[x]", "CodeableConcept|Reference(Any)", "Specific type of Contract Valued Item that may be priced.", 0, 1, entity); 6232 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifies a Contract Valued Item instance.", 0, 1, identifier); 6233 case -929905388: /*effectiveTime*/ return new Property("effectiveTime", "dateTime", "Indicates the time during which this Contract ValuedItem information is effective.", 0, 1, effectiveTime); 6234 case -1285004149: /*quantity*/ return new Property("quantity", "SimpleQuantity", "Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.", 0, 1, quantity); 6235 case -486196699: /*unitPrice*/ return new Property("unitPrice", "Money", "A Contract Valued Item unit valuation measure.", 0, 1, unitPrice); 6236 case -1282148017: /*factor*/ return new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor); 6237 case -982754077: /*points*/ return new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.", 0, 1, points); 6238 case 108957: /*net*/ return new Property("net", "Money", "Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, 1, net); 6239 case -786681338: /*payment*/ return new Property("payment", "string", "Terms of valuation.", 0, 1, payment); 6240 case -1540873516: /*paymentDate*/ return new Property("paymentDate", "dateTime", "When payment is due.", 0, 1, paymentDate); 6241 case 1847674614: /*responsible*/ return new Property("responsible", "Reference(Organization|Patient|Practitioner|RelatedPerson)", "Who will make payment.", 0, 1, responsible); 6242 case 820081177: /*recipient*/ return new Property("recipient", "Reference(Organization|Patient|Practitioner|RelatedPerson)", "Who will receive payment.", 0, 1, recipient); 6243 case -1102667083: /*linkId*/ return new Property("linkId", "string", "Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, linkId); 6244 case -149460995: /*securityLabelNumber*/ return new Property("securityLabelNumber", "unsignedInt", "A set of security labels that define which terms are controlled by this condition.", 0, java.lang.Integer.MAX_VALUE, securityLabelNumber); 6245 default: return super.getNamedProperty(_hash, _name, _checkValid); 6246 } 6247 6248 } 6249 6250 @Override 6251 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6252 switch (hash) { 6253 case -1298275357: /*entity*/ return this.entity == null ? new Base[0] : new Base[] {this.entity}; // Type 6254 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 6255 case -929905388: /*effectiveTime*/ return this.effectiveTime == null ? new Base[0] : new Base[] {this.effectiveTime}; // DateTimeType 6256 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 6257 case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money 6258 case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType 6259 case -982754077: /*points*/ return this.points == null ? new Base[0] : new Base[] {this.points}; // DecimalType 6260 case 108957: /*net*/ return this.net == null ? new Base[0] : new Base[] {this.net}; // Money 6261 case -786681338: /*payment*/ return this.payment == null ? new Base[0] : new Base[] {this.payment}; // StringType 6262 case -1540873516: /*paymentDate*/ return this.paymentDate == null ? new Base[0] : new Base[] {this.paymentDate}; // DateTimeType 6263 case 1847674614: /*responsible*/ return this.responsible == null ? new Base[0] : new Base[] {this.responsible}; // Reference 6264 case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : new Base[] {this.recipient}; // Reference 6265 case -1102667083: /*linkId*/ return this.linkId == null ? new Base[0] : this.linkId.toArray(new Base[this.linkId.size()]); // StringType 6266 case -149460995: /*securityLabelNumber*/ return this.securityLabelNumber == null ? new Base[0] : this.securityLabelNumber.toArray(new Base[this.securityLabelNumber.size()]); // UnsignedIntType 6267 default: return super.getProperty(hash, name, checkValid); 6268 } 6269 6270 } 6271 6272 @Override 6273 public Base setProperty(int hash, String name, Base value) throws FHIRException { 6274 switch (hash) { 6275 case -1298275357: // entity 6276 this.entity = castToType(value); // Type 6277 return value; 6278 case -1618432855: // identifier 6279 this.identifier = castToIdentifier(value); // Identifier 6280 return value; 6281 case -929905388: // effectiveTime 6282 this.effectiveTime = castToDateTime(value); // DateTimeType 6283 return value; 6284 case -1285004149: // quantity 6285 this.quantity = castToQuantity(value); // Quantity 6286 return value; 6287 case -486196699: // unitPrice 6288 this.unitPrice = castToMoney(value); // Money 6289 return value; 6290 case -1282148017: // factor 6291 this.factor = castToDecimal(value); // DecimalType 6292 return value; 6293 case -982754077: // points 6294 this.points = castToDecimal(value); // DecimalType 6295 return value; 6296 case 108957: // net 6297 this.net = castToMoney(value); // Money 6298 return value; 6299 case -786681338: // payment 6300 this.payment = castToString(value); // StringType 6301 return value; 6302 case -1540873516: // paymentDate 6303 this.paymentDate = castToDateTime(value); // DateTimeType 6304 return value; 6305 case 1847674614: // responsible 6306 this.responsible = castToReference(value); // Reference 6307 return value; 6308 case 820081177: // recipient 6309 this.recipient = castToReference(value); // Reference 6310 return value; 6311 case -1102667083: // linkId 6312 this.getLinkId().add(castToString(value)); // StringType 6313 return value; 6314 case -149460995: // securityLabelNumber 6315 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); // UnsignedIntType 6316 return value; 6317 default: return super.setProperty(hash, name, value); 6318 } 6319 6320 } 6321 6322 @Override 6323 public Base setProperty(String name, Base value) throws FHIRException { 6324 if (name.equals("entity[x]")) { 6325 this.entity = castToType(value); // Type 6326 } else if (name.equals("identifier")) { 6327 this.identifier = castToIdentifier(value); // Identifier 6328 } else if (name.equals("effectiveTime")) { 6329 this.effectiveTime = castToDateTime(value); // DateTimeType 6330 } else if (name.equals("quantity")) { 6331 this.quantity = castToQuantity(value); // Quantity 6332 } else if (name.equals("unitPrice")) { 6333 this.unitPrice = castToMoney(value); // Money 6334 } else if (name.equals("factor")) { 6335 this.factor = castToDecimal(value); // DecimalType 6336 } else if (name.equals("points")) { 6337 this.points = castToDecimal(value); // DecimalType 6338 } else if (name.equals("net")) { 6339 this.net = castToMoney(value); // Money 6340 } else if (name.equals("payment")) { 6341 this.payment = castToString(value); // StringType 6342 } else if (name.equals("paymentDate")) { 6343 this.paymentDate = castToDateTime(value); // DateTimeType 6344 } else if (name.equals("responsible")) { 6345 this.responsible = castToReference(value); // Reference 6346 } else if (name.equals("recipient")) { 6347 this.recipient = castToReference(value); // Reference 6348 } else if (name.equals("linkId")) { 6349 this.getLinkId().add(castToString(value)); 6350 } else if (name.equals("securityLabelNumber")) { 6351 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); 6352 } else 6353 return super.setProperty(name, value); 6354 return value; 6355 } 6356 6357 @Override 6358 public Base makeProperty(int hash, String name) throws FHIRException { 6359 switch (hash) { 6360 case -740568643: return getEntity(); 6361 case -1298275357: return getEntity(); 6362 case -1618432855: return getIdentifier(); 6363 case -929905388: return getEffectiveTimeElement(); 6364 case -1285004149: return getQuantity(); 6365 case -486196699: return getUnitPrice(); 6366 case -1282148017: return getFactorElement(); 6367 case -982754077: return getPointsElement(); 6368 case 108957: return getNet(); 6369 case -786681338: return getPaymentElement(); 6370 case -1540873516: return getPaymentDateElement(); 6371 case 1847674614: return getResponsible(); 6372 case 820081177: return getRecipient(); 6373 case -1102667083: return addLinkIdElement(); 6374 case -149460995: return addSecurityLabelNumberElement(); 6375 default: return super.makeProperty(hash, name); 6376 } 6377 6378 } 6379 6380 @Override 6381 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6382 switch (hash) { 6383 case -1298275357: /*entity*/ return new String[] {"CodeableConcept", "Reference"}; 6384 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 6385 case -929905388: /*effectiveTime*/ return new String[] {"dateTime"}; 6386 case -1285004149: /*quantity*/ return new String[] {"SimpleQuantity"}; 6387 case -486196699: /*unitPrice*/ return new String[] {"Money"}; 6388 case -1282148017: /*factor*/ return new String[] {"decimal"}; 6389 case -982754077: /*points*/ return new String[] {"decimal"}; 6390 case 108957: /*net*/ return new String[] {"Money"}; 6391 case -786681338: /*payment*/ return new String[] {"string"}; 6392 case -1540873516: /*paymentDate*/ return new String[] {"dateTime"}; 6393 case 1847674614: /*responsible*/ return new String[] {"Reference"}; 6394 case 820081177: /*recipient*/ return new String[] {"Reference"}; 6395 case -1102667083: /*linkId*/ return new String[] {"string"}; 6396 case -149460995: /*securityLabelNumber*/ return new String[] {"unsignedInt"}; 6397 default: return super.getTypesForProperty(hash, name); 6398 } 6399 6400 } 6401 6402 @Override 6403 public Base addChild(String name) throws FHIRException { 6404 if (name.equals("entityCodeableConcept")) { 6405 this.entity = new CodeableConcept(); 6406 return this.entity; 6407 } 6408 else if (name.equals("entityReference")) { 6409 this.entity = new Reference(); 6410 return this.entity; 6411 } 6412 else if (name.equals("identifier")) { 6413 this.identifier = new Identifier(); 6414 return this.identifier; 6415 } 6416 else if (name.equals("effectiveTime")) { 6417 throw new FHIRException("Cannot call addChild on a primitive type Contract.effectiveTime"); 6418 } 6419 else if (name.equals("quantity")) { 6420 this.quantity = new Quantity(); 6421 return this.quantity; 6422 } 6423 else if (name.equals("unitPrice")) { 6424 this.unitPrice = new Money(); 6425 return this.unitPrice; 6426 } 6427 else if (name.equals("factor")) { 6428 throw new FHIRException("Cannot call addChild on a primitive type Contract.factor"); 6429 } 6430 else if (name.equals("points")) { 6431 throw new FHIRException("Cannot call addChild on a primitive type Contract.points"); 6432 } 6433 else if (name.equals("net")) { 6434 this.net = new Money(); 6435 return this.net; 6436 } 6437 else if (name.equals("payment")) { 6438 throw new FHIRException("Cannot call addChild on a primitive type Contract.payment"); 6439 } 6440 else if (name.equals("paymentDate")) { 6441 throw new FHIRException("Cannot call addChild on a primitive type Contract.paymentDate"); 6442 } 6443 else if (name.equals("responsible")) { 6444 this.responsible = new Reference(); 6445 return this.responsible; 6446 } 6447 else if (name.equals("recipient")) { 6448 this.recipient = new Reference(); 6449 return this.recipient; 6450 } 6451 else if (name.equals("linkId")) { 6452 throw new FHIRException("Cannot call addChild on a primitive type Contract.linkId"); 6453 } 6454 else if (name.equals("securityLabelNumber")) { 6455 throw new FHIRException("Cannot call addChild on a primitive type Contract.securityLabelNumber"); 6456 } 6457 else 6458 return super.addChild(name); 6459 } 6460 6461 public ValuedItemComponent copy() { 6462 ValuedItemComponent dst = new ValuedItemComponent(); 6463 copyValues(dst); 6464 dst.entity = entity == null ? null : entity.copy(); 6465 dst.identifier = identifier == null ? null : identifier.copy(); 6466 dst.effectiveTime = effectiveTime == null ? null : effectiveTime.copy(); 6467 dst.quantity = quantity == null ? null : quantity.copy(); 6468 dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); 6469 dst.factor = factor == null ? null : factor.copy(); 6470 dst.points = points == null ? null : points.copy(); 6471 dst.net = net == null ? null : net.copy(); 6472 dst.payment = payment == null ? null : payment.copy(); 6473 dst.paymentDate = paymentDate == null ? null : paymentDate.copy(); 6474 dst.responsible = responsible == null ? null : responsible.copy(); 6475 dst.recipient = recipient == null ? null : recipient.copy(); 6476 if (linkId != null) { 6477 dst.linkId = new ArrayList<StringType>(); 6478 for (StringType i : linkId) 6479 dst.linkId.add(i.copy()); 6480 }; 6481 if (securityLabelNumber != null) { 6482 dst.securityLabelNumber = new ArrayList<UnsignedIntType>(); 6483 for (UnsignedIntType i : securityLabelNumber) 6484 dst.securityLabelNumber.add(i.copy()); 6485 }; 6486 return dst; 6487 } 6488 6489 @Override 6490 public boolean equalsDeep(Base other_) { 6491 if (!super.equalsDeep(other_)) 6492 return false; 6493 if (!(other_ instanceof ValuedItemComponent)) 6494 return false; 6495 ValuedItemComponent o = (ValuedItemComponent) other_; 6496 return compareDeep(entity, o.entity, true) && compareDeep(identifier, o.identifier, true) && compareDeep(effectiveTime, o.effectiveTime, true) 6497 && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) 6498 && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(payment, o.payment, true) 6499 && compareDeep(paymentDate, o.paymentDate, true) && compareDeep(responsible, o.responsible, true) 6500 && compareDeep(recipient, o.recipient, true) && compareDeep(linkId, o.linkId, true) && compareDeep(securityLabelNumber, o.securityLabelNumber, true) 6501 ; 6502 } 6503 6504 @Override 6505 public boolean equalsShallow(Base other_) { 6506 if (!super.equalsShallow(other_)) 6507 return false; 6508 if (!(other_ instanceof ValuedItemComponent)) 6509 return false; 6510 ValuedItemComponent o = (ValuedItemComponent) other_; 6511 return compareValues(effectiveTime, o.effectiveTime, true) && compareValues(factor, o.factor, true) 6512 && compareValues(points, o.points, true) && compareValues(payment, o.payment, true) && compareValues(paymentDate, o.paymentDate, true) 6513 && compareValues(linkId, o.linkId, true) && compareValues(securityLabelNumber, o.securityLabelNumber, true) 6514 ; 6515 } 6516 6517 public boolean isEmpty() { 6518 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(entity, identifier, effectiveTime 6519 , quantity, unitPrice, factor, points, net, payment, paymentDate, responsible 6520 , recipient, linkId, securityLabelNumber); 6521 } 6522 6523 public String fhirType() { 6524 return "Contract.term.asset.valuedItem"; 6525 6526 } 6527 6528 } 6529 6530 @Block() 6531 public static class ActionComponent extends BackboneElement implements IBaseBackboneElement { 6532 /** 6533 * True if the term prohibits the action. 6534 */ 6535 @Child(name = "doNotPerform", type = {BooleanType.class}, order=1, min=0, max=1, modifier=true, summary=false) 6536 @Description(shortDefinition="True if the term prohibits the action", formalDefinition="True if the term prohibits the action." ) 6537 protected BooleanType doNotPerform; 6538 6539 /** 6540 * Activity or service obligation to be done or not done, performed or not performed, effectuated or not by this Contract term. 6541 */ 6542 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false) 6543 @Description(shortDefinition="Type or form of the action", formalDefinition="Activity or service obligation to be done or not done, performed or not performed, effectuated or not by this Contract term." ) 6544 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-action") 6545 protected CodeableConcept type; 6546 6547 /** 6548 * Entity of the action. 6549 */ 6550 @Child(name = "subject", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6551 @Description(shortDefinition="Entity of the action", formalDefinition="Entity of the action." ) 6552 protected List<ActionSubjectComponent> subject; 6553 6554 /** 6555 * Reason or purpose for the action stipulated by this Contract Provision. 6556 */ 6557 @Child(name = "intent", type = {CodeableConcept.class}, order=4, min=1, max=1, modifier=false, summary=false) 6558 @Description(shortDefinition="Purpose for the Contract Term Action", formalDefinition="Reason or purpose for the action stipulated by this Contract Provision." ) 6559 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-PurposeOfUse") 6560 protected CodeableConcept intent; 6561 6562 /** 6563 * Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse. 6564 */ 6565 @Child(name = "linkId", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6566 @Description(shortDefinition="Pointer to specific item", formalDefinition="Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse." ) 6567 protected List<StringType> linkId; 6568 6569 /** 6570 * Current state of the term action. 6571 */ 6572 @Child(name = "status", type = {CodeableConcept.class}, order=6, min=1, max=1, modifier=false, summary=false) 6573 @Description(shortDefinition="State of the action", formalDefinition="Current state of the term action." ) 6574 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-actionstatus") 6575 protected CodeableConcept status; 6576 6577 /** 6578 * Encounter or Episode with primary association to specified term activity. 6579 */ 6580 @Child(name = "context", type = {Encounter.class, EpisodeOfCare.class}, order=7, min=0, max=1, modifier=false, summary=false) 6581 @Description(shortDefinition="Episode associated with action", formalDefinition="Encounter or Episode with primary association to specified term activity." ) 6582 protected Reference context; 6583 6584 /** 6585 * The actual object that is the target of the reference (Encounter or Episode with primary association to specified term activity.) 6586 */ 6587 protected Resource contextTarget; 6588 6589 /** 6590 * Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse. 6591 */ 6592 @Child(name = "contextLinkId", type = {StringType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6593 @Description(shortDefinition="Pointer to specific item", formalDefinition="Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse." ) 6594 protected List<StringType> contextLinkId; 6595 6596 /** 6597 * When action happens. 6598 */ 6599 @Child(name = "occurrence", type = {DateTimeType.class, Period.class, Timing.class}, order=9, min=0, max=1, modifier=false, summary=false) 6600 @Description(shortDefinition="When action happens", formalDefinition="When action happens." ) 6601 protected Type occurrence; 6602 6603 /** 6604 * Who or what initiated the action and has responsibility for its activation. 6605 */ 6606 @Child(name = "requester", type = {Patient.class, Person.class, RelatedPerson.class, Practitioner.class, Device.class, Group.class, Organization.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6607 @Description(shortDefinition="Who asked for action", formalDefinition="Who or what initiated the action and has responsibility for its activation." ) 6608 protected List<Reference> requester; 6609 /** 6610 * The actual objects that are the target of the reference (Who or what initiated the action and has responsibility for its activation.) 6611 */ 6612 protected List<Resource> requesterTarget; 6613 6614 6615 /** 6616 * Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse. 6617 */ 6618 @Child(name = "requesterLinkId", type = {StringType.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6619 @Description(shortDefinition="Pointer to specific item", formalDefinition="Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse." ) 6620 protected List<StringType> requesterLinkId; 6621 6622 /** 6623 * The type of individual that is desired or required to perform or not perform the action. 6624 */ 6625 @Child(name = "performerType", type = {CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6626 @Description(shortDefinition="Kind of service performer", formalDefinition="The type of individual that is desired or required to perform or not perform the action." ) 6627 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/provenance-agent-type") 6628 protected List<CodeableConcept> performerType; 6629 6630 /** 6631 * The type of role or competency of an individual desired or required to perform or not perform the action. 6632 */ 6633 @Child(name = "performerRole", type = {CodeableConcept.class}, order=13, min=0, max=1, modifier=false, summary=false) 6634 @Description(shortDefinition="Competency of the performer", formalDefinition="The type of role or competency of an individual desired or required to perform or not perform the action." ) 6635 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/provenance-agent-role") 6636 protected CodeableConcept performerRole; 6637 6638 /** 6639 * Indicates who or what is being asked to perform (or not perform) the ction. 6640 */ 6641 @Child(name = "performer", type = {Person.class, RelatedPerson.class, Patient.class, Practitioner.class, PractitionerRole.class, CareTeam.class, Device.class, Substance.class, Organization.class, Location.class}, order=14, min=0, max=1, modifier=false, summary=false) 6642 @Description(shortDefinition="Actor that wil execute (or not) the action", formalDefinition="Indicates who or what is being asked to perform (or not perform) the ction." ) 6643 protected Reference performer; 6644 6645 /** 6646 * The actual object that is the target of the reference (Indicates who or what is being asked to perform (or not perform) the ction.) 6647 */ 6648 protected Resource performerTarget; 6649 6650 /** 6651 * Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse. 6652 */ 6653 @Child(name = "performerLinkId", type = {StringType.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6654 @Description(shortDefinition="Pointer to specific item", formalDefinition="Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse." ) 6655 protected List<StringType> performerLinkId; 6656 6657 /** 6658 * Rationale for the action to be performed or not performed. Describes why the action is permitted or prohibited. 6659 */ 6660 @Child(name = "reasonCode", type = {CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6661 @Description(shortDefinition="Why is action (not) needed?", formalDefinition="Rationale for the action to be performed or not performed. Describes why the action is permitted or prohibited." ) 6662 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-PurposeOfUse") 6663 protected List<CodeableConcept> reasonCode; 6664 6665 /** 6666 * Indicates another resource whose existence justifies permitting or not permitting this action. 6667 */ 6668 @Child(name = "reasonReference", type = {Condition.class, Observation.class, DiagnosticReport.class, DocumentReference.class, Questionnaire.class, QuestionnaireResponse.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6669 @Description(shortDefinition="Why is action (not) needed?", formalDefinition="Indicates another resource whose existence justifies permitting or not permitting this action." ) 6670 protected List<Reference> reasonReference; 6671 /** 6672 * The actual objects that are the target of the reference (Indicates another resource whose existence justifies permitting or not permitting this action.) 6673 */ 6674 protected List<Resource> reasonReferenceTarget; 6675 6676 6677 /** 6678 * Describes why the action is to be performed or not performed in textual form. 6679 */ 6680 @Child(name = "reason", type = {StringType.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6681 @Description(shortDefinition="Why action is to be performed", formalDefinition="Describes why the action is to be performed or not performed in textual form." ) 6682 protected List<StringType> reason; 6683 6684 /** 6685 * Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse. 6686 */ 6687 @Child(name = "reasonLinkId", type = {StringType.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6688 @Description(shortDefinition="Pointer to specific item", formalDefinition="Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse." ) 6689 protected List<StringType> reasonLinkId; 6690 6691 /** 6692 * Comments made about the term action made by the requester, performer, subject or other participants. 6693 */ 6694 @Child(name = "note", type = {Annotation.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6695 @Description(shortDefinition="Comments about the action", formalDefinition="Comments made about the term action made by the requester, performer, subject or other participants." ) 6696 protected List<Annotation> note; 6697 6698 /** 6699 * Security labels that protects the action. 6700 */ 6701 @Child(name = "securityLabelNumber", type = {UnsignedIntType.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6702 @Description(shortDefinition="Action restriction numbers", formalDefinition="Security labels that protects the action." ) 6703 protected List<UnsignedIntType> securityLabelNumber; 6704 6705 private static final long serialVersionUID = -178728180L; 6706 6707 /** 6708 * Constructor 6709 */ 6710 public ActionComponent() { 6711 super(); 6712 } 6713 6714 /** 6715 * Constructor 6716 */ 6717 public ActionComponent(CodeableConcept type, CodeableConcept intent, CodeableConcept status) { 6718 super(); 6719 this.type = type; 6720 this.intent = intent; 6721 this.status = status; 6722 } 6723 6724 /** 6725 * @return {@link #doNotPerform} (True if the term prohibits the action.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value 6726 */ 6727 public BooleanType getDoNotPerformElement() { 6728 if (this.doNotPerform == null) 6729 if (Configuration.errorOnAutoCreate()) 6730 throw new Error("Attempt to auto-create ActionComponent.doNotPerform"); 6731 else if (Configuration.doAutoCreate()) 6732 this.doNotPerform = new BooleanType(); // bb 6733 return this.doNotPerform; 6734 } 6735 6736 public boolean hasDoNotPerformElement() { 6737 return this.doNotPerform != null && !this.doNotPerform.isEmpty(); 6738 } 6739 6740 public boolean hasDoNotPerform() { 6741 return this.doNotPerform != null && !this.doNotPerform.isEmpty(); 6742 } 6743 6744 /** 6745 * @param value {@link #doNotPerform} (True if the term prohibits the action.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value 6746 */ 6747 public ActionComponent setDoNotPerformElement(BooleanType value) { 6748 this.doNotPerform = value; 6749 return this; 6750 } 6751 6752 /** 6753 * @return True if the term prohibits the action. 6754 */ 6755 public boolean getDoNotPerform() { 6756 return this.doNotPerform == null || this.doNotPerform.isEmpty() ? false : this.doNotPerform.getValue(); 6757 } 6758 6759 /** 6760 * @param value True if the term prohibits the action. 6761 */ 6762 public ActionComponent setDoNotPerform(boolean value) { 6763 if (this.doNotPerform == null) 6764 this.doNotPerform = new BooleanType(); 6765 this.doNotPerform.setValue(value); 6766 return this; 6767 } 6768 6769 /** 6770 * @return {@link #type} (Activity or service obligation to be done or not done, performed or not performed, effectuated or not by this Contract term.) 6771 */ 6772 public CodeableConcept getType() { 6773 if (this.type == null) 6774 if (Configuration.errorOnAutoCreate()) 6775 throw new Error("Attempt to auto-create ActionComponent.type"); 6776 else if (Configuration.doAutoCreate()) 6777 this.type = new CodeableConcept(); // cc 6778 return this.type; 6779 } 6780 6781 public boolean hasType() { 6782 return this.type != null && !this.type.isEmpty(); 6783 } 6784 6785 /** 6786 * @param value {@link #type} (Activity or service obligation to be done or not done, performed or not performed, effectuated or not by this Contract term.) 6787 */ 6788 public ActionComponent setType(CodeableConcept value) { 6789 this.type = value; 6790 return this; 6791 } 6792 6793 /** 6794 * @return {@link #subject} (Entity of the action.) 6795 */ 6796 public List<ActionSubjectComponent> getSubject() { 6797 if (this.subject == null) 6798 this.subject = new ArrayList<ActionSubjectComponent>(); 6799 return this.subject; 6800 } 6801 6802 /** 6803 * @return Returns a reference to <code>this</code> for easy method chaining 6804 */ 6805 public ActionComponent setSubject(List<ActionSubjectComponent> theSubject) { 6806 this.subject = theSubject; 6807 return this; 6808 } 6809 6810 public boolean hasSubject() { 6811 if (this.subject == null) 6812 return false; 6813 for (ActionSubjectComponent item : this.subject) 6814 if (!item.isEmpty()) 6815 return true; 6816 return false; 6817 } 6818 6819 public ActionSubjectComponent addSubject() { //3 6820 ActionSubjectComponent t = new ActionSubjectComponent(); 6821 if (this.subject == null) 6822 this.subject = new ArrayList<ActionSubjectComponent>(); 6823 this.subject.add(t); 6824 return t; 6825 } 6826 6827 public ActionComponent addSubject(ActionSubjectComponent t) { //3 6828 if (t == null) 6829 return this; 6830 if (this.subject == null) 6831 this.subject = new ArrayList<ActionSubjectComponent>(); 6832 this.subject.add(t); 6833 return this; 6834 } 6835 6836 /** 6837 * @return The first repetition of repeating field {@link #subject}, creating it if it does not already exist 6838 */ 6839 public ActionSubjectComponent getSubjectFirstRep() { 6840 if (getSubject().isEmpty()) { 6841 addSubject(); 6842 } 6843 return getSubject().get(0); 6844 } 6845 6846 /** 6847 * @return {@link #intent} (Reason or purpose for the action stipulated by this Contract Provision.) 6848 */ 6849 public CodeableConcept getIntent() { 6850 if (this.intent == null) 6851 if (Configuration.errorOnAutoCreate()) 6852 throw new Error("Attempt to auto-create ActionComponent.intent"); 6853 else if (Configuration.doAutoCreate()) 6854 this.intent = new CodeableConcept(); // cc 6855 return this.intent; 6856 } 6857 6858 public boolean hasIntent() { 6859 return this.intent != null && !this.intent.isEmpty(); 6860 } 6861 6862 /** 6863 * @param value {@link #intent} (Reason or purpose for the action stipulated by this Contract Provision.) 6864 */ 6865 public ActionComponent setIntent(CodeableConcept value) { 6866 this.intent = value; 6867 return this; 6868 } 6869 6870 /** 6871 * @return {@link #linkId} (Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.) 6872 */ 6873 public List<StringType> getLinkId() { 6874 if (this.linkId == null) 6875 this.linkId = new ArrayList<StringType>(); 6876 return this.linkId; 6877 } 6878 6879 /** 6880 * @return Returns a reference to <code>this</code> for easy method chaining 6881 */ 6882 public ActionComponent setLinkId(List<StringType> theLinkId) { 6883 this.linkId = theLinkId; 6884 return this; 6885 } 6886 6887 public boolean hasLinkId() { 6888 if (this.linkId == null) 6889 return false; 6890 for (StringType item : this.linkId) 6891 if (!item.isEmpty()) 6892 return true; 6893 return false; 6894 } 6895 6896 /** 6897 * @return {@link #linkId} (Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.) 6898 */ 6899 public StringType addLinkIdElement() {//2 6900 StringType t = new StringType(); 6901 if (this.linkId == null) 6902 this.linkId = new ArrayList<StringType>(); 6903 this.linkId.add(t); 6904 return t; 6905 } 6906 6907 /** 6908 * @param value {@link #linkId} (Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.) 6909 */ 6910 public ActionComponent addLinkId(String value) { //1 6911 StringType t = new StringType(); 6912 t.setValue(value); 6913 if (this.linkId == null) 6914 this.linkId = new ArrayList<StringType>(); 6915 this.linkId.add(t); 6916 return this; 6917 } 6918 6919 /** 6920 * @param value {@link #linkId} (Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.) 6921 */ 6922 public boolean hasLinkId(String value) { 6923 if (this.linkId == null) 6924 return false; 6925 for (StringType v : this.linkId) 6926 if (v.getValue().equals(value)) // string 6927 return true; 6928 return false; 6929 } 6930 6931 /** 6932 * @return {@link #status} (Current state of the term action.) 6933 */ 6934 public CodeableConcept getStatus() { 6935 if (this.status == null) 6936 if (Configuration.errorOnAutoCreate()) 6937 throw new Error("Attempt to auto-create ActionComponent.status"); 6938 else if (Configuration.doAutoCreate()) 6939 this.status = new CodeableConcept(); // cc 6940 return this.status; 6941 } 6942 6943 public boolean hasStatus() { 6944 return this.status != null && !this.status.isEmpty(); 6945 } 6946 6947 /** 6948 * @param value {@link #status} (Current state of the term action.) 6949 */ 6950 public ActionComponent setStatus(CodeableConcept value) { 6951 this.status = value; 6952 return this; 6953 } 6954 6955 /** 6956 * @return {@link #context} (Encounter or Episode with primary association to specified term activity.) 6957 */ 6958 public Reference getContext() { 6959 if (this.context == null) 6960 if (Configuration.errorOnAutoCreate()) 6961 throw new Error("Attempt to auto-create ActionComponent.context"); 6962 else if (Configuration.doAutoCreate()) 6963 this.context = new Reference(); // cc 6964 return this.context; 6965 } 6966 6967 public boolean hasContext() { 6968 return this.context != null && !this.context.isEmpty(); 6969 } 6970 6971 /** 6972 * @param value {@link #context} (Encounter or Episode with primary association to specified term activity.) 6973 */ 6974 public ActionComponent setContext(Reference value) { 6975 this.context = value; 6976 return this; 6977 } 6978 6979 /** 6980 * @return {@link #context} 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. (Encounter or Episode with primary association to specified term activity.) 6981 */ 6982 public Resource getContextTarget() { 6983 return this.contextTarget; 6984 } 6985 6986 /** 6987 * @param value {@link #context} 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. (Encounter or Episode with primary association to specified term activity.) 6988 */ 6989 public ActionComponent setContextTarget(Resource value) { 6990 this.contextTarget = value; 6991 return this; 6992 } 6993 6994 /** 6995 * @return {@link #contextLinkId} (Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.) 6996 */ 6997 public List<StringType> getContextLinkId() { 6998 if (this.contextLinkId == null) 6999 this.contextLinkId = new ArrayList<StringType>(); 7000 return this.contextLinkId; 7001 } 7002 7003 /** 7004 * @return Returns a reference to <code>this</code> for easy method chaining 7005 */ 7006 public ActionComponent setContextLinkId(List<StringType> theContextLinkId) { 7007 this.contextLinkId = theContextLinkId; 7008 return this; 7009 } 7010 7011 public boolean hasContextLinkId() { 7012 if (this.contextLinkId == null) 7013 return false; 7014 for (StringType item : this.contextLinkId) 7015 if (!item.isEmpty()) 7016 return true; 7017 return false; 7018 } 7019 7020 /** 7021 * @return {@link #contextLinkId} (Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.) 7022 */ 7023 public StringType addContextLinkIdElement() {//2 7024 StringType t = new StringType(); 7025 if (this.contextLinkId == null) 7026 this.contextLinkId = new ArrayList<StringType>(); 7027 this.contextLinkId.add(t); 7028 return t; 7029 } 7030 7031 /** 7032 * @param value {@link #contextLinkId} (Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.) 7033 */ 7034 public ActionComponent addContextLinkId(String value) { //1 7035 StringType t = new StringType(); 7036 t.setValue(value); 7037 if (this.contextLinkId == null) 7038 this.contextLinkId = new ArrayList<StringType>(); 7039 this.contextLinkId.add(t); 7040 return this; 7041 } 7042 7043 /** 7044 * @param value {@link #contextLinkId} (Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.) 7045 */ 7046 public boolean hasContextLinkId(String value) { 7047 if (this.contextLinkId == null) 7048 return false; 7049 for (StringType v : this.contextLinkId) 7050 if (v.getValue().equals(value)) // string 7051 return true; 7052 return false; 7053 } 7054 7055 /** 7056 * @return {@link #occurrence} (When action happens.) 7057 */ 7058 public Type getOccurrence() { 7059 return this.occurrence; 7060 } 7061 7062 /** 7063 * @return {@link #occurrence} (When action happens.) 7064 */ 7065 public DateTimeType getOccurrenceDateTimeType() throws FHIRException { 7066 if (this.occurrence == null) 7067 return null; 7068 if (!(this.occurrence instanceof DateTimeType)) 7069 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 7070 return (DateTimeType) this.occurrence; 7071 } 7072 7073 public boolean hasOccurrenceDateTimeType() { 7074 return this != null && this.occurrence instanceof DateTimeType; 7075 } 7076 7077 /** 7078 * @return {@link #occurrence} (When action happens.) 7079 */ 7080 public Period getOccurrencePeriod() throws FHIRException { 7081 if (this.occurrence == null) 7082 return null; 7083 if (!(this.occurrence instanceof Period)) 7084 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 7085 return (Period) this.occurrence; 7086 } 7087 7088 public boolean hasOccurrencePeriod() { 7089 return this != null && this.occurrence instanceof Period; 7090 } 7091 7092 /** 7093 * @return {@link #occurrence} (When action happens.) 7094 */ 7095 public Timing getOccurrenceTiming() throws FHIRException { 7096 if (this.occurrence == null) 7097 return null; 7098 if (!(this.occurrence instanceof Timing)) 7099 throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 7100 return (Timing) this.occurrence; 7101 } 7102 7103 public boolean hasOccurrenceTiming() { 7104 return this != null && this.occurrence instanceof Timing; 7105 } 7106 7107 public boolean hasOccurrence() { 7108 return this.occurrence != null && !this.occurrence.isEmpty(); 7109 } 7110 7111 /** 7112 * @param value {@link #occurrence} (When action happens.) 7113 */ 7114 public ActionComponent setOccurrence(Type value) { 7115 if (value != null && !(value instanceof DateTimeType || value instanceof Period || value instanceof Timing)) 7116 throw new Error("Not the right type for Contract.term.action.occurrence[x]: "+value.fhirType()); 7117 this.occurrence = value; 7118 return this; 7119 } 7120 7121 /** 7122 * @return {@link #requester} (Who or what initiated the action and has responsibility for its activation.) 7123 */ 7124 public List<Reference> getRequester() { 7125 if (this.requester == null) 7126 this.requester = new ArrayList<Reference>(); 7127 return this.requester; 7128 } 7129 7130 /** 7131 * @return Returns a reference to <code>this</code> for easy method chaining 7132 */ 7133 public ActionComponent setRequester(List<Reference> theRequester) { 7134 this.requester = theRequester; 7135 return this; 7136 } 7137 7138 public boolean hasRequester() { 7139 if (this.requester == null) 7140 return false; 7141 for (Reference item : this.requester) 7142 if (!item.isEmpty()) 7143 return true; 7144 return false; 7145 } 7146 7147 public Reference addRequester() { //3 7148 Reference t = new Reference(); 7149 if (this.requester == null) 7150 this.requester = new ArrayList<Reference>(); 7151 this.requester.add(t); 7152 return t; 7153 } 7154 7155 public ActionComponent addRequester(Reference t) { //3 7156 if (t == null) 7157 return this; 7158 if (this.requester == null) 7159 this.requester = new ArrayList<Reference>(); 7160 this.requester.add(t); 7161 return this; 7162 } 7163 7164 /** 7165 * @return The first repetition of repeating field {@link #requester}, creating it if it does not already exist 7166 */ 7167 public Reference getRequesterFirstRep() { 7168 if (getRequester().isEmpty()) { 7169 addRequester(); 7170 } 7171 return getRequester().get(0); 7172 } 7173 7174 /** 7175 * @deprecated Use Reference#setResource(IBaseResource) instead 7176 */ 7177 @Deprecated 7178 public List<Resource> getRequesterTarget() { 7179 if (this.requesterTarget == null) 7180 this.requesterTarget = new ArrayList<Resource>(); 7181 return this.requesterTarget; 7182 } 7183 7184 /** 7185 * @return {@link #requesterLinkId} (Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.) 7186 */ 7187 public List<StringType> getRequesterLinkId() { 7188 if (this.requesterLinkId == null) 7189 this.requesterLinkId = new ArrayList<StringType>(); 7190 return this.requesterLinkId; 7191 } 7192 7193 /** 7194 * @return Returns a reference to <code>this</code> for easy method chaining 7195 */ 7196 public ActionComponent setRequesterLinkId(List<StringType> theRequesterLinkId) { 7197 this.requesterLinkId = theRequesterLinkId; 7198 return this; 7199 } 7200 7201 public boolean hasRequesterLinkId() { 7202 if (this.requesterLinkId == null) 7203 return false; 7204 for (StringType item : this.requesterLinkId) 7205 if (!item.isEmpty()) 7206 return true; 7207 return false; 7208 } 7209 7210 /** 7211 * @return {@link #requesterLinkId} (Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.) 7212 */ 7213 public StringType addRequesterLinkIdElement() {//2 7214 StringType t = new StringType(); 7215 if (this.requesterLinkId == null) 7216 this.requesterLinkId = new ArrayList<StringType>(); 7217 this.requesterLinkId.add(t); 7218 return t; 7219 } 7220 7221 /** 7222 * @param value {@link #requesterLinkId} (Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.) 7223 */ 7224 public ActionComponent addRequesterLinkId(String value) { //1 7225 StringType t = new StringType(); 7226 t.setValue(value); 7227 if (this.requesterLinkId == null) 7228 this.requesterLinkId = new ArrayList<StringType>(); 7229 this.requesterLinkId.add(t); 7230 return this; 7231 } 7232 7233 /** 7234 * @param value {@link #requesterLinkId} (Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.) 7235 */ 7236 public boolean hasRequesterLinkId(String value) { 7237 if (this.requesterLinkId == null) 7238 return false; 7239 for (StringType v : this.requesterLinkId) 7240 if (v.getValue().equals(value)) // string 7241 return true; 7242 return false; 7243 } 7244 7245 /** 7246 * @return {@link #performerType} (The type of individual that is desired or required to perform or not perform the action.) 7247 */ 7248 public List<CodeableConcept> getPerformerType() { 7249 if (this.performerType == null) 7250 this.performerType = new ArrayList<CodeableConcept>(); 7251 return this.performerType; 7252 } 7253 7254 /** 7255 * @return Returns a reference to <code>this</code> for easy method chaining 7256 */ 7257 public ActionComponent setPerformerType(List<CodeableConcept> thePerformerType) { 7258 this.performerType = thePerformerType; 7259 return this; 7260 } 7261 7262 public boolean hasPerformerType() { 7263 if (this.performerType == null) 7264 return false; 7265 for (CodeableConcept item : this.performerType) 7266 if (!item.isEmpty()) 7267 return true; 7268 return false; 7269 } 7270 7271 public CodeableConcept addPerformerType() { //3 7272 CodeableConcept t = new CodeableConcept(); 7273 if (this.performerType == null) 7274 this.performerType = new ArrayList<CodeableConcept>(); 7275 this.performerType.add(t); 7276 return t; 7277 } 7278 7279 public ActionComponent addPerformerType(CodeableConcept t) { //3 7280 if (t == null) 7281 return this; 7282 if (this.performerType == null) 7283 this.performerType = new ArrayList<CodeableConcept>(); 7284 this.performerType.add(t); 7285 return this; 7286 } 7287 7288 /** 7289 * @return The first repetition of repeating field {@link #performerType}, creating it if it does not already exist 7290 */ 7291 public CodeableConcept getPerformerTypeFirstRep() { 7292 if (getPerformerType().isEmpty()) { 7293 addPerformerType(); 7294 } 7295 return getPerformerType().get(0); 7296 } 7297 7298 /** 7299 * @return {@link #performerRole} (The type of role or competency of an individual desired or required to perform or not perform the action.) 7300 */ 7301 public CodeableConcept getPerformerRole() { 7302 if (this.performerRole == null) 7303 if (Configuration.errorOnAutoCreate()) 7304 throw new Error("Attempt to auto-create ActionComponent.performerRole"); 7305 else if (Configuration.doAutoCreate()) 7306 this.performerRole = new CodeableConcept(); // cc 7307 return this.performerRole; 7308 } 7309 7310 public boolean hasPerformerRole() { 7311 return this.performerRole != null && !this.performerRole.isEmpty(); 7312 } 7313 7314 /** 7315 * @param value {@link #performerRole} (The type of role or competency of an individual desired or required to perform or not perform the action.) 7316 */ 7317 public ActionComponent setPerformerRole(CodeableConcept value) { 7318 this.performerRole = value; 7319 return this; 7320 } 7321 7322 /** 7323 * @return {@link #performer} (Indicates who or what is being asked to perform (or not perform) the ction.) 7324 */ 7325 public Reference getPerformer() { 7326 if (this.performer == null) 7327 if (Configuration.errorOnAutoCreate()) 7328 throw new Error("Attempt to auto-create ActionComponent.performer"); 7329 else if (Configuration.doAutoCreate()) 7330 this.performer = new Reference(); // cc 7331 return this.performer; 7332 } 7333 7334 public boolean hasPerformer() { 7335 return this.performer != null && !this.performer.isEmpty(); 7336 } 7337 7338 /** 7339 * @param value {@link #performer} (Indicates who or what is being asked to perform (or not perform) the ction.) 7340 */ 7341 public ActionComponent setPerformer(Reference value) { 7342 this.performer = value; 7343 return this; 7344 } 7345 7346 /** 7347 * @return {@link #performer} 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. (Indicates who or what is being asked to perform (or not perform) the ction.) 7348 */ 7349 public Resource getPerformerTarget() { 7350 return this.performerTarget; 7351 } 7352 7353 /** 7354 * @param value {@link #performer} 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. (Indicates who or what is being asked to perform (or not perform) the ction.) 7355 */ 7356 public ActionComponent setPerformerTarget(Resource value) { 7357 this.performerTarget = value; 7358 return this; 7359 } 7360 7361 /** 7362 * @return {@link #performerLinkId} (Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.) 7363 */ 7364 public List<StringType> getPerformerLinkId() { 7365 if (this.performerLinkId == null) 7366 this.performerLinkId = new ArrayList<StringType>(); 7367 return this.performerLinkId; 7368 } 7369 7370 /** 7371 * @return Returns a reference to <code>this</code> for easy method chaining 7372 */ 7373 public ActionComponent setPerformerLinkId(List<StringType> thePerformerLinkId) { 7374 this.performerLinkId = thePerformerLinkId; 7375 return this; 7376 } 7377 7378 public boolean hasPerformerLinkId() { 7379 if (this.performerLinkId == null) 7380 return false; 7381 for (StringType item : this.performerLinkId) 7382 if (!item.isEmpty()) 7383 return true; 7384 return false; 7385 } 7386 7387 /** 7388 * @return {@link #performerLinkId} (Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.) 7389 */ 7390 public StringType addPerformerLinkIdElement() {//2 7391 StringType t = new StringType(); 7392 if (this.performerLinkId == null) 7393 this.performerLinkId = new ArrayList<StringType>(); 7394 this.performerLinkId.add(t); 7395 return t; 7396 } 7397 7398 /** 7399 * @param value {@link #performerLinkId} (Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.) 7400 */ 7401 public ActionComponent addPerformerLinkId(String value) { //1 7402 StringType t = new StringType(); 7403 t.setValue(value); 7404 if (this.performerLinkId == null) 7405 this.performerLinkId = new ArrayList<StringType>(); 7406 this.performerLinkId.add(t); 7407 return this; 7408 } 7409 7410 /** 7411 * @param value {@link #performerLinkId} (Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.) 7412 */ 7413 public boolean hasPerformerLinkId(String value) { 7414 if (this.performerLinkId == null) 7415 return false; 7416 for (StringType v : this.performerLinkId) 7417 if (v.getValue().equals(value)) // string 7418 return true; 7419 return false; 7420 } 7421 7422 /** 7423 * @return {@link #reasonCode} (Rationale for the action to be performed or not performed. Describes why the action is permitted or prohibited.) 7424 */ 7425 public List<CodeableConcept> getReasonCode() { 7426 if (this.reasonCode == null) 7427 this.reasonCode = new ArrayList<CodeableConcept>(); 7428 return this.reasonCode; 7429 } 7430 7431 /** 7432 * @return Returns a reference to <code>this</code> for easy method chaining 7433 */ 7434 public ActionComponent setReasonCode(List<CodeableConcept> theReasonCode) { 7435 this.reasonCode = theReasonCode; 7436 return this; 7437 } 7438 7439 public boolean hasReasonCode() { 7440 if (this.reasonCode == null) 7441 return false; 7442 for (CodeableConcept item : this.reasonCode) 7443 if (!item.isEmpty()) 7444 return true; 7445 return false; 7446 } 7447 7448 public CodeableConcept addReasonCode() { //3 7449 CodeableConcept t = new CodeableConcept(); 7450 if (this.reasonCode == null) 7451 this.reasonCode = new ArrayList<CodeableConcept>(); 7452 this.reasonCode.add(t); 7453 return t; 7454 } 7455 7456 public ActionComponent addReasonCode(CodeableConcept t) { //3 7457 if (t == null) 7458 return this; 7459 if (this.reasonCode == null) 7460 this.reasonCode = new ArrayList<CodeableConcept>(); 7461 this.reasonCode.add(t); 7462 return this; 7463 } 7464 7465 /** 7466 * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist 7467 */ 7468 public CodeableConcept getReasonCodeFirstRep() { 7469 if (getReasonCode().isEmpty()) { 7470 addReasonCode(); 7471 } 7472 return getReasonCode().get(0); 7473 } 7474 7475 /** 7476 * @return {@link #reasonReference} (Indicates another resource whose existence justifies permitting or not permitting this action.) 7477 */ 7478 public List<Reference> getReasonReference() { 7479 if (this.reasonReference == null) 7480 this.reasonReference = new ArrayList<Reference>(); 7481 return this.reasonReference; 7482 } 7483 7484 /** 7485 * @return Returns a reference to <code>this</code> for easy method chaining 7486 */ 7487 public ActionComponent setReasonReference(List<Reference> theReasonReference) { 7488 this.reasonReference = theReasonReference; 7489 return this; 7490 } 7491 7492 public boolean hasReasonReference() { 7493 if (this.reasonReference == null) 7494 return false; 7495 for (Reference item : this.reasonReference) 7496 if (!item.isEmpty()) 7497 return true; 7498 return false; 7499 } 7500 7501 public Reference addReasonReference() { //3 7502 Reference t = new Reference(); 7503 if (this.reasonReference == null) 7504 this.reasonReference = new ArrayList<Reference>(); 7505 this.reasonReference.add(t); 7506 return t; 7507 } 7508 7509 public ActionComponent addReasonReference(Reference t) { //3 7510 if (t == null) 7511 return this; 7512 if (this.reasonReference == null) 7513 this.reasonReference = new ArrayList<Reference>(); 7514 this.reasonReference.add(t); 7515 return this; 7516 } 7517 7518 /** 7519 * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist 7520 */ 7521 public Reference getReasonReferenceFirstRep() { 7522 if (getReasonReference().isEmpty()) { 7523 addReasonReference(); 7524 } 7525 return getReasonReference().get(0); 7526 } 7527 7528 /** 7529 * @deprecated Use Reference#setResource(IBaseResource) instead 7530 */ 7531 @Deprecated 7532 public List<Resource> getReasonReferenceTarget() { 7533 if (this.reasonReferenceTarget == null) 7534 this.reasonReferenceTarget = new ArrayList<Resource>(); 7535 return this.reasonReferenceTarget; 7536 } 7537 7538 /** 7539 * @return {@link #reason} (Describes why the action is to be performed or not performed in textual form.) 7540 */ 7541 public List<StringType> getReason() { 7542 if (this.reason == null) 7543 this.reason = new ArrayList<StringType>(); 7544 return this.reason; 7545 } 7546 7547 /** 7548 * @return Returns a reference to <code>this</code> for easy method chaining 7549 */ 7550 public ActionComponent setReason(List<StringType> theReason) { 7551 this.reason = theReason; 7552 return this; 7553 } 7554 7555 public boolean hasReason() { 7556 if (this.reason == null) 7557 return false; 7558 for (StringType item : this.reason) 7559 if (!item.isEmpty()) 7560 return true; 7561 return false; 7562 } 7563 7564 /** 7565 * @return {@link #reason} (Describes why the action is to be performed or not performed in textual form.) 7566 */ 7567 public StringType addReasonElement() {//2 7568 StringType t = new StringType(); 7569 if (this.reason == null) 7570 this.reason = new ArrayList<StringType>(); 7571 this.reason.add(t); 7572 return t; 7573 } 7574 7575 /** 7576 * @param value {@link #reason} (Describes why the action is to be performed or not performed in textual form.) 7577 */ 7578 public ActionComponent addReason(String value) { //1 7579 StringType t = new StringType(); 7580 t.setValue(value); 7581 if (this.reason == null) 7582 this.reason = new ArrayList<StringType>(); 7583 this.reason.add(t); 7584 return this; 7585 } 7586 7587 /** 7588 * @param value {@link #reason} (Describes why the action is to be performed or not performed in textual form.) 7589 */ 7590 public boolean hasReason(String value) { 7591 if (this.reason == null) 7592 return false; 7593 for (StringType v : this.reason) 7594 if (v.getValue().equals(value)) // string 7595 return true; 7596 return false; 7597 } 7598 7599 /** 7600 * @return {@link #reasonLinkId} (Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.) 7601 */ 7602 public List<StringType> getReasonLinkId() { 7603 if (this.reasonLinkId == null) 7604 this.reasonLinkId = new ArrayList<StringType>(); 7605 return this.reasonLinkId; 7606 } 7607 7608 /** 7609 * @return Returns a reference to <code>this</code> for easy method chaining 7610 */ 7611 public ActionComponent setReasonLinkId(List<StringType> theReasonLinkId) { 7612 this.reasonLinkId = theReasonLinkId; 7613 return this; 7614 } 7615 7616 public boolean hasReasonLinkId() { 7617 if (this.reasonLinkId == null) 7618 return false; 7619 for (StringType item : this.reasonLinkId) 7620 if (!item.isEmpty()) 7621 return true; 7622 return false; 7623 } 7624 7625 /** 7626 * @return {@link #reasonLinkId} (Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.) 7627 */ 7628 public StringType addReasonLinkIdElement() {//2 7629 StringType t = new StringType(); 7630 if (this.reasonLinkId == null) 7631 this.reasonLinkId = new ArrayList<StringType>(); 7632 this.reasonLinkId.add(t); 7633 return t; 7634 } 7635 7636 /** 7637 * @param value {@link #reasonLinkId} (Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.) 7638 */ 7639 public ActionComponent addReasonLinkId(String value) { //1 7640 StringType t = new StringType(); 7641 t.setValue(value); 7642 if (this.reasonLinkId == null) 7643 this.reasonLinkId = new ArrayList<StringType>(); 7644 this.reasonLinkId.add(t); 7645 return this; 7646 } 7647 7648 /** 7649 * @param value {@link #reasonLinkId} (Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.) 7650 */ 7651 public boolean hasReasonLinkId(String value) { 7652 if (this.reasonLinkId == null) 7653 return false; 7654 for (StringType v : this.reasonLinkId) 7655 if (v.getValue().equals(value)) // string 7656 return true; 7657 return false; 7658 } 7659 7660 /** 7661 * @return {@link #note} (Comments made about the term action made by the requester, performer, subject or other participants.) 7662 */ 7663 public List<Annotation> getNote() { 7664 if (this.note == null) 7665 this.note = new ArrayList<Annotation>(); 7666 return this.note; 7667 } 7668 7669 /** 7670 * @return Returns a reference to <code>this</code> for easy method chaining 7671 */ 7672 public ActionComponent setNote(List<Annotation> theNote) { 7673 this.note = theNote; 7674 return this; 7675 } 7676 7677 public boolean hasNote() { 7678 if (this.note == null) 7679 return false; 7680 for (Annotation item : this.note) 7681 if (!item.isEmpty()) 7682 return true; 7683 return false; 7684 } 7685 7686 public Annotation addNote() { //3 7687 Annotation t = new Annotation(); 7688 if (this.note == null) 7689 this.note = new ArrayList<Annotation>(); 7690 this.note.add(t); 7691 return t; 7692 } 7693 7694 public ActionComponent addNote(Annotation t) { //3 7695 if (t == null) 7696 return this; 7697 if (this.note == null) 7698 this.note = new ArrayList<Annotation>(); 7699 this.note.add(t); 7700 return this; 7701 } 7702 7703 /** 7704 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist 7705 */ 7706 public Annotation getNoteFirstRep() { 7707 if (getNote().isEmpty()) { 7708 addNote(); 7709 } 7710 return getNote().get(0); 7711 } 7712 7713 /** 7714 * @return {@link #securityLabelNumber} (Security labels that protects the action.) 7715 */ 7716 public List<UnsignedIntType> getSecurityLabelNumber() { 7717 if (this.securityLabelNumber == null) 7718 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 7719 return this.securityLabelNumber; 7720 } 7721 7722 /** 7723 * @return Returns a reference to <code>this</code> for easy method chaining 7724 */ 7725 public ActionComponent setSecurityLabelNumber(List<UnsignedIntType> theSecurityLabelNumber) { 7726 this.securityLabelNumber = theSecurityLabelNumber; 7727 return this; 7728 } 7729 7730 public boolean hasSecurityLabelNumber() { 7731 if (this.securityLabelNumber == null) 7732 return false; 7733 for (UnsignedIntType item : this.securityLabelNumber) 7734 if (!item.isEmpty()) 7735 return true; 7736 return false; 7737 } 7738 7739 /** 7740 * @return {@link #securityLabelNumber} (Security labels that protects the action.) 7741 */ 7742 public UnsignedIntType addSecurityLabelNumberElement() {//2 7743 UnsignedIntType t = new UnsignedIntType(); 7744 if (this.securityLabelNumber == null) 7745 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 7746 this.securityLabelNumber.add(t); 7747 return t; 7748 } 7749 7750 /** 7751 * @param value {@link #securityLabelNumber} (Security labels that protects the action.) 7752 */ 7753 public ActionComponent addSecurityLabelNumber(int value) { //1 7754 UnsignedIntType t = new UnsignedIntType(); 7755 t.setValue(value); 7756 if (this.securityLabelNumber == null) 7757 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 7758 this.securityLabelNumber.add(t); 7759 return this; 7760 } 7761 7762 /** 7763 * @param value {@link #securityLabelNumber} (Security labels that protects the action.) 7764 */ 7765 public boolean hasSecurityLabelNumber(int value) { 7766 if (this.securityLabelNumber == null) 7767 return false; 7768 for (UnsignedIntType v : this.securityLabelNumber) 7769 if (v.getValue().equals(value)) // unsignedInt 7770 return true; 7771 return false; 7772 } 7773 7774 protected void listChildren(List<Property> children) { 7775 super.listChildren(children); 7776 children.add(new Property("doNotPerform", "boolean", "True if the term prohibits the action.", 0, 1, doNotPerform)); 7777 children.add(new Property("type", "CodeableConcept", "Activity or service obligation to be done or not done, performed or not performed, effectuated or not by this Contract term.", 0, 1, type)); 7778 children.add(new Property("subject", "", "Entity of the action.", 0, java.lang.Integer.MAX_VALUE, subject)); 7779 children.add(new Property("intent", "CodeableConcept", "Reason or purpose for the action stipulated by this Contract Provision.", 0, 1, intent)); 7780 children.add(new Property("linkId", "string", "Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, linkId)); 7781 children.add(new Property("status", "CodeableConcept", "Current state of the term action.", 0, 1, status)); 7782 children.add(new Property("context", "Reference(Encounter|EpisodeOfCare)", "Encounter or Episode with primary association to specified term activity.", 0, 1, context)); 7783 children.add(new Property("contextLinkId", "string", "Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, contextLinkId)); 7784 children.add(new Property("occurrence[x]", "dateTime|Period|Timing", "When action happens.", 0, 1, occurrence)); 7785 children.add(new Property("requester", "Reference(Patient|Person|RelatedPerson|Practitioner|Device|Group|Organization)", "Who or what initiated the action and has responsibility for its activation.", 0, java.lang.Integer.MAX_VALUE, requester)); 7786 children.add(new Property("requesterLinkId", "string", "Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, requesterLinkId)); 7787 children.add(new Property("performerType", "CodeableConcept", "The type of individual that is desired or required to perform or not perform the action.", 0, java.lang.Integer.MAX_VALUE, performerType)); 7788 children.add(new Property("performerRole", "CodeableConcept", "The type of role or competency of an individual desired or required to perform or not perform the action.", 0, 1, performerRole)); 7789 children.add(new Property("performer", "Reference(Person|RelatedPerson|Patient|Practitioner|PractitionerRole|CareTeam|Device|Substance|Organization|Location)", "Indicates who or what is being asked to perform (or not perform) the ction.", 0, 1, performer)); 7790 children.add(new Property("performerLinkId", "string", "Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, performerLinkId)); 7791 children.add(new Property("reasonCode", "CodeableConcept", "Rationale for the action to be performed or not performed. Describes why the action is permitted or prohibited.", 0, java.lang.Integer.MAX_VALUE, reasonCode)); 7792 children.add(new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference|Questionnaire|QuestionnaireResponse)", "Indicates another resource whose existence justifies permitting or not permitting this action.", 0, java.lang.Integer.MAX_VALUE, reasonReference)); 7793 children.add(new Property("reason", "string", "Describes why the action is to be performed or not performed in textual form.", 0, java.lang.Integer.MAX_VALUE, reason)); 7794 children.add(new Property("reasonLinkId", "string", "Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, reasonLinkId)); 7795 children.add(new Property("note", "Annotation", "Comments made about the term action made by the requester, performer, subject or other participants.", 0, java.lang.Integer.MAX_VALUE, note)); 7796 children.add(new Property("securityLabelNumber", "unsignedInt", "Security labels that protects the action.", 0, java.lang.Integer.MAX_VALUE, securityLabelNumber)); 7797 } 7798 7799 @Override 7800 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 7801 switch (_hash) { 7802 case -1788508167: /*doNotPerform*/ return new Property("doNotPerform", "boolean", "True if the term prohibits the action.", 0, 1, doNotPerform); 7803 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Activity or service obligation to be done or not done, performed or not performed, effectuated or not by this Contract term.", 0, 1, type); 7804 case -1867885268: /*subject*/ return new Property("subject", "", "Entity of the action.", 0, java.lang.Integer.MAX_VALUE, subject); 7805 case -1183762788: /*intent*/ return new Property("intent", "CodeableConcept", "Reason or purpose for the action stipulated by this Contract Provision.", 0, 1, intent); 7806 case -1102667083: /*linkId*/ return new Property("linkId", "string", "Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, linkId); 7807 case -892481550: /*status*/ return new Property("status", "CodeableConcept", "Current state of the term action.", 0, 1, status); 7808 case 951530927: /*context*/ return new Property("context", "Reference(Encounter|EpisodeOfCare)", "Encounter or Episode with primary association to specified term activity.", 0, 1, context); 7809 case -288783036: /*contextLinkId*/ return new Property("contextLinkId", "string", "Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, contextLinkId); 7810 case -2022646513: /*occurrence[x]*/ return new Property("occurrence[x]", "dateTime|Period|Timing", "When action happens.", 0, 1, occurrence); 7811 case 1687874001: /*occurrence*/ return new Property("occurrence[x]", "dateTime|Period|Timing", "When action happens.", 0, 1, occurrence); 7812 case -298443636: /*occurrenceDateTime*/ return new Property("occurrence[x]", "dateTime|Period|Timing", "When action happens.", 0, 1, occurrence); 7813 case 1397156594: /*occurrencePeriod*/ return new Property("occurrence[x]", "dateTime|Period|Timing", "When action happens.", 0, 1, occurrence); 7814 case 1515218299: /*occurrenceTiming*/ return new Property("occurrence[x]", "dateTime|Period|Timing", "When action happens.", 0, 1, occurrence); 7815 case 693933948: /*requester*/ return new Property("requester", "Reference(Patient|Person|RelatedPerson|Practitioner|Device|Group|Organization)", "Who or what initiated the action and has responsibility for its activation.", 0, java.lang.Integer.MAX_VALUE, requester); 7816 case -1468032687: /*requesterLinkId*/ return new Property("requesterLinkId", "string", "Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, requesterLinkId); 7817 case -901444568: /*performerType*/ return new Property("performerType", "CodeableConcept", "The type of individual that is desired or required to perform or not perform the action.", 0, java.lang.Integer.MAX_VALUE, performerType); 7818 case -901513884: /*performerRole*/ return new Property("performerRole", "CodeableConcept", "The type of role or competency of an individual desired or required to perform or not perform the action.", 0, 1, performerRole); 7819 case 481140686: /*performer*/ return new Property("performer", "Reference(Person|RelatedPerson|Patient|Practitioner|PractitionerRole|CareTeam|Device|Substance|Organization|Location)", "Indicates who or what is being asked to perform (or not perform) the ction.", 0, 1, performer); 7820 case 1051302947: /*performerLinkId*/ return new Property("performerLinkId", "string", "Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, performerLinkId); 7821 case 722137681: /*reasonCode*/ return new Property("reasonCode", "CodeableConcept", "Rationale for the action to be performed or not performed. Describes why the action is permitted or prohibited.", 0, java.lang.Integer.MAX_VALUE, reasonCode); 7822 case -1146218137: /*reasonReference*/ return new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference|Questionnaire|QuestionnaireResponse)", "Indicates another resource whose existence justifies permitting or not permitting this action.", 0, java.lang.Integer.MAX_VALUE, reasonReference); 7823 case -934964668: /*reason*/ return new Property("reason", "string", "Describes why the action is to be performed or not performed in textual form.", 0, java.lang.Integer.MAX_VALUE, reason); 7824 case -1557963239: /*reasonLinkId*/ return new Property("reasonLinkId", "string", "Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, reasonLinkId); 7825 case 3387378: /*note*/ return new Property("note", "Annotation", "Comments made about the term action made by the requester, performer, subject or other participants.", 0, java.lang.Integer.MAX_VALUE, note); 7826 case -149460995: /*securityLabelNumber*/ return new Property("securityLabelNumber", "unsignedInt", "Security labels that protects the action.", 0, java.lang.Integer.MAX_VALUE, securityLabelNumber); 7827 default: return super.getNamedProperty(_hash, _name, _checkValid); 7828 } 7829 7830 } 7831 7832 @Override 7833 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7834 switch (hash) { 7835 case -1788508167: /*doNotPerform*/ return this.doNotPerform == null ? new Base[0] : new Base[] {this.doNotPerform}; // BooleanType 7836 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 7837 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : this.subject.toArray(new Base[this.subject.size()]); // ActionSubjectComponent 7838 case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // CodeableConcept 7839 case -1102667083: /*linkId*/ return this.linkId == null ? new Base[0] : this.linkId.toArray(new Base[this.linkId.size()]); // StringType 7840 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // CodeableConcept 7841 case 951530927: /*context*/ return this.context == null ? new Base[0] : new Base[] {this.context}; // Reference 7842 case -288783036: /*contextLinkId*/ return this.contextLinkId == null ? new Base[0] : this.contextLinkId.toArray(new Base[this.contextLinkId.size()]); // StringType 7843 case 1687874001: /*occurrence*/ return this.occurrence == null ? new Base[0] : new Base[] {this.occurrence}; // Type 7844 case 693933948: /*requester*/ return this.requester == null ? new Base[0] : this.requester.toArray(new Base[this.requester.size()]); // Reference 7845 case -1468032687: /*requesterLinkId*/ return this.requesterLinkId == null ? new Base[0] : this.requesterLinkId.toArray(new Base[this.requesterLinkId.size()]); // StringType 7846 case -901444568: /*performerType*/ return this.performerType == null ? new Base[0] : this.performerType.toArray(new Base[this.performerType.size()]); // CodeableConcept 7847 case -901513884: /*performerRole*/ return this.performerRole == null ? new Base[0] : new Base[] {this.performerRole}; // CodeableConcept 7848 case 481140686: /*performer*/ return this.performer == null ? new Base[0] : new Base[] {this.performer}; // Reference 7849 case 1051302947: /*performerLinkId*/ return this.performerLinkId == null ? new Base[0] : this.performerLinkId.toArray(new Base[this.performerLinkId.size()]); // StringType 7850 case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept 7851 case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference 7852 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // StringType 7853 case -1557963239: /*reasonLinkId*/ return this.reasonLinkId == null ? new Base[0] : this.reasonLinkId.toArray(new Base[this.reasonLinkId.size()]); // StringType 7854 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 7855 case -149460995: /*securityLabelNumber*/ return this.securityLabelNumber == null ? new Base[0] : this.securityLabelNumber.toArray(new Base[this.securityLabelNumber.size()]); // UnsignedIntType 7856 default: return super.getProperty(hash, name, checkValid); 7857 } 7858 7859 } 7860 7861 @Override 7862 public Base setProperty(int hash, String name, Base value) throws FHIRException { 7863 switch (hash) { 7864 case -1788508167: // doNotPerform 7865 this.doNotPerform = castToBoolean(value); // BooleanType 7866 return value; 7867 case 3575610: // type 7868 this.type = castToCodeableConcept(value); // CodeableConcept 7869 return value; 7870 case -1867885268: // subject 7871 this.getSubject().add((ActionSubjectComponent) value); // ActionSubjectComponent 7872 return value; 7873 case -1183762788: // intent 7874 this.intent = castToCodeableConcept(value); // CodeableConcept 7875 return value; 7876 case -1102667083: // linkId 7877 this.getLinkId().add(castToString(value)); // StringType 7878 return value; 7879 case -892481550: // status 7880 this.status = castToCodeableConcept(value); // CodeableConcept 7881 return value; 7882 case 951530927: // context 7883 this.context = castToReference(value); // Reference 7884 return value; 7885 case -288783036: // contextLinkId 7886 this.getContextLinkId().add(castToString(value)); // StringType 7887 return value; 7888 case 1687874001: // occurrence 7889 this.occurrence = castToType(value); // Type 7890 return value; 7891 case 693933948: // requester 7892 this.getRequester().add(castToReference(value)); // Reference 7893 return value; 7894 case -1468032687: // requesterLinkId 7895 this.getRequesterLinkId().add(castToString(value)); // StringType 7896 return value; 7897 case -901444568: // performerType 7898 this.getPerformerType().add(castToCodeableConcept(value)); // CodeableConcept 7899 return value; 7900 case -901513884: // performerRole 7901 this.performerRole = castToCodeableConcept(value); // CodeableConcept 7902 return value; 7903 case 481140686: // performer 7904 this.performer = castToReference(value); // Reference 7905 return value; 7906 case 1051302947: // performerLinkId 7907 this.getPerformerLinkId().add(castToString(value)); // StringType 7908 return value; 7909 case 722137681: // reasonCode 7910 this.getReasonCode().add(castToCodeableConcept(value)); // CodeableConcept 7911 return value; 7912 case -1146218137: // reasonReference 7913 this.getReasonReference().add(castToReference(value)); // Reference 7914 return value; 7915 case -934964668: // reason 7916 this.getReason().add(castToString(value)); // StringType 7917 return value; 7918 case -1557963239: // reasonLinkId 7919 this.getReasonLinkId().add(castToString(value)); // StringType 7920 return value; 7921 case 3387378: // note 7922 this.getNote().add(castToAnnotation(value)); // Annotation 7923 return value; 7924 case -149460995: // securityLabelNumber 7925 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); // UnsignedIntType 7926 return value; 7927 default: return super.setProperty(hash, name, value); 7928 } 7929 7930 } 7931 7932 @Override 7933 public Base setProperty(String name, Base value) throws FHIRException { 7934 if (name.equals("doNotPerform")) { 7935 this.doNotPerform = castToBoolean(value); // BooleanType 7936 } else if (name.equals("type")) { 7937 this.type = castToCodeableConcept(value); // CodeableConcept 7938 } else if (name.equals("subject")) { 7939 this.getSubject().add((ActionSubjectComponent) value); 7940 } else if (name.equals("intent")) { 7941 this.intent = castToCodeableConcept(value); // CodeableConcept 7942 } else if (name.equals("linkId")) { 7943 this.getLinkId().add(castToString(value)); 7944 } else if (name.equals("status")) { 7945 this.status = castToCodeableConcept(value); // CodeableConcept 7946 } else if (name.equals("context")) { 7947 this.context = castToReference(value); // Reference 7948 } else if (name.equals("contextLinkId")) { 7949 this.getContextLinkId().add(castToString(value)); 7950 } else if (name.equals("occurrence[x]")) { 7951 this.occurrence = castToType(value); // Type 7952 } else if (name.equals("requester")) { 7953 this.getRequester().add(castToReference(value)); 7954 } else if (name.equals("requesterLinkId")) { 7955 this.getRequesterLinkId().add(castToString(value)); 7956 } else if (name.equals("performerType")) { 7957 this.getPerformerType().add(castToCodeableConcept(value)); 7958 } else if (name.equals("performerRole")) { 7959 this.performerRole = castToCodeableConcept(value); // CodeableConcept 7960 } else if (name.equals("performer")) { 7961 this.performer = castToReference(value); // Reference 7962 } else if (name.equals("performerLinkId")) { 7963 this.getPerformerLinkId().add(castToString(value)); 7964 } else if (name.equals("reasonCode")) { 7965 this.getReasonCode().add(castToCodeableConcept(value)); 7966 } else if (name.equals("reasonReference")) { 7967 this.getReasonReference().add(castToReference(value)); 7968 } else if (name.equals("reason")) { 7969 this.getReason().add(castToString(value)); 7970 } else if (name.equals("reasonLinkId")) { 7971 this.getReasonLinkId().add(castToString(value)); 7972 } else if (name.equals("note")) { 7973 this.getNote().add(castToAnnotation(value)); 7974 } else if (name.equals("securityLabelNumber")) { 7975 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); 7976 } else 7977 return super.setProperty(name, value); 7978 return value; 7979 } 7980 7981 @Override 7982 public Base makeProperty(int hash, String name) throws FHIRException { 7983 switch (hash) { 7984 case -1788508167: return getDoNotPerformElement(); 7985 case 3575610: return getType(); 7986 case -1867885268: return addSubject(); 7987 case -1183762788: return getIntent(); 7988 case -1102667083: return addLinkIdElement(); 7989 case -892481550: return getStatus(); 7990 case 951530927: return getContext(); 7991 case -288783036: return addContextLinkIdElement(); 7992 case -2022646513: return getOccurrence(); 7993 case 1687874001: return getOccurrence(); 7994 case 693933948: return addRequester(); 7995 case -1468032687: return addRequesterLinkIdElement(); 7996 case -901444568: return addPerformerType(); 7997 case -901513884: return getPerformerRole(); 7998 case 481140686: return getPerformer(); 7999 case 1051302947: return addPerformerLinkIdElement(); 8000 case 722137681: return addReasonCode(); 8001 case -1146218137: return addReasonReference(); 8002 case -934964668: return addReasonElement(); 8003 case -1557963239: return addReasonLinkIdElement(); 8004 case 3387378: return addNote(); 8005 case -149460995: return addSecurityLabelNumberElement(); 8006 default: return super.makeProperty(hash, name); 8007 } 8008 8009 } 8010 8011 @Override 8012 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8013 switch (hash) { 8014 case -1788508167: /*doNotPerform*/ return new String[] {"boolean"}; 8015 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 8016 case -1867885268: /*subject*/ return new String[] {}; 8017 case -1183762788: /*intent*/ return new String[] {"CodeableConcept"}; 8018 case -1102667083: /*linkId*/ return new String[] {"string"}; 8019 case -892481550: /*status*/ return new String[] {"CodeableConcept"}; 8020 case 951530927: /*context*/ return new String[] {"Reference"}; 8021 case -288783036: /*contextLinkId*/ return new String[] {"string"}; 8022 case 1687874001: /*occurrence*/ return new String[] {"dateTime", "Period", "Timing"}; 8023 case 693933948: /*requester*/ return new String[] {"Reference"}; 8024 case -1468032687: /*requesterLinkId*/ return new String[] {"string"}; 8025 case -901444568: /*performerType*/ return new String[] {"CodeableConcept"}; 8026 case -901513884: /*performerRole*/ return new String[] {"CodeableConcept"}; 8027 case 481140686: /*performer*/ return new String[] {"Reference"}; 8028 case 1051302947: /*performerLinkId*/ return new String[] {"string"}; 8029 case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"}; 8030 case -1146218137: /*reasonReference*/ return new String[] {"Reference"}; 8031 case -934964668: /*reason*/ return new String[] {"string"}; 8032 case -1557963239: /*reasonLinkId*/ return new String[] {"string"}; 8033 case 3387378: /*note*/ return new String[] {"Annotation"}; 8034 case -149460995: /*securityLabelNumber*/ return new String[] {"unsignedInt"}; 8035 default: return super.getTypesForProperty(hash, name); 8036 } 8037 8038 } 8039 8040 @Override 8041 public Base addChild(String name) throws FHIRException { 8042 if (name.equals("doNotPerform")) { 8043 throw new FHIRException("Cannot call addChild on a primitive type Contract.doNotPerform"); 8044 } 8045 else if (name.equals("type")) { 8046 this.type = new CodeableConcept(); 8047 return this.type; 8048 } 8049 else if (name.equals("subject")) { 8050 return addSubject(); 8051 } 8052 else if (name.equals("intent")) { 8053 this.intent = new CodeableConcept(); 8054 return this.intent; 8055 } 8056 else if (name.equals("linkId")) { 8057 throw new FHIRException("Cannot call addChild on a primitive type Contract.linkId"); 8058 } 8059 else if (name.equals("status")) { 8060 this.status = new CodeableConcept(); 8061 return this.status; 8062 } 8063 else if (name.equals("context")) { 8064 this.context = new Reference(); 8065 return this.context; 8066 } 8067 else if (name.equals("contextLinkId")) { 8068 throw new FHIRException("Cannot call addChild on a primitive type Contract.contextLinkId"); 8069 } 8070 else if (name.equals("occurrenceDateTime")) { 8071 this.occurrence = new DateTimeType(); 8072 return this.occurrence; 8073 } 8074 else if (name.equals("occurrencePeriod")) { 8075 this.occurrence = new Period(); 8076 return this.occurrence; 8077 } 8078 else if (name.equals("occurrenceTiming")) { 8079 this.occurrence = new Timing(); 8080 return this.occurrence; 8081 } 8082 else if (name.equals("requester")) { 8083 return addRequester(); 8084 } 8085 else if (name.equals("requesterLinkId")) { 8086 throw new FHIRException("Cannot call addChild on a primitive type Contract.requesterLinkId"); 8087 } 8088 else if (name.equals("performerType")) { 8089 return addPerformerType(); 8090 } 8091 else if (name.equals("performerRole")) { 8092 this.performerRole = new CodeableConcept(); 8093 return this.performerRole; 8094 } 8095 else if (name.equals("performer")) { 8096 this.performer = new Reference(); 8097 return this.performer; 8098 } 8099 else if (name.equals("performerLinkId")) { 8100 throw new FHIRException("Cannot call addChild on a primitive type Contract.performerLinkId"); 8101 } 8102 else if (name.equals("reasonCode")) { 8103 return addReasonCode(); 8104 } 8105 else if (name.equals("reasonReference")) { 8106 return addReasonReference(); 8107 } 8108 else if (name.equals("reason")) { 8109 throw new FHIRException("Cannot call addChild on a primitive type Contract.reason"); 8110 } 8111 else if (name.equals("reasonLinkId")) { 8112 throw new FHIRException("Cannot call addChild on a primitive type Contract.reasonLinkId"); 8113 } 8114 else if (name.equals("note")) { 8115 return addNote(); 8116 } 8117 else if (name.equals("securityLabelNumber")) { 8118 throw new FHIRException("Cannot call addChild on a primitive type Contract.securityLabelNumber"); 8119 } 8120 else 8121 return super.addChild(name); 8122 } 8123 8124 public ActionComponent copy() { 8125 ActionComponent dst = new ActionComponent(); 8126 copyValues(dst); 8127 dst.doNotPerform = doNotPerform == null ? null : doNotPerform.copy(); 8128 dst.type = type == null ? null : type.copy(); 8129 if (subject != null) { 8130 dst.subject = new ArrayList<ActionSubjectComponent>(); 8131 for (ActionSubjectComponent i : subject) 8132 dst.subject.add(i.copy()); 8133 }; 8134 dst.intent = intent == null ? null : intent.copy(); 8135 if (linkId != null) { 8136 dst.linkId = new ArrayList<StringType>(); 8137 for (StringType i : linkId) 8138 dst.linkId.add(i.copy()); 8139 }; 8140 dst.status = status == null ? null : status.copy(); 8141 dst.context = context == null ? null : context.copy(); 8142 if (contextLinkId != null) { 8143 dst.contextLinkId = new ArrayList<StringType>(); 8144 for (StringType i : contextLinkId) 8145 dst.contextLinkId.add(i.copy()); 8146 }; 8147 dst.occurrence = occurrence == null ? null : occurrence.copy(); 8148 if (requester != null) { 8149 dst.requester = new ArrayList<Reference>(); 8150 for (Reference i : requester) 8151 dst.requester.add(i.copy()); 8152 }; 8153 if (requesterLinkId != null) { 8154 dst.requesterLinkId = new ArrayList<StringType>(); 8155 for (StringType i : requesterLinkId) 8156 dst.requesterLinkId.add(i.copy()); 8157 }; 8158 if (performerType != null) { 8159 dst.performerType = new ArrayList<CodeableConcept>(); 8160 for (CodeableConcept i : performerType) 8161 dst.performerType.add(i.copy()); 8162 }; 8163 dst.performerRole = performerRole == null ? null : performerRole.copy(); 8164 dst.performer = performer == null ? null : performer.copy(); 8165 if (performerLinkId != null) { 8166 dst.performerLinkId = new ArrayList<StringType>(); 8167 for (StringType i : performerLinkId) 8168 dst.performerLinkId.add(i.copy()); 8169 }; 8170 if (reasonCode != null) { 8171 dst.reasonCode = new ArrayList<CodeableConcept>(); 8172 for (CodeableConcept i : reasonCode) 8173 dst.reasonCode.add(i.copy()); 8174 }; 8175 if (reasonReference != null) { 8176 dst.reasonReference = new ArrayList<Reference>(); 8177 for (Reference i : reasonReference) 8178 dst.reasonReference.add(i.copy()); 8179 }; 8180 if (reason != null) { 8181 dst.reason = new ArrayList<StringType>(); 8182 for (StringType i : reason) 8183 dst.reason.add(i.copy()); 8184 }; 8185 if (reasonLinkId != null) { 8186 dst.reasonLinkId = new ArrayList<StringType>(); 8187 for (StringType i : reasonLinkId) 8188 dst.reasonLinkId.add(i.copy()); 8189 }; 8190 if (note != null) { 8191 dst.note = new ArrayList<Annotation>(); 8192 for (Annotation i : note) 8193 dst.note.add(i.copy()); 8194 }; 8195 if (securityLabelNumber != null) { 8196 dst.securityLabelNumber = new ArrayList<UnsignedIntType>(); 8197 for (UnsignedIntType i : securityLabelNumber) 8198 dst.securityLabelNumber.add(i.copy()); 8199 }; 8200 return dst; 8201 } 8202 8203 @Override 8204 public boolean equalsDeep(Base other_) { 8205 if (!super.equalsDeep(other_)) 8206 return false; 8207 if (!(other_ instanceof ActionComponent)) 8208 return false; 8209 ActionComponent o = (ActionComponent) other_; 8210 return compareDeep(doNotPerform, o.doNotPerform, true) && compareDeep(type, o.type, true) && compareDeep(subject, o.subject, true) 8211 && compareDeep(intent, o.intent, true) && compareDeep(linkId, o.linkId, true) && compareDeep(status, o.status, true) 8212 && compareDeep(context, o.context, true) && compareDeep(contextLinkId, o.contextLinkId, true) && compareDeep(occurrence, o.occurrence, true) 8213 && compareDeep(requester, o.requester, true) && compareDeep(requesterLinkId, o.requesterLinkId, true) 8214 && compareDeep(performerType, o.performerType, true) && compareDeep(performerRole, o.performerRole, true) 8215 && compareDeep(performer, o.performer, true) && compareDeep(performerLinkId, o.performerLinkId, true) 8216 && compareDeep(reasonCode, o.reasonCode, true) && compareDeep(reasonReference, o.reasonReference, true) 8217 && compareDeep(reason, o.reason, true) && compareDeep(reasonLinkId, o.reasonLinkId, true) && compareDeep(note, o.note, true) 8218 && compareDeep(securityLabelNumber, o.securityLabelNumber, true); 8219 } 8220 8221 @Override 8222 public boolean equalsShallow(Base other_) { 8223 if (!super.equalsShallow(other_)) 8224 return false; 8225 if (!(other_ instanceof ActionComponent)) 8226 return false; 8227 ActionComponent o = (ActionComponent) other_; 8228 return compareValues(doNotPerform, o.doNotPerform, true) && compareValues(linkId, o.linkId, true) && compareValues(contextLinkId, o.contextLinkId, true) 8229 && compareValues(requesterLinkId, o.requesterLinkId, true) && compareValues(performerLinkId, o.performerLinkId, true) 8230 && compareValues(reason, o.reason, true) && compareValues(reasonLinkId, o.reasonLinkId, true) && compareValues(securityLabelNumber, o.securityLabelNumber, true) 8231 ; 8232 } 8233 8234 public boolean isEmpty() { 8235 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(doNotPerform, type, subject 8236 , intent, linkId, status, context, contextLinkId, occurrence, requester, requesterLinkId 8237 , performerType, performerRole, performer, performerLinkId, reasonCode, reasonReference 8238 , reason, reasonLinkId, note, securityLabelNumber); 8239 } 8240 8241 public String fhirType() { 8242 return "Contract.term.action"; 8243 8244 } 8245 8246 } 8247 8248 @Block() 8249 public static class ActionSubjectComponent extends BackboneElement implements IBaseBackboneElement { 8250 /** 8251 * The entity the action is performed or not performed on or for. 8252 */ 8253 @Child(name = "reference", type = {Patient.class, Person.class, RelatedPerson.class, Practitioner.class, Device.class, Group.class, Organization.class}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8254 @Description(shortDefinition="Entity of the action", formalDefinition="The entity the action is performed or not performed on or for." ) 8255 protected List<Reference> reference; 8256 /** 8257 * The actual objects that are the target of the reference (The entity the action is performed or not performed on or for.) 8258 */ 8259 protected List<Resource> referenceTarget; 8260 8261 8262 /** 8263 * Role type of agent assigned roles in this Contract. 8264 */ 8265 @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 8266 @Description(shortDefinition="Role type of the agent", formalDefinition="Role type of agent assigned roles in this Contract." ) 8267 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-actorrole") 8268 protected CodeableConcept role; 8269 8270 private static final long serialVersionUID = 128949255L; 8271 8272 /** 8273 * Constructor 8274 */ 8275 public ActionSubjectComponent() { 8276 super(); 8277 } 8278 8279 /** 8280 * @return {@link #reference} (The entity the action is performed or not performed on or for.) 8281 */ 8282 public List<Reference> getReference() { 8283 if (this.reference == null) 8284 this.reference = new ArrayList<Reference>(); 8285 return this.reference; 8286 } 8287 8288 /** 8289 * @return Returns a reference to <code>this</code> for easy method chaining 8290 */ 8291 public ActionSubjectComponent setReference(List<Reference> theReference) { 8292 this.reference = theReference; 8293 return this; 8294 } 8295 8296 public boolean hasReference() { 8297 if (this.reference == null) 8298 return false; 8299 for (Reference item : this.reference) 8300 if (!item.isEmpty()) 8301 return true; 8302 return false; 8303 } 8304 8305 public Reference addReference() { //3 8306 Reference t = new Reference(); 8307 if (this.reference == null) 8308 this.reference = new ArrayList<Reference>(); 8309 this.reference.add(t); 8310 return t; 8311 } 8312 8313 public ActionSubjectComponent addReference(Reference t) { //3 8314 if (t == null) 8315 return this; 8316 if (this.reference == null) 8317 this.reference = new ArrayList<Reference>(); 8318 this.reference.add(t); 8319 return this; 8320 } 8321 8322 /** 8323 * @return The first repetition of repeating field {@link #reference}, creating it if it does not already exist 8324 */ 8325 public Reference getReferenceFirstRep() { 8326 if (getReference().isEmpty()) { 8327 addReference(); 8328 } 8329 return getReference().get(0); 8330 } 8331 8332 /** 8333 * @deprecated Use Reference#setResource(IBaseResource) instead 8334 */ 8335 @Deprecated 8336 public List<Resource> getReferenceTarget() { 8337 if (this.referenceTarget == null) 8338 this.referenceTarget = new ArrayList<Resource>(); 8339 return this.referenceTarget; 8340 } 8341 8342 /** 8343 * @return {@link #role} (Role type of agent assigned roles in this Contract.) 8344 */ 8345 public CodeableConcept getRole() { 8346 if (this.role == null) 8347 if (Configuration.errorOnAutoCreate()) 8348 throw new Error("Attempt to auto-create ActionSubjectComponent.role"); 8349 else if (Configuration.doAutoCreate()) 8350 this.role = new CodeableConcept(); // cc 8351 return this.role; 8352 } 8353 8354 public boolean hasRole() { 8355 return this.role != null && !this.role.isEmpty(); 8356 } 8357 8358 /** 8359 * @param value {@link #role} (Role type of agent assigned roles in this Contract.) 8360 */ 8361 public ActionSubjectComponent setRole(CodeableConcept value) { 8362 this.role = value; 8363 return this; 8364 } 8365 8366 protected void listChildren(List<Property> children) { 8367 super.listChildren(children); 8368 children.add(new Property("reference", "Reference(Patient|Person|RelatedPerson|Practitioner|Device|Group|Organization)", "The entity the action is performed or not performed on or for.", 0, java.lang.Integer.MAX_VALUE, reference)); 8369 children.add(new Property("role", "CodeableConcept", "Role type of agent assigned roles in this Contract.", 0, 1, role)); 8370 } 8371 8372 @Override 8373 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 8374 switch (_hash) { 8375 case -925155509: /*reference*/ return new Property("reference", "Reference(Patient|Person|RelatedPerson|Practitioner|Device|Group|Organization)", "The entity the action is performed or not performed on or for.", 0, java.lang.Integer.MAX_VALUE, reference); 8376 case 3506294: /*role*/ return new Property("role", "CodeableConcept", "Role type of agent assigned roles in this Contract.", 0, 1, role); 8377 default: return super.getNamedProperty(_hash, _name, _checkValid); 8378 } 8379 8380 } 8381 8382 @Override 8383 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8384 switch (hash) { 8385 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : this.reference.toArray(new Base[this.reference.size()]); // Reference 8386 case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept 8387 default: return super.getProperty(hash, name, checkValid); 8388 } 8389 8390 } 8391 8392 @Override 8393 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8394 switch (hash) { 8395 case -925155509: // reference 8396 this.getReference().add(castToReference(value)); // Reference 8397 return value; 8398 case 3506294: // role 8399 this.role = castToCodeableConcept(value); // CodeableConcept 8400 return value; 8401 default: return super.setProperty(hash, name, value); 8402 } 8403 8404 } 8405 8406 @Override 8407 public Base setProperty(String name, Base value) throws FHIRException { 8408 if (name.equals("reference")) { 8409 this.getReference().add(castToReference(value)); 8410 } else if (name.equals("role")) { 8411 this.role = castToCodeableConcept(value); // CodeableConcept 8412 } else 8413 return super.setProperty(name, value); 8414 return value; 8415 } 8416 8417 @Override 8418 public Base makeProperty(int hash, String name) throws FHIRException { 8419 switch (hash) { 8420 case -925155509: return addReference(); 8421 case 3506294: return getRole(); 8422 default: return super.makeProperty(hash, name); 8423 } 8424 8425 } 8426 8427 @Override 8428 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8429 switch (hash) { 8430 case -925155509: /*reference*/ return new String[] {"Reference"}; 8431 case 3506294: /*role*/ return new String[] {"CodeableConcept"}; 8432 default: return super.getTypesForProperty(hash, name); 8433 } 8434 8435 } 8436 8437 @Override 8438 public Base addChild(String name) throws FHIRException { 8439 if (name.equals("reference")) { 8440 return addReference(); 8441 } 8442 else if (name.equals("role")) { 8443 this.role = new CodeableConcept(); 8444 return this.role; 8445 } 8446 else 8447 return super.addChild(name); 8448 } 8449 8450 public ActionSubjectComponent copy() { 8451 ActionSubjectComponent dst = new ActionSubjectComponent(); 8452 copyValues(dst); 8453 if (reference != null) { 8454 dst.reference = new ArrayList<Reference>(); 8455 for (Reference i : reference) 8456 dst.reference.add(i.copy()); 8457 }; 8458 dst.role = role == null ? null : role.copy(); 8459 return dst; 8460 } 8461 8462 @Override 8463 public boolean equalsDeep(Base other_) { 8464 if (!super.equalsDeep(other_)) 8465 return false; 8466 if (!(other_ instanceof ActionSubjectComponent)) 8467 return false; 8468 ActionSubjectComponent o = (ActionSubjectComponent) other_; 8469 return compareDeep(reference, o.reference, true) && compareDeep(role, o.role, true); 8470 } 8471 8472 @Override 8473 public boolean equalsShallow(Base other_) { 8474 if (!super.equalsShallow(other_)) 8475 return false; 8476 if (!(other_ instanceof ActionSubjectComponent)) 8477 return false; 8478 ActionSubjectComponent o = (ActionSubjectComponent) other_; 8479 return true; 8480 } 8481 8482 public boolean isEmpty() { 8483 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(reference, role); 8484 } 8485 8486 public String fhirType() { 8487 return "Contract.term.action.subject"; 8488 8489 } 8490 8491 } 8492 8493 @Block() 8494 public static class SignatoryComponent extends BackboneElement implements IBaseBackboneElement { 8495 /** 8496 * Role of this Contract signer, e.g. notary, grantee. 8497 */ 8498 @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) 8499 @Description(shortDefinition="Contract Signatory Role", formalDefinition="Role of this Contract signer, e.g. notary, grantee." ) 8500 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-signer-type") 8501 protected Coding type; 8502 8503 /** 8504 * Party which is a signator to this Contract. 8505 */ 8506 @Child(name = "party", type = {Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=2, min=1, max=1, modifier=false, summary=false) 8507 @Description(shortDefinition="Contract Signatory Party", formalDefinition="Party which is a signator to this Contract." ) 8508 protected Reference party; 8509 8510 /** 8511 * The actual object that is the target of the reference (Party which is a signator to this Contract.) 8512 */ 8513 protected Resource partyTarget; 8514 8515 /** 8516 * Legally binding Contract DSIG signature contents in Base64. 8517 */ 8518 @Child(name = "signature", type = {Signature.class}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8519 @Description(shortDefinition="Contract Documentation Signature", formalDefinition="Legally binding Contract DSIG signature contents in Base64." ) 8520 protected List<Signature> signature; 8521 8522 private static final long serialVersionUID = 1948139228L; 8523 8524 /** 8525 * Constructor 8526 */ 8527 public SignatoryComponent() { 8528 super(); 8529 } 8530 8531 /** 8532 * Constructor 8533 */ 8534 public SignatoryComponent(Coding type, Reference party) { 8535 super(); 8536 this.type = type; 8537 this.party = party; 8538 } 8539 8540 /** 8541 * @return {@link #type} (Role of this Contract signer, e.g. notary, grantee.) 8542 */ 8543 public Coding getType() { 8544 if (this.type == null) 8545 if (Configuration.errorOnAutoCreate()) 8546 throw new Error("Attempt to auto-create SignatoryComponent.type"); 8547 else if (Configuration.doAutoCreate()) 8548 this.type = new Coding(); // cc 8549 return this.type; 8550 } 8551 8552 public boolean hasType() { 8553 return this.type != null && !this.type.isEmpty(); 8554 } 8555 8556 /** 8557 * @param value {@link #type} (Role of this Contract signer, e.g. notary, grantee.) 8558 */ 8559 public SignatoryComponent setType(Coding value) { 8560 this.type = value; 8561 return this; 8562 } 8563 8564 /** 8565 * @return {@link #party} (Party which is a signator to this Contract.) 8566 */ 8567 public Reference getParty() { 8568 if (this.party == null) 8569 if (Configuration.errorOnAutoCreate()) 8570 throw new Error("Attempt to auto-create SignatoryComponent.party"); 8571 else if (Configuration.doAutoCreate()) 8572 this.party = new Reference(); // cc 8573 return this.party; 8574 } 8575 8576 public boolean hasParty() { 8577 return this.party != null && !this.party.isEmpty(); 8578 } 8579 8580 /** 8581 * @param value {@link #party} (Party which is a signator to this Contract.) 8582 */ 8583 public SignatoryComponent setParty(Reference value) { 8584 this.party = value; 8585 return this; 8586 } 8587 8588 /** 8589 * @return {@link #party} 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. (Party which is a signator to this Contract.) 8590 */ 8591 public Resource getPartyTarget() { 8592 return this.partyTarget; 8593 } 8594 8595 /** 8596 * @param value {@link #party} 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. (Party which is a signator to this Contract.) 8597 */ 8598 public SignatoryComponent setPartyTarget(Resource value) { 8599 this.partyTarget = value; 8600 return this; 8601 } 8602 8603 /** 8604 * @return {@link #signature} (Legally binding Contract DSIG signature contents in Base64.) 8605 */ 8606 public List<Signature> getSignature() { 8607 if (this.signature == null) 8608 this.signature = new ArrayList<Signature>(); 8609 return this.signature; 8610 } 8611 8612 /** 8613 * @return Returns a reference to <code>this</code> for easy method chaining 8614 */ 8615 public SignatoryComponent setSignature(List<Signature> theSignature) { 8616 this.signature = theSignature; 8617 return this; 8618 } 8619 8620 public boolean hasSignature() { 8621 if (this.signature == null) 8622 return false; 8623 for (Signature item : this.signature) 8624 if (!item.isEmpty()) 8625 return true; 8626 return false; 8627 } 8628 8629 public Signature addSignature() { //3 8630 Signature t = new Signature(); 8631 if (this.signature == null) 8632 this.signature = new ArrayList<Signature>(); 8633 this.signature.add(t); 8634 return t; 8635 } 8636 8637 public SignatoryComponent addSignature(Signature t) { //3 8638 if (t == null) 8639 return this; 8640 if (this.signature == null) 8641 this.signature = new ArrayList<Signature>(); 8642 this.signature.add(t); 8643 return this; 8644 } 8645 8646 /** 8647 * @return The first repetition of repeating field {@link #signature}, creating it if it does not already exist 8648 */ 8649 public Signature getSignatureFirstRep() { 8650 if (getSignature().isEmpty()) { 8651 addSignature(); 8652 } 8653 return getSignature().get(0); 8654 } 8655 8656 protected void listChildren(List<Property> children) { 8657 super.listChildren(children); 8658 children.add(new Property("type", "Coding", "Role of this Contract signer, e.g. notary, grantee.", 0, 1, type)); 8659 children.add(new Property("party", "Reference(Organization|Patient|Practitioner|RelatedPerson)", "Party which is a signator to this Contract.", 0, 1, party)); 8660 children.add(new Property("signature", "Signature", "Legally binding Contract DSIG signature contents in Base64.", 0, java.lang.Integer.MAX_VALUE, signature)); 8661 } 8662 8663 @Override 8664 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 8665 switch (_hash) { 8666 case 3575610: /*type*/ return new Property("type", "Coding", "Role of this Contract signer, e.g. notary, grantee.", 0, 1, type); 8667 case 106437350: /*party*/ return new Property("party", "Reference(Organization|Patient|Practitioner|RelatedPerson)", "Party which is a signator to this Contract.", 0, 1, party); 8668 case 1073584312: /*signature*/ return new Property("signature", "Signature", "Legally binding Contract DSIG signature contents in Base64.", 0, java.lang.Integer.MAX_VALUE, signature); 8669 default: return super.getNamedProperty(_hash, _name, _checkValid); 8670 } 8671 8672 } 8673 8674 @Override 8675 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8676 switch (hash) { 8677 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 8678 case 106437350: /*party*/ return this.party == null ? new Base[0] : new Base[] {this.party}; // Reference 8679 case 1073584312: /*signature*/ return this.signature == null ? new Base[0] : this.signature.toArray(new Base[this.signature.size()]); // Signature 8680 default: return super.getProperty(hash, name, checkValid); 8681 } 8682 8683 } 8684 8685 @Override 8686 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8687 switch (hash) { 8688 case 3575610: // type 8689 this.type = castToCoding(value); // Coding 8690 return value; 8691 case 106437350: // party 8692 this.party = castToReference(value); // Reference 8693 return value; 8694 case 1073584312: // signature 8695 this.getSignature().add(castToSignature(value)); // Signature 8696 return value; 8697 default: return super.setProperty(hash, name, value); 8698 } 8699 8700 } 8701 8702 @Override 8703 public Base setProperty(String name, Base value) throws FHIRException { 8704 if (name.equals("type")) { 8705 this.type = castToCoding(value); // Coding 8706 } else if (name.equals("party")) { 8707 this.party = castToReference(value); // Reference 8708 } else if (name.equals("signature")) { 8709 this.getSignature().add(castToSignature(value)); 8710 } else 8711 return super.setProperty(name, value); 8712 return value; 8713 } 8714 8715 @Override 8716 public Base makeProperty(int hash, String name) throws FHIRException { 8717 switch (hash) { 8718 case 3575610: return getType(); 8719 case 106437350: return getParty(); 8720 case 1073584312: return addSignature(); 8721 default: return super.makeProperty(hash, name); 8722 } 8723 8724 } 8725 8726 @Override 8727 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8728 switch (hash) { 8729 case 3575610: /*type*/ return new String[] {"Coding"}; 8730 case 106437350: /*party*/ return new String[] {"Reference"}; 8731 case 1073584312: /*signature*/ return new String[] {"Signature"}; 8732 default: return super.getTypesForProperty(hash, name); 8733 } 8734 8735 } 8736 8737 @Override 8738 public Base addChild(String name) throws FHIRException { 8739 if (name.equals("type")) { 8740 this.type = new Coding(); 8741 return this.type; 8742 } 8743 else if (name.equals("party")) { 8744 this.party = new Reference(); 8745 return this.party; 8746 } 8747 else if (name.equals("signature")) { 8748 return addSignature(); 8749 } 8750 else 8751 return super.addChild(name); 8752 } 8753 8754 public SignatoryComponent copy() { 8755 SignatoryComponent dst = new SignatoryComponent(); 8756 copyValues(dst); 8757 dst.type = type == null ? null : type.copy(); 8758 dst.party = party == null ? null : party.copy(); 8759 if (signature != null) { 8760 dst.signature = new ArrayList<Signature>(); 8761 for (Signature i : signature) 8762 dst.signature.add(i.copy()); 8763 }; 8764 return dst; 8765 } 8766 8767 @Override 8768 public boolean equalsDeep(Base other_) { 8769 if (!super.equalsDeep(other_)) 8770 return false; 8771 if (!(other_ instanceof SignatoryComponent)) 8772 return false; 8773 SignatoryComponent o = (SignatoryComponent) other_; 8774 return compareDeep(type, o.type, true) && compareDeep(party, o.party, true) && compareDeep(signature, o.signature, true) 8775 ; 8776 } 8777 8778 @Override 8779 public boolean equalsShallow(Base other_) { 8780 if (!super.equalsShallow(other_)) 8781 return false; 8782 if (!(other_ instanceof SignatoryComponent)) 8783 return false; 8784 SignatoryComponent o = (SignatoryComponent) other_; 8785 return true; 8786 } 8787 8788 public boolean isEmpty() { 8789 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, party, signature); 8790 } 8791 8792 public String fhirType() { 8793 return "Contract.signer"; 8794 8795 } 8796 8797 } 8798 8799 @Block() 8800 public static class FriendlyLanguageComponent extends BackboneElement implements IBaseBackboneElement { 8801 /** 8802 * Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability. 8803 */ 8804 @Child(name = "content", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class}, order=1, min=1, max=1, modifier=false, summary=false) 8805 @Description(shortDefinition="Easily comprehended representation of this Contract", formalDefinition="Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability." ) 8806 protected Type content; 8807 8808 private static final long serialVersionUID = -1763459053L; 8809 8810 /** 8811 * Constructor 8812 */ 8813 public FriendlyLanguageComponent() { 8814 super(); 8815 } 8816 8817 /** 8818 * Constructor 8819 */ 8820 public FriendlyLanguageComponent(Type content) { 8821 super(); 8822 this.content = content; 8823 } 8824 8825 /** 8826 * @return {@link #content} (Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.) 8827 */ 8828 public Type getContent() { 8829 return this.content; 8830 } 8831 8832 /** 8833 * @return {@link #content} (Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.) 8834 */ 8835 public Attachment getContentAttachment() throws FHIRException { 8836 if (this.content == null) 8837 return null; 8838 if (!(this.content instanceof Attachment)) 8839 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); 8840 return (Attachment) this.content; 8841 } 8842 8843 public boolean hasContentAttachment() { 8844 return this != null && this.content instanceof Attachment; 8845 } 8846 8847 /** 8848 * @return {@link #content} (Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.) 8849 */ 8850 public Reference getContentReference() throws FHIRException { 8851 if (this.content == null) 8852 return null; 8853 if (!(this.content instanceof Reference)) 8854 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); 8855 return (Reference) this.content; 8856 } 8857 8858 public boolean hasContentReference() { 8859 return this != null && this.content instanceof Reference; 8860 } 8861 8862 public boolean hasContent() { 8863 return this.content != null && !this.content.isEmpty(); 8864 } 8865 8866 /** 8867 * @param value {@link #content} (Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.) 8868 */ 8869 public FriendlyLanguageComponent setContent(Type value) { 8870 if (value != null && !(value instanceof Attachment || value instanceof Reference)) 8871 throw new Error("Not the right type for Contract.friendly.content[x]: "+value.fhirType()); 8872 this.content = value; 8873 return this; 8874 } 8875 8876 protected void listChildren(List<Property> children) { 8877 super.listChildren(children); 8878 children.add(new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.", 0, 1, content)); 8879 } 8880 8881 @Override 8882 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 8883 switch (_hash) { 8884 case 264548711: /*content[x]*/ return new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.", 0, 1, content); 8885 case 951530617: /*content*/ return new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.", 0, 1, content); 8886 case -702028164: /*contentAttachment*/ return new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.", 0, 1, content); 8887 case 1193747154: /*contentReference*/ return new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.", 0, 1, content); 8888 default: return super.getNamedProperty(_hash, _name, _checkValid); 8889 } 8890 8891 } 8892 8893 @Override 8894 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8895 switch (hash) { 8896 case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // Type 8897 default: return super.getProperty(hash, name, checkValid); 8898 } 8899 8900 } 8901 8902 @Override 8903 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8904 switch (hash) { 8905 case 951530617: // content 8906 this.content = castToType(value); // Type 8907 return value; 8908 default: return super.setProperty(hash, name, value); 8909 } 8910 8911 } 8912 8913 @Override 8914 public Base setProperty(String name, Base value) throws FHIRException { 8915 if (name.equals("content[x]")) { 8916 this.content = castToType(value); // Type 8917 } else 8918 return super.setProperty(name, value); 8919 return value; 8920 } 8921 8922 @Override 8923 public Base makeProperty(int hash, String name) throws FHIRException { 8924 switch (hash) { 8925 case 264548711: return getContent(); 8926 case 951530617: return getContent(); 8927 default: return super.makeProperty(hash, name); 8928 } 8929 8930 } 8931 8932 @Override 8933 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8934 switch (hash) { 8935 case 951530617: /*content*/ return new String[] {"Attachment", "Reference"}; 8936 default: return super.getTypesForProperty(hash, name); 8937 } 8938 8939 } 8940 8941 @Override 8942 public Base addChild(String name) throws FHIRException { 8943 if (name.equals("contentAttachment")) { 8944 this.content = new Attachment(); 8945 return this.content; 8946 } 8947 else if (name.equals("contentReference")) { 8948 this.content = new Reference(); 8949 return this.content; 8950 } 8951 else 8952 return super.addChild(name); 8953 } 8954 8955 public FriendlyLanguageComponent copy() { 8956 FriendlyLanguageComponent dst = new FriendlyLanguageComponent(); 8957 copyValues(dst); 8958 dst.content = content == null ? null : content.copy(); 8959 return dst; 8960 } 8961 8962 @Override 8963 public boolean equalsDeep(Base other_) { 8964 if (!super.equalsDeep(other_)) 8965 return false; 8966 if (!(other_ instanceof FriendlyLanguageComponent)) 8967 return false; 8968 FriendlyLanguageComponent o = (FriendlyLanguageComponent) other_; 8969 return compareDeep(content, o.content, true); 8970 } 8971 8972 @Override 8973 public boolean equalsShallow(Base other_) { 8974 if (!super.equalsShallow(other_)) 8975 return false; 8976 if (!(other_ instanceof FriendlyLanguageComponent)) 8977 return false; 8978 FriendlyLanguageComponent o = (FriendlyLanguageComponent) other_; 8979 return true; 8980 } 8981 8982 public boolean isEmpty() { 8983 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(content); 8984 } 8985 8986 public String fhirType() { 8987 return "Contract.friendly"; 8988 8989 } 8990 8991 } 8992 8993 @Block() 8994 public static class LegalLanguageComponent extends BackboneElement implements IBaseBackboneElement { 8995 /** 8996 * Contract legal text in human renderable form. 8997 */ 8998 @Child(name = "content", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class}, order=1, min=1, max=1, modifier=false, summary=false) 8999 @Description(shortDefinition="Contract Legal Text", formalDefinition="Contract legal text in human renderable form." ) 9000 protected Type content; 9001 9002 private static final long serialVersionUID = -1763459053L; 9003 9004 /** 9005 * Constructor 9006 */ 9007 public LegalLanguageComponent() { 9008 super(); 9009 } 9010 9011 /** 9012 * Constructor 9013 */ 9014 public LegalLanguageComponent(Type content) { 9015 super(); 9016 this.content = content; 9017 } 9018 9019 /** 9020 * @return {@link #content} (Contract legal text in human renderable form.) 9021 */ 9022 public Type getContent() { 9023 return this.content; 9024 } 9025 9026 /** 9027 * @return {@link #content} (Contract legal text in human renderable form.) 9028 */ 9029 public Attachment getContentAttachment() throws FHIRException { 9030 if (this.content == null) 9031 return null; 9032 if (!(this.content instanceof Attachment)) 9033 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); 9034 return (Attachment) this.content; 9035 } 9036 9037 public boolean hasContentAttachment() { 9038 return this != null && this.content instanceof Attachment; 9039 } 9040 9041 /** 9042 * @return {@link #content} (Contract legal text in human renderable form.) 9043 */ 9044 public Reference getContentReference() throws FHIRException { 9045 if (this.content == null) 9046 return null; 9047 if (!(this.content instanceof Reference)) 9048 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); 9049 return (Reference) this.content; 9050 } 9051 9052 public boolean hasContentReference() { 9053 return this != null && this.content instanceof Reference; 9054 } 9055 9056 public boolean hasContent() { 9057 return this.content != null && !this.content.isEmpty(); 9058 } 9059 9060 /** 9061 * @param value {@link #content} (Contract legal text in human renderable form.) 9062 */ 9063 public LegalLanguageComponent setContent(Type value) { 9064 if (value != null && !(value instanceof Attachment || value instanceof Reference)) 9065 throw new Error("Not the right type for Contract.legal.content[x]: "+value.fhirType()); 9066 this.content = value; 9067 return this; 9068 } 9069 9070 protected void listChildren(List<Property> children) { 9071 super.listChildren(children); 9072 children.add(new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Contract legal text in human renderable form.", 0, 1, content)); 9073 } 9074 9075 @Override 9076 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 9077 switch (_hash) { 9078 case 264548711: /*content[x]*/ return new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Contract legal text in human renderable form.", 0, 1, content); 9079 case 951530617: /*content*/ return new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Contract legal text in human renderable form.", 0, 1, content); 9080 case -702028164: /*contentAttachment*/ return new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Contract legal text in human renderable form.", 0, 1, content); 9081 case 1193747154: /*contentReference*/ return new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Contract legal text in human renderable form.", 0, 1, content); 9082 default: return super.getNamedProperty(_hash, _name, _checkValid); 9083 } 9084 9085 } 9086 9087 @Override 9088 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9089 switch (hash) { 9090 case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // Type 9091 default: return super.getProperty(hash, name, checkValid); 9092 } 9093 9094 } 9095 9096 @Override 9097 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9098 switch (hash) { 9099 case 951530617: // content 9100 this.content = castToType(value); // Type 9101 return value; 9102 default: return super.setProperty(hash, name, value); 9103 } 9104 9105 } 9106 9107 @Override 9108 public Base setProperty(String name, Base value) throws FHIRException { 9109 if (name.equals("content[x]")) { 9110 this.content = castToType(value); // Type 9111 } else 9112 return super.setProperty(name, value); 9113 return value; 9114 } 9115 9116 @Override 9117 public Base makeProperty(int hash, String name) throws FHIRException { 9118 switch (hash) { 9119 case 264548711: return getContent(); 9120 case 951530617: return getContent(); 9121 default: return super.makeProperty(hash, name); 9122 } 9123 9124 } 9125 9126 @Override 9127 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9128 switch (hash) { 9129 case 951530617: /*content*/ return new String[] {"Attachment", "Reference"}; 9130 default: return super.getTypesForProperty(hash, name); 9131 } 9132 9133 } 9134 9135 @Override 9136 public Base addChild(String name) throws FHIRException { 9137 if (name.equals("contentAttachment")) { 9138 this.content = new Attachment(); 9139 return this.content; 9140 } 9141 else if (name.equals("contentReference")) { 9142 this.content = new Reference(); 9143 return this.content; 9144 } 9145 else 9146 return super.addChild(name); 9147 } 9148 9149 public LegalLanguageComponent copy() { 9150 LegalLanguageComponent dst = new LegalLanguageComponent(); 9151 copyValues(dst); 9152 dst.content = content == null ? null : content.copy(); 9153 return dst; 9154 } 9155 9156 @Override 9157 public boolean equalsDeep(Base other_) { 9158 if (!super.equalsDeep(other_)) 9159 return false; 9160 if (!(other_ instanceof LegalLanguageComponent)) 9161 return false; 9162 LegalLanguageComponent o = (LegalLanguageComponent) other_; 9163 return compareDeep(content, o.content, true); 9164 } 9165 9166 @Override 9167 public boolean equalsShallow(Base other_) { 9168 if (!super.equalsShallow(other_)) 9169 return false; 9170 if (!(other_ instanceof LegalLanguageComponent)) 9171 return false; 9172 LegalLanguageComponent o = (LegalLanguageComponent) other_; 9173 return true; 9174 } 9175 9176 public boolean isEmpty() { 9177 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(content); 9178 } 9179 9180 public String fhirType() { 9181 return "Contract.legal"; 9182 9183 } 9184 9185 } 9186 9187 @Block() 9188 public static class ComputableLanguageComponent extends BackboneElement implements IBaseBackboneElement { 9189 /** 9190 * Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal). 9191 */ 9192 @Child(name = "content", type = {Attachment.class, DocumentReference.class}, order=1, min=1, max=1, modifier=false, summary=false) 9193 @Description(shortDefinition="Computable Contract Rules", formalDefinition="Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal)." ) 9194 protected Type content; 9195 9196 private static final long serialVersionUID = -1763459053L; 9197 9198 /** 9199 * Constructor 9200 */ 9201 public ComputableLanguageComponent() { 9202 super(); 9203 } 9204 9205 /** 9206 * Constructor 9207 */ 9208 public ComputableLanguageComponent(Type content) { 9209 super(); 9210 this.content = content; 9211 } 9212 9213 /** 9214 * @return {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) 9215 */ 9216 public Type getContent() { 9217 return this.content; 9218 } 9219 9220 /** 9221 * @return {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) 9222 */ 9223 public Attachment getContentAttachment() throws FHIRException { 9224 if (this.content == null) 9225 return null; 9226 if (!(this.content instanceof Attachment)) 9227 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); 9228 return (Attachment) this.content; 9229 } 9230 9231 public boolean hasContentAttachment() { 9232 return this != null && this.content instanceof Attachment; 9233 } 9234 9235 /** 9236 * @return {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) 9237 */ 9238 public Reference getContentReference() throws FHIRException { 9239 if (this.content == null) 9240 return null; 9241 if (!(this.content instanceof Reference)) 9242 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); 9243 return (Reference) this.content; 9244 } 9245 9246 public boolean hasContentReference() { 9247 return this != null && this.content instanceof Reference; 9248 } 9249 9250 public boolean hasContent() { 9251 return this.content != null && !this.content.isEmpty(); 9252 } 9253 9254 /** 9255 * @param value {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) 9256 */ 9257 public ComputableLanguageComponent setContent(Type value) { 9258 if (value != null && !(value instanceof Attachment || value instanceof Reference)) 9259 throw new Error("Not the right type for Contract.rule.content[x]: "+value.fhirType()); 9260 this.content = value; 9261 return this; 9262 } 9263 9264 protected void listChildren(List<Property> children) { 9265 super.listChildren(children); 9266 children.add(new Property("content[x]", "Attachment|Reference(DocumentReference)", "Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).", 0, 1, content)); 9267 } 9268 9269 @Override 9270 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 9271 switch (_hash) { 9272 case 264548711: /*content[x]*/ return new Property("content[x]", "Attachment|Reference(DocumentReference)", "Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).", 0, 1, content); 9273 case 951530617: /*content*/ return new Property("content[x]", "Attachment|Reference(DocumentReference)", "Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).", 0, 1, content); 9274 case -702028164: /*contentAttachment*/ return new Property("content[x]", "Attachment|Reference(DocumentReference)", "Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).", 0, 1, content); 9275 case 1193747154: /*contentReference*/ return new Property("content[x]", "Attachment|Reference(DocumentReference)", "Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).", 0, 1, content); 9276 default: return super.getNamedProperty(_hash, _name, _checkValid); 9277 } 9278 9279 } 9280 9281 @Override 9282 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9283 switch (hash) { 9284 case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // Type 9285 default: return super.getProperty(hash, name, checkValid); 9286 } 9287 9288 } 9289 9290 @Override 9291 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9292 switch (hash) { 9293 case 951530617: // content 9294 this.content = castToType(value); // Type 9295 return value; 9296 default: return super.setProperty(hash, name, value); 9297 } 9298 9299 } 9300 9301 @Override 9302 public Base setProperty(String name, Base value) throws FHIRException { 9303 if (name.equals("content[x]")) { 9304 this.content = castToType(value); // Type 9305 } else 9306 return super.setProperty(name, value); 9307 return value; 9308 } 9309 9310 @Override 9311 public Base makeProperty(int hash, String name) throws FHIRException { 9312 switch (hash) { 9313 case 264548711: return getContent(); 9314 case 951530617: return getContent(); 9315 default: return super.makeProperty(hash, name); 9316 } 9317 9318 } 9319 9320 @Override 9321 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9322 switch (hash) { 9323 case 951530617: /*content*/ return new String[] {"Attachment", "Reference"}; 9324 default: return super.getTypesForProperty(hash, name); 9325 } 9326 9327 } 9328 9329 @Override 9330 public Base addChild(String name) throws FHIRException { 9331 if (name.equals("contentAttachment")) { 9332 this.content = new Attachment(); 9333 return this.content; 9334 } 9335 else if (name.equals("contentReference")) { 9336 this.content = new Reference(); 9337 return this.content; 9338 } 9339 else 9340 return super.addChild(name); 9341 } 9342 9343 public ComputableLanguageComponent copy() { 9344 ComputableLanguageComponent dst = new ComputableLanguageComponent(); 9345 copyValues(dst); 9346 dst.content = content == null ? null : content.copy(); 9347 return dst; 9348 } 9349 9350 @Override 9351 public boolean equalsDeep(Base other_) { 9352 if (!super.equalsDeep(other_)) 9353 return false; 9354 if (!(other_ instanceof ComputableLanguageComponent)) 9355 return false; 9356 ComputableLanguageComponent o = (ComputableLanguageComponent) other_; 9357 return compareDeep(content, o.content, true); 9358 } 9359 9360 @Override 9361 public boolean equalsShallow(Base other_) { 9362 if (!super.equalsShallow(other_)) 9363 return false; 9364 if (!(other_ instanceof ComputableLanguageComponent)) 9365 return false; 9366 ComputableLanguageComponent o = (ComputableLanguageComponent) other_; 9367 return true; 9368 } 9369 9370 public boolean isEmpty() { 9371 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(content); 9372 } 9373 9374 public String fhirType() { 9375 return "Contract.rule"; 9376 9377 } 9378 9379 } 9380 9381 /** 9382 * Unique identifier for this Contract or a derivative that references a Source Contract. 9383 */ 9384 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 9385 @Description(shortDefinition="Contract number", formalDefinition="Unique identifier for this Contract or a derivative that references a Source Contract." ) 9386 protected List<Identifier> identifier; 9387 9388 /** 9389 * Canonical identifier for this contract, represented as a URI (globally unique). 9390 */ 9391 @Child(name = "url", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false) 9392 @Description(shortDefinition="Basal definition", formalDefinition="Canonical identifier for this contract, represented as a URI (globally unique)." ) 9393 protected UriType url; 9394 9395 /** 9396 * An edition identifier used for business purposes to label business significant variants. 9397 */ 9398 @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 9399 @Description(shortDefinition="Business edition", formalDefinition="An edition identifier used for business purposes to label business significant variants." ) 9400 protected StringType version; 9401 9402 /** 9403 * The status of the resource instance. 9404 */ 9405 @Child(name = "status", type = {CodeType.class}, order=3, min=0, max=1, modifier=true, summary=true) 9406 @Description(shortDefinition="draft | active | suspended | cancelled | completed | entered-in-error | unknown", formalDefinition="The status of the resource instance." ) 9407 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-status") 9408 protected Enumeration<ContractStatus> status; 9409 9410 /** 9411 * Legal states of the formation of a legal instrument, which is a formally executed written document that can be formally attributed to its author, records and formally expresses a legally enforceable act, process, or contractual duty, obligation, or right, and therefore evidences that act, process, or agreement. 9412 */ 9413 @Child(name = "legalState", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 9414 @Description(shortDefinition="Negotiation status", formalDefinition="Legal states of the formation of a legal instrument, which is a formally executed written document that can be formally attributed to its author, records and formally expresses a legally enforceable act, process, or contractual duty, obligation, or right, and therefore evidences that act, process, or agreement." ) 9415 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-legalstate") 9416 protected CodeableConcept legalState; 9417 9418 /** 9419 * The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract. 9420 */ 9421 @Child(name = "instantiatesCanonical", type = {Contract.class}, order=5, min=0, max=1, modifier=false, summary=false) 9422 @Description(shortDefinition="Source Contract Definition", formalDefinition="The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract." ) 9423 protected Reference instantiatesCanonical; 9424 9425 /** 9426 * The actual object that is the target of the reference (The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.) 9427 */ 9428 protected Contract instantiatesCanonicalTarget; 9429 9430 /** 9431 * The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract. 9432 */ 9433 @Child(name = "instantiatesUri", type = {UriType.class}, order=6, min=0, max=1, modifier=false, summary=false) 9434 @Description(shortDefinition="External Contract Definition", formalDefinition="The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract." ) 9435 protected UriType instantiatesUri; 9436 9437 /** 9438 * The minimal content derived from the basal information source at a specific stage in its lifecycle. 9439 */ 9440 @Child(name = "contentDerivative", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false) 9441 @Description(shortDefinition="Content derived from the basal information", formalDefinition="The minimal content derived from the basal information source at a specific stage in its lifecycle." ) 9442 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-content-derivative") 9443 protected CodeableConcept contentDerivative; 9444 9445 /** 9446 * When this Contract was issued. 9447 */ 9448 @Child(name = "issued", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) 9449 @Description(shortDefinition="When this Contract was issued", formalDefinition="When this Contract was issued." ) 9450 protected DateTimeType issued; 9451 9452 /** 9453 * Relevant time or time-period when this Contract is applicable. 9454 */ 9455 @Child(name = "applies", type = {Period.class}, order=9, min=0, max=1, modifier=false, summary=true) 9456 @Description(shortDefinition="Effective time", formalDefinition="Relevant time or time-period when this Contract is applicable." ) 9457 protected Period applies; 9458 9459 /** 9460 * Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract. 9461 */ 9462 @Child(name = "expirationType", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=false) 9463 @Description(shortDefinition="Contract cessation cause", formalDefinition="Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract." ) 9464 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-expiration-type") 9465 protected CodeableConcept expirationType; 9466 9467 /** 9468 * The target entity impacted by or of interest to parties to the agreement. 9469 */ 9470 @Child(name = "subject", type = {Reference.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 9471 @Description(shortDefinition="Contract Target Entity", formalDefinition="The target entity impacted by or of interest to parties to the agreement." ) 9472 protected List<Reference> subject; 9473 /** 9474 * The actual objects that are the target of the reference (The target entity impacted by or of interest to parties to the agreement.) 9475 */ 9476 protected List<Resource> subjectTarget; 9477 9478 9479 /** 9480 * A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies. 9481 */ 9482 @Child(name = "authority", type = {Organization.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9483 @Description(shortDefinition="Authority under which this Contract has standing", formalDefinition="A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies." ) 9484 protected List<Reference> authority; 9485 /** 9486 * The actual objects that are the target of the reference (A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.) 9487 */ 9488 protected List<Organization> authorityTarget; 9489 9490 9491 /** 9492 * Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources. 9493 */ 9494 @Child(name = "domain", type = {Location.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9495 @Description(shortDefinition="A sphere of control governed by an authoritative jurisdiction, organization, or person", formalDefinition="Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources." ) 9496 protected List<Reference> domain; 9497 /** 9498 * The actual objects that are the target of the reference (Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.) 9499 */ 9500 protected List<Location> domainTarget; 9501 9502 9503 /** 9504 * Sites in which the contract is complied with, exercised, or in force. 9505 */ 9506 @Child(name = "site", type = {Location.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9507 @Description(shortDefinition="Specific Location", formalDefinition="Sites in which the contract is complied with, exercised, or in force." ) 9508 protected List<Reference> site; 9509 /** 9510 * The actual objects that are the target of the reference (Sites in which the contract is complied with, exercised, or in force.) 9511 */ 9512 protected List<Location> siteTarget; 9513 9514 9515 /** 9516 * A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation. 9517 */ 9518 @Child(name = "name", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=true) 9519 @Description(shortDefinition="Computer friendly designation", formalDefinition="A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation." ) 9520 protected StringType name; 9521 9522 /** 9523 * A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content. 9524 */ 9525 @Child(name = "title", type = {StringType.class}, order=16, min=0, max=1, modifier=false, summary=true) 9526 @Description(shortDefinition="Human Friendly name", formalDefinition="A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content." ) 9527 protected StringType title; 9528 9529 /** 9530 * An explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content. 9531 */ 9532 @Child(name = "subtitle", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false) 9533 @Description(shortDefinition="Subordinate Friendly name", formalDefinition="An explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content." ) 9534 protected StringType subtitle; 9535 9536 /** 9537 * Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation. 9538 */ 9539 @Child(name = "alias", type = {StringType.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9540 @Description(shortDefinition="Acronym or short name", formalDefinition="Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation." ) 9541 protected List<StringType> alias; 9542 9543 /** 9544 * The individual or organization that authored the Contract definition, derivative, or instance in any legal state. 9545 */ 9546 @Child(name = "author", type = {Person.class, Patient.class, Practitioner.class, Organization.class}, order=19, min=0, max=1, modifier=false, summary=false) 9547 @Description(shortDefinition="Source of Contract", formalDefinition="The individual or organization that authored the Contract definition, derivative, or instance in any legal state." ) 9548 protected Reference author; 9549 9550 /** 9551 * The actual object that is the target of the reference (The individual or organization that authored the Contract definition, derivative, or instance in any legal state.) 9552 */ 9553 protected Resource authorTarget; 9554 9555 /** 9556 * A selector of legal concerns for this Contract definition, derivative, or instance in any legal state. 9557 */ 9558 @Child(name = "scope", type = {CodeableConcept.class}, order=20, min=0, max=1, modifier=false, summary=false) 9559 @Description(shortDefinition="Range of Legal Concerns", formalDefinition="A selector of legal concerns for this Contract definition, derivative, or instance in any legal state." ) 9560 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-scope") 9561 protected CodeableConcept scope; 9562 9563 /** 9564 * Narrows the range of legal concerns to focus on the achievement of specific contractual objectives. 9565 */ 9566 @Child(name = "topic", type = {CodeableConcept.class, Reference.class}, order=21, min=0, max=1, modifier=false, summary=false) 9567 @Description(shortDefinition="Focus of contract interest", formalDefinition="Narrows the range of legal concerns to focus on the achievement of specific contractual objectives." ) 9568 protected Type topic; 9569 9570 /** 9571 * A high-level category for the legal instrument, whether constructed as a Contract definition, derivative, or instance in any legal state. Provides additional information about its content within the context of the Contract's scope to distinguish the kinds of systems that would be interested in the contract. 9572 */ 9573 @Child(name = "type", type = {CodeableConcept.class}, order=22, min=0, max=1, modifier=false, summary=true) 9574 @Description(shortDefinition="Legal instrument category", formalDefinition="A high-level category for the legal instrument, whether constructed as a Contract definition, derivative, or instance in any legal state. Provides additional information about its content within the context of the Contract's scope to distinguish the kinds of systems that would be interested in the contract." ) 9575 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-type") 9576 protected CodeableConcept type; 9577 9578 /** 9579 * Sub-category for the Contract that distinguishes the kinds of systems that would be interested in the Contract within the context of the Contract's scope. 9580 */ 9581 @Child(name = "subType", type = {CodeableConcept.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 9582 @Description(shortDefinition="Subtype within the context of type", formalDefinition="Sub-category for the Contract that distinguishes the kinds of systems that would be interested in the Contract within the context of the Contract's scope." ) 9583 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-subtype") 9584 protected List<CodeableConcept> subType; 9585 9586 /** 9587 * Precusory content developed with a focus and intent of supporting the formation a Contract instance, which may be associated with and transformable into a Contract. 9588 */ 9589 @Child(name = "contentDefinition", type = {}, order=24, min=0, max=1, modifier=false, summary=false) 9590 @Description(shortDefinition="Contract precursor content", formalDefinition="Precusory content developed with a focus and intent of supporting the formation a Contract instance, which may be associated with and transformable into a Contract." ) 9591 protected ContentDefinitionComponent contentDefinition; 9592 9593 /** 9594 * One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups. 9595 */ 9596 @Child(name = "term", type = {}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9597 @Description(shortDefinition="Contract Term List", formalDefinition="One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups." ) 9598 protected List<TermComponent> term; 9599 9600 /** 9601 * Information that may be needed by/relevant to the performer in their execution of this term action. 9602 */ 9603 @Child(name = "supportingInfo", type = {Reference.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9604 @Description(shortDefinition="Extra Information", formalDefinition="Information that may be needed by/relevant to the performer in their execution of this term action." ) 9605 protected List<Reference> supportingInfo; 9606 /** 9607 * The actual objects that are the target of the reference (Information that may be needed by/relevant to the performer in their execution of this term action.) 9608 */ 9609 protected List<Resource> supportingInfoTarget; 9610 9611 9612 /** 9613 * Links to Provenance records for past versions of this Contract definition, derivative, or instance, which identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the Contract. The Provence.entity indicates the target that was changed in the update. http://build.fhir.org/provenance-definitions.html#Provenance.entity. 9614 */ 9615 @Child(name = "relevantHistory", type = {Provenance.class}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9616 @Description(shortDefinition="Key event in Contract History", formalDefinition="Links to Provenance records for past versions of this Contract definition, derivative, or instance, which identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the Contract. The Provence.entity indicates the target that was changed in the update. http://build.fhir.org/provenance-definitions.html#Provenance.entity." ) 9617 protected List<Reference> relevantHistory; 9618 /** 9619 * The actual objects that are the target of the reference (Links to Provenance records for past versions of this Contract definition, derivative, or instance, which identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the Contract. The Provence.entity indicates the target that was changed in the update. http://build.fhir.org/provenance-definitions.html#Provenance.entity.) 9620 */ 9621 protected List<Provenance> relevantHistoryTarget; 9622 9623 9624 /** 9625 * Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness. 9626 */ 9627 @Child(name = "signer", type = {}, order=28, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9628 @Description(shortDefinition="Contract Signatory", formalDefinition="Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness." ) 9629 protected List<SignatoryComponent> signer; 9630 9631 /** 9632 * The "patient friendly language" versionof the Contract in whole or in parts. "Patient friendly language" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement. 9633 */ 9634 @Child(name = "friendly", type = {}, order=29, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9635 @Description(shortDefinition="Contract Friendly Language", formalDefinition="The \"patient friendly language\" versionof the Contract in whole or in parts. \"Patient friendly language\" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement." ) 9636 protected List<FriendlyLanguageComponent> friendly; 9637 9638 /** 9639 * List of Legal expressions or representations of this Contract. 9640 */ 9641 @Child(name = "legal", type = {}, order=30, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9642 @Description(shortDefinition="Contract Legal Language", formalDefinition="List of Legal expressions or representations of this Contract." ) 9643 protected List<LegalLanguageComponent> legal; 9644 9645 /** 9646 * List of Computable Policy Rule Language Representations of this Contract. 9647 */ 9648 @Child(name = "rule", type = {}, order=31, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9649 @Description(shortDefinition="Computable Contract Language", formalDefinition="List of Computable Policy Rule Language Representations of this Contract." ) 9650 protected List<ComputableLanguageComponent> rule; 9651 9652 /** 9653 * Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract. 9654 */ 9655 @Child(name = "legallyBinding", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class, Contract.class}, order=32, min=0, max=1, modifier=false, summary=false) 9656 @Description(shortDefinition="Binding Contract", formalDefinition="Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the \"source of truth\" and which would be the basis for legal action related to enforcement of this Contract." ) 9657 protected Type legallyBinding; 9658 9659 private static final long serialVersionUID = -1388892487L; 9660 9661 /** 9662 * Constructor 9663 */ 9664 public Contract() { 9665 super(); 9666 } 9667 9668 /** 9669 * @return {@link #identifier} (Unique identifier for this Contract or a derivative that references a Source Contract.) 9670 */ 9671 public List<Identifier> getIdentifier() { 9672 if (this.identifier == null) 9673 this.identifier = new ArrayList<Identifier>(); 9674 return this.identifier; 9675 } 9676 9677 /** 9678 * @return Returns a reference to <code>this</code> for easy method chaining 9679 */ 9680 public Contract setIdentifier(List<Identifier> theIdentifier) { 9681 this.identifier = theIdentifier; 9682 return this; 9683 } 9684 9685 public boolean hasIdentifier() { 9686 if (this.identifier == null) 9687 return false; 9688 for (Identifier item : this.identifier) 9689 if (!item.isEmpty()) 9690 return true; 9691 return false; 9692 } 9693 9694 public Identifier addIdentifier() { //3 9695 Identifier t = new Identifier(); 9696 if (this.identifier == null) 9697 this.identifier = new ArrayList<Identifier>(); 9698 this.identifier.add(t); 9699 return t; 9700 } 9701 9702 public Contract addIdentifier(Identifier t) { //3 9703 if (t == null) 9704 return this; 9705 if (this.identifier == null) 9706 this.identifier = new ArrayList<Identifier>(); 9707 this.identifier.add(t); 9708 return this; 9709 } 9710 9711 /** 9712 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 9713 */ 9714 public Identifier getIdentifierFirstRep() { 9715 if (getIdentifier().isEmpty()) { 9716 addIdentifier(); 9717 } 9718 return getIdentifier().get(0); 9719 } 9720 9721 /** 9722 * @return {@link #url} (Canonical identifier for this contract, represented as a URI (globally unique).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 9723 */ 9724 public UriType getUrlElement() { 9725 if (this.url == null) 9726 if (Configuration.errorOnAutoCreate()) 9727 throw new Error("Attempt to auto-create Contract.url"); 9728 else if (Configuration.doAutoCreate()) 9729 this.url = new UriType(); // bb 9730 return this.url; 9731 } 9732 9733 public boolean hasUrlElement() { 9734 return this.url != null && !this.url.isEmpty(); 9735 } 9736 9737 public boolean hasUrl() { 9738 return this.url != null && !this.url.isEmpty(); 9739 } 9740 9741 /** 9742 * @param value {@link #url} (Canonical identifier for this contract, represented as a URI (globally unique).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 9743 */ 9744 public Contract setUrlElement(UriType value) { 9745 this.url = value; 9746 return this; 9747 } 9748 9749 /** 9750 * @return Canonical identifier for this contract, represented as a URI (globally unique). 9751 */ 9752 public String getUrl() { 9753 return this.url == null ? null : this.url.getValue(); 9754 } 9755 9756 /** 9757 * @param value Canonical identifier for this contract, represented as a URI (globally unique). 9758 */ 9759 public Contract setUrl(String value) { 9760 if (Utilities.noString(value)) 9761 this.url = null; 9762 else { 9763 if (this.url == null) 9764 this.url = new UriType(); 9765 this.url.setValue(value); 9766 } 9767 return this; 9768 } 9769 9770 /** 9771 * @return {@link #version} (An edition identifier used for business purposes to label business significant variants.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 9772 */ 9773 public StringType getVersionElement() { 9774 if (this.version == null) 9775 if (Configuration.errorOnAutoCreate()) 9776 throw new Error("Attempt to auto-create Contract.version"); 9777 else if (Configuration.doAutoCreate()) 9778 this.version = new StringType(); // bb 9779 return this.version; 9780 } 9781 9782 public boolean hasVersionElement() { 9783 return this.version != null && !this.version.isEmpty(); 9784 } 9785 9786 public boolean hasVersion() { 9787 return this.version != null && !this.version.isEmpty(); 9788 } 9789 9790 /** 9791 * @param value {@link #version} (An edition identifier used for business purposes to label business significant variants.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 9792 */ 9793 public Contract setVersionElement(StringType value) { 9794 this.version = value; 9795 return this; 9796 } 9797 9798 /** 9799 * @return An edition identifier used for business purposes to label business significant variants. 9800 */ 9801 public String getVersion() { 9802 return this.version == null ? null : this.version.getValue(); 9803 } 9804 9805 /** 9806 * @param value An edition identifier used for business purposes to label business significant variants. 9807 */ 9808 public Contract setVersion(String value) { 9809 if (Utilities.noString(value)) 9810 this.version = null; 9811 else { 9812 if (this.version == null) 9813 this.version = new StringType(); 9814 this.version.setValue(value); 9815 } 9816 return this; 9817 } 9818 9819 /** 9820 * @return {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 9821 */ 9822 public Enumeration<ContractStatus> getStatusElement() { 9823 if (this.status == null) 9824 if (Configuration.errorOnAutoCreate()) 9825 throw new Error("Attempt to auto-create Contract.status"); 9826 else if (Configuration.doAutoCreate()) 9827 this.status = new Enumeration<ContractStatus>(new ContractStatusEnumFactory()); // bb 9828 return this.status; 9829 } 9830 9831 public boolean hasStatusElement() { 9832 return this.status != null && !this.status.isEmpty(); 9833 } 9834 9835 public boolean hasStatus() { 9836 return this.status != null && !this.status.isEmpty(); 9837 } 9838 9839 /** 9840 * @param value {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 9841 */ 9842 public Contract setStatusElement(Enumeration<ContractStatus> value) { 9843 this.status = value; 9844 return this; 9845 } 9846 9847 /** 9848 * @return The status of the resource instance. 9849 */ 9850 public ContractStatus getStatus() { 9851 return this.status == null ? null : this.status.getValue(); 9852 } 9853 9854 /** 9855 * @param value The status of the resource instance. 9856 */ 9857 public Contract setStatus(ContractStatus value) { 9858 if (value == null) 9859 this.status = null; 9860 else { 9861 if (this.status == null) 9862 this.status = new Enumeration<ContractStatus>(new ContractStatusEnumFactory()); 9863 this.status.setValue(value); 9864 } 9865 return this; 9866 } 9867 9868 /** 9869 * @return {@link #legalState} (Legal states of the formation of a legal instrument, which is a formally executed written document that can be formally attributed to its author, records and formally expresses a legally enforceable act, process, or contractual duty, obligation, or right, and therefore evidences that act, process, or agreement.) 9870 */ 9871 public CodeableConcept getLegalState() { 9872 if (this.legalState == null) 9873 if (Configuration.errorOnAutoCreate()) 9874 throw new Error("Attempt to auto-create Contract.legalState"); 9875 else if (Configuration.doAutoCreate()) 9876 this.legalState = new CodeableConcept(); // cc 9877 return this.legalState; 9878 } 9879 9880 public boolean hasLegalState() { 9881 return this.legalState != null && !this.legalState.isEmpty(); 9882 } 9883 9884 /** 9885 * @param value {@link #legalState} (Legal states of the formation of a legal instrument, which is a formally executed written document that can be formally attributed to its author, records and formally expresses a legally enforceable act, process, or contractual duty, obligation, or right, and therefore evidences that act, process, or agreement.) 9886 */ 9887 public Contract setLegalState(CodeableConcept value) { 9888 this.legalState = value; 9889 return this; 9890 } 9891 9892 /** 9893 * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.) 9894 */ 9895 public Reference getInstantiatesCanonical() { 9896 if (this.instantiatesCanonical == null) 9897 if (Configuration.errorOnAutoCreate()) 9898 throw new Error("Attempt to auto-create Contract.instantiatesCanonical"); 9899 else if (Configuration.doAutoCreate()) 9900 this.instantiatesCanonical = new Reference(); // cc 9901 return this.instantiatesCanonical; 9902 } 9903 9904 public boolean hasInstantiatesCanonical() { 9905 return this.instantiatesCanonical != null && !this.instantiatesCanonical.isEmpty(); 9906 } 9907 9908 /** 9909 * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.) 9910 */ 9911 public Contract setInstantiatesCanonical(Reference value) { 9912 this.instantiatesCanonical = value; 9913 return this; 9914 } 9915 9916 /** 9917 * @return {@link #instantiatesCanonical} 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 URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.) 9918 */ 9919 public Contract getInstantiatesCanonicalTarget() { 9920 if (this.instantiatesCanonicalTarget == null) 9921 if (Configuration.errorOnAutoCreate()) 9922 throw new Error("Attempt to auto-create Contract.instantiatesCanonical"); 9923 else if (Configuration.doAutoCreate()) 9924 this.instantiatesCanonicalTarget = new Contract(); // aa 9925 return this.instantiatesCanonicalTarget; 9926 } 9927 9928 /** 9929 * @param value {@link #instantiatesCanonical} 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 URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.) 9930 */ 9931 public Contract setInstantiatesCanonicalTarget(Contract value) { 9932 this.instantiatesCanonicalTarget = value; 9933 return this; 9934 } 9935 9936 /** 9937 * @return {@link #instantiatesUri} (The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract.). This is the underlying object with id, value and extensions. The accessor "getInstantiatesUri" gives direct access to the value 9938 */ 9939 public UriType getInstantiatesUriElement() { 9940 if (this.instantiatesUri == null) 9941 if (Configuration.errorOnAutoCreate()) 9942 throw new Error("Attempt to auto-create Contract.instantiatesUri"); 9943 else if (Configuration.doAutoCreate()) 9944 this.instantiatesUri = new UriType(); // bb 9945 return this.instantiatesUri; 9946 } 9947 9948 public boolean hasInstantiatesUriElement() { 9949 return this.instantiatesUri != null && !this.instantiatesUri.isEmpty(); 9950 } 9951 9952 public boolean hasInstantiatesUri() { 9953 return this.instantiatesUri != null && !this.instantiatesUri.isEmpty(); 9954 } 9955 9956 /** 9957 * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract.). This is the underlying object with id, value and extensions. The accessor "getInstantiatesUri" gives direct access to the value 9958 */ 9959 public Contract setInstantiatesUriElement(UriType value) { 9960 this.instantiatesUri = value; 9961 return this; 9962 } 9963 9964 /** 9965 * @return The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract. 9966 */ 9967 public String getInstantiatesUri() { 9968 return this.instantiatesUri == null ? null : this.instantiatesUri.getValue(); 9969 } 9970 9971 /** 9972 * @param value The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract. 9973 */ 9974 public Contract setInstantiatesUri(String value) { 9975 if (Utilities.noString(value)) 9976 this.instantiatesUri = null; 9977 else { 9978 if (this.instantiatesUri == null) 9979 this.instantiatesUri = new UriType(); 9980 this.instantiatesUri.setValue(value); 9981 } 9982 return this; 9983 } 9984 9985 /** 9986 * @return {@link #contentDerivative} (The minimal content derived from the basal information source at a specific stage in its lifecycle.) 9987 */ 9988 public CodeableConcept getContentDerivative() { 9989 if (this.contentDerivative == null) 9990 if (Configuration.errorOnAutoCreate()) 9991 throw new Error("Attempt to auto-create Contract.contentDerivative"); 9992 else if (Configuration.doAutoCreate()) 9993 this.contentDerivative = new CodeableConcept(); // cc 9994 return this.contentDerivative; 9995 } 9996 9997 public boolean hasContentDerivative() { 9998 return this.contentDerivative != null && !this.contentDerivative.isEmpty(); 9999 } 10000 10001 /** 10002 * @param value {@link #contentDerivative} (The minimal content derived from the basal information source at a specific stage in its lifecycle.) 10003 */ 10004 public Contract setContentDerivative(CodeableConcept value) { 10005 this.contentDerivative = value; 10006 return this; 10007 } 10008 10009 /** 10010 * @return {@link #issued} (When this Contract was issued.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value 10011 */ 10012 public DateTimeType getIssuedElement() { 10013 if (this.issued == null) 10014 if (Configuration.errorOnAutoCreate()) 10015 throw new Error("Attempt to auto-create Contract.issued"); 10016 else if (Configuration.doAutoCreate()) 10017 this.issued = new DateTimeType(); // bb 10018 return this.issued; 10019 } 10020 10021 public boolean hasIssuedElement() { 10022 return this.issued != null && !this.issued.isEmpty(); 10023 } 10024 10025 public boolean hasIssued() { 10026 return this.issued != null && !this.issued.isEmpty(); 10027 } 10028 10029 /** 10030 * @param value {@link #issued} (When this Contract was issued.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value 10031 */ 10032 public Contract setIssuedElement(DateTimeType value) { 10033 this.issued = value; 10034 return this; 10035 } 10036 10037 /** 10038 * @return When this Contract was issued. 10039 */ 10040 public Date getIssued() { 10041 return this.issued == null ? null : this.issued.getValue(); 10042 } 10043 10044 /** 10045 * @param value When this Contract was issued. 10046 */ 10047 public Contract setIssued(Date value) { 10048 if (value == null) 10049 this.issued = null; 10050 else { 10051 if (this.issued == null) 10052 this.issued = new DateTimeType(); 10053 this.issued.setValue(value); 10054 } 10055 return this; 10056 } 10057 10058 /** 10059 * @return {@link #applies} (Relevant time or time-period when this Contract is applicable.) 10060 */ 10061 public Period getApplies() { 10062 if (this.applies == null) 10063 if (Configuration.errorOnAutoCreate()) 10064 throw new Error("Attempt to auto-create Contract.applies"); 10065 else if (Configuration.doAutoCreate()) 10066 this.applies = new Period(); // cc 10067 return this.applies; 10068 } 10069 10070 public boolean hasApplies() { 10071 return this.applies != null && !this.applies.isEmpty(); 10072 } 10073 10074 /** 10075 * @param value {@link #applies} (Relevant time or time-period when this Contract is applicable.) 10076 */ 10077 public Contract setApplies(Period value) { 10078 this.applies = value; 10079 return this; 10080 } 10081 10082 /** 10083 * @return {@link #expirationType} (Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract.) 10084 */ 10085 public CodeableConcept getExpirationType() { 10086 if (this.expirationType == null) 10087 if (Configuration.errorOnAutoCreate()) 10088 throw new Error("Attempt to auto-create Contract.expirationType"); 10089 else if (Configuration.doAutoCreate()) 10090 this.expirationType = new CodeableConcept(); // cc 10091 return this.expirationType; 10092 } 10093 10094 public boolean hasExpirationType() { 10095 return this.expirationType != null && !this.expirationType.isEmpty(); 10096 } 10097 10098 /** 10099 * @param value {@link #expirationType} (Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract.) 10100 */ 10101 public Contract setExpirationType(CodeableConcept value) { 10102 this.expirationType = value; 10103 return this; 10104 } 10105 10106 /** 10107 * @return {@link #subject} (The target entity impacted by or of interest to parties to the agreement.) 10108 */ 10109 public List<Reference> getSubject() { 10110 if (this.subject == null) 10111 this.subject = new ArrayList<Reference>(); 10112 return this.subject; 10113 } 10114 10115 /** 10116 * @return Returns a reference to <code>this</code> for easy method chaining 10117 */ 10118 public Contract setSubject(List<Reference> theSubject) { 10119 this.subject = theSubject; 10120 return this; 10121 } 10122 10123 public boolean hasSubject() { 10124 if (this.subject == null) 10125 return false; 10126 for (Reference item : this.subject) 10127 if (!item.isEmpty()) 10128 return true; 10129 return false; 10130 } 10131 10132 public Reference addSubject() { //3 10133 Reference t = new Reference(); 10134 if (this.subject == null) 10135 this.subject = new ArrayList<Reference>(); 10136 this.subject.add(t); 10137 return t; 10138 } 10139 10140 public Contract addSubject(Reference t) { //3 10141 if (t == null) 10142 return this; 10143 if (this.subject == null) 10144 this.subject = new ArrayList<Reference>(); 10145 this.subject.add(t); 10146 return this; 10147 } 10148 10149 /** 10150 * @return The first repetition of repeating field {@link #subject}, creating it if it does not already exist 10151 */ 10152 public Reference getSubjectFirstRep() { 10153 if (getSubject().isEmpty()) { 10154 addSubject(); 10155 } 10156 return getSubject().get(0); 10157 } 10158 10159 /** 10160 * @deprecated Use Reference#setResource(IBaseResource) instead 10161 */ 10162 @Deprecated 10163 public List<Resource> getSubjectTarget() { 10164 if (this.subjectTarget == null) 10165 this.subjectTarget = new ArrayList<Resource>(); 10166 return this.subjectTarget; 10167 } 10168 10169 /** 10170 * @return {@link #authority} (A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.) 10171 */ 10172 public List<Reference> getAuthority() { 10173 if (this.authority == null) 10174 this.authority = new ArrayList<Reference>(); 10175 return this.authority; 10176 } 10177 10178 /** 10179 * @return Returns a reference to <code>this</code> for easy method chaining 10180 */ 10181 public Contract setAuthority(List<Reference> theAuthority) { 10182 this.authority = theAuthority; 10183 return this; 10184 } 10185 10186 public boolean hasAuthority() { 10187 if (this.authority == null) 10188 return false; 10189 for (Reference item : this.authority) 10190 if (!item.isEmpty()) 10191 return true; 10192 return false; 10193 } 10194 10195 public Reference addAuthority() { //3 10196 Reference t = new Reference(); 10197 if (this.authority == null) 10198 this.authority = new ArrayList<Reference>(); 10199 this.authority.add(t); 10200 return t; 10201 } 10202 10203 public Contract addAuthority(Reference t) { //3 10204 if (t == null) 10205 return this; 10206 if (this.authority == null) 10207 this.authority = new ArrayList<Reference>(); 10208 this.authority.add(t); 10209 return this; 10210 } 10211 10212 /** 10213 * @return The first repetition of repeating field {@link #authority}, creating it if it does not already exist 10214 */ 10215 public Reference getAuthorityFirstRep() { 10216 if (getAuthority().isEmpty()) { 10217 addAuthority(); 10218 } 10219 return getAuthority().get(0); 10220 } 10221 10222 /** 10223 * @deprecated Use Reference#setResource(IBaseResource) instead 10224 */ 10225 @Deprecated 10226 public List<Organization> getAuthorityTarget() { 10227 if (this.authorityTarget == null) 10228 this.authorityTarget = new ArrayList<Organization>(); 10229 return this.authorityTarget; 10230 } 10231 10232 /** 10233 * @deprecated Use Reference#setResource(IBaseResource) instead 10234 */ 10235 @Deprecated 10236 public Organization addAuthorityTarget() { 10237 Organization r = new Organization(); 10238 if (this.authorityTarget == null) 10239 this.authorityTarget = new ArrayList<Organization>(); 10240 this.authorityTarget.add(r); 10241 return r; 10242 } 10243 10244 /** 10245 * @return {@link #domain} (Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.) 10246 */ 10247 public List<Reference> getDomain() { 10248 if (this.domain == null) 10249 this.domain = new ArrayList<Reference>(); 10250 return this.domain; 10251 } 10252 10253 /** 10254 * @return Returns a reference to <code>this</code> for easy method chaining 10255 */ 10256 public Contract setDomain(List<Reference> theDomain) { 10257 this.domain = theDomain; 10258 return this; 10259 } 10260 10261 public boolean hasDomain() { 10262 if (this.domain == null) 10263 return false; 10264 for (Reference item : this.domain) 10265 if (!item.isEmpty()) 10266 return true; 10267 return false; 10268 } 10269 10270 public Reference addDomain() { //3 10271 Reference t = new Reference(); 10272 if (this.domain == null) 10273 this.domain = new ArrayList<Reference>(); 10274 this.domain.add(t); 10275 return t; 10276 } 10277 10278 public Contract addDomain(Reference t) { //3 10279 if (t == null) 10280 return this; 10281 if (this.domain == null) 10282 this.domain = new ArrayList<Reference>(); 10283 this.domain.add(t); 10284 return this; 10285 } 10286 10287 /** 10288 * @return The first repetition of repeating field {@link #domain}, creating it if it does not already exist 10289 */ 10290 public Reference getDomainFirstRep() { 10291 if (getDomain().isEmpty()) { 10292 addDomain(); 10293 } 10294 return getDomain().get(0); 10295 } 10296 10297 /** 10298 * @deprecated Use Reference#setResource(IBaseResource) instead 10299 */ 10300 @Deprecated 10301 public List<Location> getDomainTarget() { 10302 if (this.domainTarget == null) 10303 this.domainTarget = new ArrayList<Location>(); 10304 return this.domainTarget; 10305 } 10306 10307 /** 10308 * @deprecated Use Reference#setResource(IBaseResource) instead 10309 */ 10310 @Deprecated 10311 public Location addDomainTarget() { 10312 Location r = new Location(); 10313 if (this.domainTarget == null) 10314 this.domainTarget = new ArrayList<Location>(); 10315 this.domainTarget.add(r); 10316 return r; 10317 } 10318 10319 /** 10320 * @return {@link #site} (Sites in which the contract is complied with, exercised, or in force.) 10321 */ 10322 public List<Reference> getSite() { 10323 if (this.site == null) 10324 this.site = new ArrayList<Reference>(); 10325 return this.site; 10326 } 10327 10328 /** 10329 * @return Returns a reference to <code>this</code> for easy method chaining 10330 */ 10331 public Contract setSite(List<Reference> theSite) { 10332 this.site = theSite; 10333 return this; 10334 } 10335 10336 public boolean hasSite() { 10337 if (this.site == null) 10338 return false; 10339 for (Reference item : this.site) 10340 if (!item.isEmpty()) 10341 return true; 10342 return false; 10343 } 10344 10345 public Reference addSite() { //3 10346 Reference t = new Reference(); 10347 if (this.site == null) 10348 this.site = new ArrayList<Reference>(); 10349 this.site.add(t); 10350 return t; 10351 } 10352 10353 public Contract addSite(Reference t) { //3 10354 if (t == null) 10355 return this; 10356 if (this.site == null) 10357 this.site = new ArrayList<Reference>(); 10358 this.site.add(t); 10359 return this; 10360 } 10361 10362 /** 10363 * @return The first repetition of repeating field {@link #site}, creating it if it does not already exist 10364 */ 10365 public Reference getSiteFirstRep() { 10366 if (getSite().isEmpty()) { 10367 addSite(); 10368 } 10369 return getSite().get(0); 10370 } 10371 10372 /** 10373 * @deprecated Use Reference#setResource(IBaseResource) instead 10374 */ 10375 @Deprecated 10376 public List<Location> getSiteTarget() { 10377 if (this.siteTarget == null) 10378 this.siteTarget = new ArrayList<Location>(); 10379 return this.siteTarget; 10380 } 10381 10382 /** 10383 * @deprecated Use Reference#setResource(IBaseResource) instead 10384 */ 10385 @Deprecated 10386 public Location addSiteTarget() { 10387 Location r = new Location(); 10388 if (this.siteTarget == null) 10389 this.siteTarget = new ArrayList<Location>(); 10390 this.siteTarget.add(r); 10391 return r; 10392 } 10393 10394 /** 10395 * @return {@link #name} (A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 10396 */ 10397 public StringType getNameElement() { 10398 if (this.name == null) 10399 if (Configuration.errorOnAutoCreate()) 10400 throw new Error("Attempt to auto-create Contract.name"); 10401 else if (Configuration.doAutoCreate()) 10402 this.name = new StringType(); // bb 10403 return this.name; 10404 } 10405 10406 public boolean hasNameElement() { 10407 return this.name != null && !this.name.isEmpty(); 10408 } 10409 10410 public boolean hasName() { 10411 return this.name != null && !this.name.isEmpty(); 10412 } 10413 10414 /** 10415 * @param value {@link #name} (A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 10416 */ 10417 public Contract setNameElement(StringType value) { 10418 this.name = value; 10419 return this; 10420 } 10421 10422 /** 10423 * @return A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation. 10424 */ 10425 public String getName() { 10426 return this.name == null ? null : this.name.getValue(); 10427 } 10428 10429 /** 10430 * @param value A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation. 10431 */ 10432 public Contract setName(String value) { 10433 if (Utilities.noString(value)) 10434 this.name = null; 10435 else { 10436 if (this.name == null) 10437 this.name = new StringType(); 10438 this.name.setValue(value); 10439 } 10440 return this; 10441 } 10442 10443 /** 10444 * @return {@link #title} (A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 10445 */ 10446 public StringType getTitleElement() { 10447 if (this.title == null) 10448 if (Configuration.errorOnAutoCreate()) 10449 throw new Error("Attempt to auto-create Contract.title"); 10450 else if (Configuration.doAutoCreate()) 10451 this.title = new StringType(); // bb 10452 return this.title; 10453 } 10454 10455 public boolean hasTitleElement() { 10456 return this.title != null && !this.title.isEmpty(); 10457 } 10458 10459 public boolean hasTitle() { 10460 return this.title != null && !this.title.isEmpty(); 10461 } 10462 10463 /** 10464 * @param value {@link #title} (A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 10465 */ 10466 public Contract setTitleElement(StringType value) { 10467 this.title = value; 10468 return this; 10469 } 10470 10471 /** 10472 * @return A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content. 10473 */ 10474 public String getTitle() { 10475 return this.title == null ? null : this.title.getValue(); 10476 } 10477 10478 /** 10479 * @param value A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content. 10480 */ 10481 public Contract setTitle(String value) { 10482 if (Utilities.noString(value)) 10483 this.title = null; 10484 else { 10485 if (this.title == null) 10486 this.title = new StringType(); 10487 this.title.setValue(value); 10488 } 10489 return this; 10490 } 10491 10492 /** 10493 * @return {@link #subtitle} (An explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.). This is the underlying object with id, value and extensions. The accessor "getSubtitle" gives direct access to the value 10494 */ 10495 public StringType getSubtitleElement() { 10496 if (this.subtitle == null) 10497 if (Configuration.errorOnAutoCreate()) 10498 throw new Error("Attempt to auto-create Contract.subtitle"); 10499 else if (Configuration.doAutoCreate()) 10500 this.subtitle = new StringType(); // bb 10501 return this.subtitle; 10502 } 10503 10504 public boolean hasSubtitleElement() { 10505 return this.subtitle != null && !this.subtitle.isEmpty(); 10506 } 10507 10508 public boolean hasSubtitle() { 10509 return this.subtitle != null && !this.subtitle.isEmpty(); 10510 } 10511 10512 /** 10513 * @param value {@link #subtitle} (An explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.). This is the underlying object with id, value and extensions. The accessor "getSubtitle" gives direct access to the value 10514 */ 10515 public Contract setSubtitleElement(StringType value) { 10516 this.subtitle = value; 10517 return this; 10518 } 10519 10520 /** 10521 * @return An explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content. 10522 */ 10523 public String getSubtitle() { 10524 return this.subtitle == null ? null : this.subtitle.getValue(); 10525 } 10526 10527 /** 10528 * @param value An explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content. 10529 */ 10530 public Contract setSubtitle(String value) { 10531 if (Utilities.noString(value)) 10532 this.subtitle = null; 10533 else { 10534 if (this.subtitle == null) 10535 this.subtitle = new StringType(); 10536 this.subtitle.setValue(value); 10537 } 10538 return this; 10539 } 10540 10541 /** 10542 * @return {@link #alias} (Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation.) 10543 */ 10544 public List<StringType> getAlias() { 10545 if (this.alias == null) 10546 this.alias = new ArrayList<StringType>(); 10547 return this.alias; 10548 } 10549 10550 /** 10551 * @return Returns a reference to <code>this</code> for easy method chaining 10552 */ 10553 public Contract setAlias(List<StringType> theAlias) { 10554 this.alias = theAlias; 10555 return this; 10556 } 10557 10558 public boolean hasAlias() { 10559 if (this.alias == null) 10560 return false; 10561 for (StringType item : this.alias) 10562 if (!item.isEmpty()) 10563 return true; 10564 return false; 10565 } 10566 10567 /** 10568 * @return {@link #alias} (Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation.) 10569 */ 10570 public StringType addAliasElement() {//2 10571 StringType t = new StringType(); 10572 if (this.alias == null) 10573 this.alias = new ArrayList<StringType>(); 10574 this.alias.add(t); 10575 return t; 10576 } 10577 10578 /** 10579 * @param value {@link #alias} (Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation.) 10580 */ 10581 public Contract addAlias(String value) { //1 10582 StringType t = new StringType(); 10583 t.setValue(value); 10584 if (this.alias == null) 10585 this.alias = new ArrayList<StringType>(); 10586 this.alias.add(t); 10587 return this; 10588 } 10589 10590 /** 10591 * @param value {@link #alias} (Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation.) 10592 */ 10593 public boolean hasAlias(String value) { 10594 if (this.alias == null) 10595 return false; 10596 for (StringType v : this.alias) 10597 if (v.getValue().equals(value)) // string 10598 return true; 10599 return false; 10600 } 10601 10602 /** 10603 * @return {@link #author} (The individual or organization that authored the Contract definition, derivative, or instance in any legal state.) 10604 */ 10605 public Reference getAuthor() { 10606 if (this.author == null) 10607 if (Configuration.errorOnAutoCreate()) 10608 throw new Error("Attempt to auto-create Contract.author"); 10609 else if (Configuration.doAutoCreate()) 10610 this.author = new Reference(); // cc 10611 return this.author; 10612 } 10613 10614 public boolean hasAuthor() { 10615 return this.author != null && !this.author.isEmpty(); 10616 } 10617 10618 /** 10619 * @param value {@link #author} (The individual or organization that authored the Contract definition, derivative, or instance in any legal state.) 10620 */ 10621 public Contract setAuthor(Reference value) { 10622 this.author = value; 10623 return this; 10624 } 10625 10626 /** 10627 * @return {@link #author} 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 individual or organization that authored the Contract definition, derivative, or instance in any legal state.) 10628 */ 10629 public Resource getAuthorTarget() { 10630 return this.authorTarget; 10631 } 10632 10633 /** 10634 * @param value {@link #author} 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 individual or organization that authored the Contract definition, derivative, or instance in any legal state.) 10635 */ 10636 public Contract setAuthorTarget(Resource value) { 10637 this.authorTarget = value; 10638 return this; 10639 } 10640 10641 /** 10642 * @return {@link #scope} (A selector of legal concerns for this Contract definition, derivative, or instance in any legal state.) 10643 */ 10644 public CodeableConcept getScope() { 10645 if (this.scope == null) 10646 if (Configuration.errorOnAutoCreate()) 10647 throw new Error("Attempt to auto-create Contract.scope"); 10648 else if (Configuration.doAutoCreate()) 10649 this.scope = new CodeableConcept(); // cc 10650 return this.scope; 10651 } 10652 10653 public boolean hasScope() { 10654 return this.scope != null && !this.scope.isEmpty(); 10655 } 10656 10657 /** 10658 * @param value {@link #scope} (A selector of legal concerns for this Contract definition, derivative, or instance in any legal state.) 10659 */ 10660 public Contract setScope(CodeableConcept value) { 10661 this.scope = value; 10662 return this; 10663 } 10664 10665 /** 10666 * @return {@link #topic} (Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.) 10667 */ 10668 public Type getTopic() { 10669 return this.topic; 10670 } 10671 10672 /** 10673 * @return {@link #topic} (Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.) 10674 */ 10675 public CodeableConcept getTopicCodeableConcept() throws FHIRException { 10676 if (this.topic == null) 10677 return null; 10678 if (!(this.topic instanceof CodeableConcept)) 10679 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.topic.getClass().getName()+" was encountered"); 10680 return (CodeableConcept) this.topic; 10681 } 10682 10683 public boolean hasTopicCodeableConcept() { 10684 return this != null && this.topic instanceof CodeableConcept; 10685 } 10686 10687 /** 10688 * @return {@link #topic} (Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.) 10689 */ 10690 public Reference getTopicReference() throws FHIRException { 10691 if (this.topic == null) 10692 return null; 10693 if (!(this.topic instanceof Reference)) 10694 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.topic.getClass().getName()+" was encountered"); 10695 return (Reference) this.topic; 10696 } 10697 10698 public boolean hasTopicReference() { 10699 return this != null && this.topic instanceof Reference; 10700 } 10701 10702 public boolean hasTopic() { 10703 return this.topic != null && !this.topic.isEmpty(); 10704 } 10705 10706 /** 10707 * @param value {@link #topic} (Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.) 10708 */ 10709 public Contract setTopic(Type value) { 10710 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 10711 throw new Error("Not the right type for Contract.topic[x]: "+value.fhirType()); 10712 this.topic = value; 10713 return this; 10714 } 10715 10716 /** 10717 * @return {@link #type} (A high-level category for the legal instrument, whether constructed as a Contract definition, derivative, or instance in any legal state. Provides additional information about its content within the context of the Contract's scope to distinguish the kinds of systems that would be interested in the contract.) 10718 */ 10719 public CodeableConcept getType() { 10720 if (this.type == null) 10721 if (Configuration.errorOnAutoCreate()) 10722 throw new Error("Attempt to auto-create Contract.type"); 10723 else if (Configuration.doAutoCreate()) 10724 this.type = new CodeableConcept(); // cc 10725 return this.type; 10726 } 10727 10728 public boolean hasType() { 10729 return this.type != null && !this.type.isEmpty(); 10730 } 10731 10732 /** 10733 * @param value {@link #type} (A high-level category for the legal instrument, whether constructed as a Contract definition, derivative, or instance in any legal state. Provides additional information about its content within the context of the Contract's scope to distinguish the kinds of systems that would be interested in the contract.) 10734 */ 10735 public Contract setType(CodeableConcept value) { 10736 this.type = value; 10737 return this; 10738 } 10739 10740 /** 10741 * @return {@link #subType} (Sub-category for the Contract that distinguishes the kinds of systems that would be interested in the Contract within the context of the Contract's scope.) 10742 */ 10743 public List<CodeableConcept> getSubType() { 10744 if (this.subType == null) 10745 this.subType = new ArrayList<CodeableConcept>(); 10746 return this.subType; 10747 } 10748 10749 /** 10750 * @return Returns a reference to <code>this</code> for easy method chaining 10751 */ 10752 public Contract setSubType(List<CodeableConcept> theSubType) { 10753 this.subType = theSubType; 10754 return this; 10755 } 10756 10757 public boolean hasSubType() { 10758 if (this.subType == null) 10759 return false; 10760 for (CodeableConcept item : this.subType) 10761 if (!item.isEmpty()) 10762 return true; 10763 return false; 10764 } 10765 10766 public CodeableConcept addSubType() { //3 10767 CodeableConcept t = new CodeableConcept(); 10768 if (this.subType == null) 10769 this.subType = new ArrayList<CodeableConcept>(); 10770 this.subType.add(t); 10771 return t; 10772 } 10773 10774 public Contract addSubType(CodeableConcept t) { //3 10775 if (t == null) 10776 return this; 10777 if (this.subType == null) 10778 this.subType = new ArrayList<CodeableConcept>(); 10779 this.subType.add(t); 10780 return this; 10781 } 10782 10783 /** 10784 * @return The first repetition of repeating field {@link #subType}, creating it if it does not already exist 10785 */ 10786 public CodeableConcept getSubTypeFirstRep() { 10787 if (getSubType().isEmpty()) { 10788 addSubType(); 10789 } 10790 return getSubType().get(0); 10791 } 10792 10793 /** 10794 * @return {@link #contentDefinition} (Precusory content developed with a focus and intent of supporting the formation a Contract instance, which may be associated with and transformable into a Contract.) 10795 */ 10796 public ContentDefinitionComponent getContentDefinition() { 10797 if (this.contentDefinition == null) 10798 if (Configuration.errorOnAutoCreate()) 10799 throw new Error("Attempt to auto-create Contract.contentDefinition"); 10800 else if (Configuration.doAutoCreate()) 10801 this.contentDefinition = new ContentDefinitionComponent(); // cc 10802 return this.contentDefinition; 10803 } 10804 10805 public boolean hasContentDefinition() { 10806 return this.contentDefinition != null && !this.contentDefinition.isEmpty(); 10807 } 10808 10809 /** 10810 * @param value {@link #contentDefinition} (Precusory content developed with a focus and intent of supporting the formation a Contract instance, which may be associated with and transformable into a Contract.) 10811 */ 10812 public Contract setContentDefinition(ContentDefinitionComponent value) { 10813 this.contentDefinition = value; 10814 return this; 10815 } 10816 10817 /** 10818 * @return {@link #term} (One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.) 10819 */ 10820 public List<TermComponent> getTerm() { 10821 if (this.term == null) 10822 this.term = new ArrayList<TermComponent>(); 10823 return this.term; 10824 } 10825 10826 /** 10827 * @return Returns a reference to <code>this</code> for easy method chaining 10828 */ 10829 public Contract setTerm(List<TermComponent> theTerm) { 10830 this.term = theTerm; 10831 return this; 10832 } 10833 10834 public boolean hasTerm() { 10835 if (this.term == null) 10836 return false; 10837 for (TermComponent item : this.term) 10838 if (!item.isEmpty()) 10839 return true; 10840 return false; 10841 } 10842 10843 public TermComponent addTerm() { //3 10844 TermComponent t = new TermComponent(); 10845 if (this.term == null) 10846 this.term = new ArrayList<TermComponent>(); 10847 this.term.add(t); 10848 return t; 10849 } 10850 10851 public Contract addTerm(TermComponent t) { //3 10852 if (t == null) 10853 return this; 10854 if (this.term == null) 10855 this.term = new ArrayList<TermComponent>(); 10856 this.term.add(t); 10857 return this; 10858 } 10859 10860 /** 10861 * @return The first repetition of repeating field {@link #term}, creating it if it does not already exist 10862 */ 10863 public TermComponent getTermFirstRep() { 10864 if (getTerm().isEmpty()) { 10865 addTerm(); 10866 } 10867 return getTerm().get(0); 10868 } 10869 10870 /** 10871 * @return {@link #supportingInfo} (Information that may be needed by/relevant to the performer in their execution of this term action.) 10872 */ 10873 public List<Reference> getSupportingInfo() { 10874 if (this.supportingInfo == null) 10875 this.supportingInfo = new ArrayList<Reference>(); 10876 return this.supportingInfo; 10877 } 10878 10879 /** 10880 * @return Returns a reference to <code>this</code> for easy method chaining 10881 */ 10882 public Contract setSupportingInfo(List<Reference> theSupportingInfo) { 10883 this.supportingInfo = theSupportingInfo; 10884 return this; 10885 } 10886 10887 public boolean hasSupportingInfo() { 10888 if (this.supportingInfo == null) 10889 return false; 10890 for (Reference item : this.supportingInfo) 10891 if (!item.isEmpty()) 10892 return true; 10893 return false; 10894 } 10895 10896 public Reference addSupportingInfo() { //3 10897 Reference t = new Reference(); 10898 if (this.supportingInfo == null) 10899 this.supportingInfo = new ArrayList<Reference>(); 10900 this.supportingInfo.add(t); 10901 return t; 10902 } 10903 10904 public Contract addSupportingInfo(Reference t) { //3 10905 if (t == null) 10906 return this; 10907 if (this.supportingInfo == null) 10908 this.supportingInfo = new ArrayList<Reference>(); 10909 this.supportingInfo.add(t); 10910 return this; 10911 } 10912 10913 /** 10914 * @return The first repetition of repeating field {@link #supportingInfo}, creating it if it does not already exist 10915 */ 10916 public Reference getSupportingInfoFirstRep() { 10917 if (getSupportingInfo().isEmpty()) { 10918 addSupportingInfo(); 10919 } 10920 return getSupportingInfo().get(0); 10921 } 10922 10923 /** 10924 * @deprecated Use Reference#setResource(IBaseResource) instead 10925 */ 10926 @Deprecated 10927 public List<Resource> getSupportingInfoTarget() { 10928 if (this.supportingInfoTarget == null) 10929 this.supportingInfoTarget = new ArrayList<Resource>(); 10930 return this.supportingInfoTarget; 10931 } 10932 10933 /** 10934 * @return {@link #relevantHistory} (Links to Provenance records for past versions of this Contract definition, derivative, or instance, which identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the Contract. The Provence.entity indicates the target that was changed in the update. http://build.fhir.org/provenance-definitions.html#Provenance.entity.) 10935 */ 10936 public List<Reference> getRelevantHistory() { 10937 if (this.relevantHistory == null) 10938 this.relevantHistory = new ArrayList<Reference>(); 10939 return this.relevantHistory; 10940 } 10941 10942 /** 10943 * @return Returns a reference to <code>this</code> for easy method chaining 10944 */ 10945 public Contract setRelevantHistory(List<Reference> theRelevantHistory) { 10946 this.relevantHistory = theRelevantHistory; 10947 return this; 10948 } 10949 10950 public boolean hasRelevantHistory() { 10951 if (this.relevantHistory == null) 10952 return false; 10953 for (Reference item : this.relevantHistory) 10954 if (!item.isEmpty()) 10955 return true; 10956 return false; 10957 } 10958 10959 public Reference addRelevantHistory() { //3 10960 Reference t = new Reference(); 10961 if (this.relevantHistory == null) 10962 this.relevantHistory = new ArrayList<Reference>(); 10963 this.relevantHistory.add(t); 10964 return t; 10965 } 10966 10967 public Contract addRelevantHistory(Reference t) { //3 10968 if (t == null) 10969 return this; 10970 if (this.relevantHistory == null) 10971 this.relevantHistory = new ArrayList<Reference>(); 10972 this.relevantHistory.add(t); 10973 return this; 10974 } 10975 10976 /** 10977 * @return The first repetition of repeating field {@link #relevantHistory}, creating it if it does not already exist 10978 */ 10979 public Reference getRelevantHistoryFirstRep() { 10980 if (getRelevantHistory().isEmpty()) { 10981 addRelevantHistory(); 10982 } 10983 return getRelevantHistory().get(0); 10984 } 10985 10986 /** 10987 * @deprecated Use Reference#setResource(IBaseResource) instead 10988 */ 10989 @Deprecated 10990 public List<Provenance> getRelevantHistoryTarget() { 10991 if (this.relevantHistoryTarget == null) 10992 this.relevantHistoryTarget = new ArrayList<Provenance>(); 10993 return this.relevantHistoryTarget; 10994 } 10995 10996 /** 10997 * @deprecated Use Reference#setResource(IBaseResource) instead 10998 */ 10999 @Deprecated 11000 public Provenance addRelevantHistoryTarget() { 11001 Provenance r = new Provenance(); 11002 if (this.relevantHistoryTarget == null) 11003 this.relevantHistoryTarget = new ArrayList<Provenance>(); 11004 this.relevantHistoryTarget.add(r); 11005 return r; 11006 } 11007 11008 /** 11009 * @return {@link #signer} (Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.) 11010 */ 11011 public List<SignatoryComponent> getSigner() { 11012 if (this.signer == null) 11013 this.signer = new ArrayList<SignatoryComponent>(); 11014 return this.signer; 11015 } 11016 11017 /** 11018 * @return Returns a reference to <code>this</code> for easy method chaining 11019 */ 11020 public Contract setSigner(List<SignatoryComponent> theSigner) { 11021 this.signer = theSigner; 11022 return this; 11023 } 11024 11025 public boolean hasSigner() { 11026 if (this.signer == null) 11027 return false; 11028 for (SignatoryComponent item : this.signer) 11029 if (!item.isEmpty()) 11030 return true; 11031 return false; 11032 } 11033 11034 public SignatoryComponent addSigner() { //3 11035 SignatoryComponent t = new SignatoryComponent(); 11036 if (this.signer == null) 11037 this.signer = new ArrayList<SignatoryComponent>(); 11038 this.signer.add(t); 11039 return t; 11040 } 11041 11042 public Contract addSigner(SignatoryComponent t) { //3 11043 if (t == null) 11044 return this; 11045 if (this.signer == null) 11046 this.signer = new ArrayList<SignatoryComponent>(); 11047 this.signer.add(t); 11048 return this; 11049 } 11050 11051 /** 11052 * @return The first repetition of repeating field {@link #signer}, creating it if it does not already exist 11053 */ 11054 public SignatoryComponent getSignerFirstRep() { 11055 if (getSigner().isEmpty()) { 11056 addSigner(); 11057 } 11058 return getSigner().get(0); 11059 } 11060 11061 /** 11062 * @return {@link #friendly} (The "patient friendly language" versionof the Contract in whole or in parts. "Patient friendly language" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.) 11063 */ 11064 public List<FriendlyLanguageComponent> getFriendly() { 11065 if (this.friendly == null) 11066 this.friendly = new ArrayList<FriendlyLanguageComponent>(); 11067 return this.friendly; 11068 } 11069 11070 /** 11071 * @return Returns a reference to <code>this</code> for easy method chaining 11072 */ 11073 public Contract setFriendly(List<FriendlyLanguageComponent> theFriendly) { 11074 this.friendly = theFriendly; 11075 return this; 11076 } 11077 11078 public boolean hasFriendly() { 11079 if (this.friendly == null) 11080 return false; 11081 for (FriendlyLanguageComponent item : this.friendly) 11082 if (!item.isEmpty()) 11083 return true; 11084 return false; 11085 } 11086 11087 public FriendlyLanguageComponent addFriendly() { //3 11088 FriendlyLanguageComponent t = new FriendlyLanguageComponent(); 11089 if (this.friendly == null) 11090 this.friendly = new ArrayList<FriendlyLanguageComponent>(); 11091 this.friendly.add(t); 11092 return t; 11093 } 11094 11095 public Contract addFriendly(FriendlyLanguageComponent t) { //3 11096 if (t == null) 11097 return this; 11098 if (this.friendly == null) 11099 this.friendly = new ArrayList<FriendlyLanguageComponent>(); 11100 this.friendly.add(t); 11101 return this; 11102 } 11103 11104 /** 11105 * @return The first repetition of repeating field {@link #friendly}, creating it if it does not already exist 11106 */ 11107 public FriendlyLanguageComponent getFriendlyFirstRep() { 11108 if (getFriendly().isEmpty()) { 11109 addFriendly(); 11110 } 11111 return getFriendly().get(0); 11112 } 11113 11114 /** 11115 * @return {@link #legal} (List of Legal expressions or representations of this Contract.) 11116 */ 11117 public List<LegalLanguageComponent> getLegal() { 11118 if (this.legal == null) 11119 this.legal = new ArrayList<LegalLanguageComponent>(); 11120 return this.legal; 11121 } 11122 11123 /** 11124 * @return Returns a reference to <code>this</code> for easy method chaining 11125 */ 11126 public Contract setLegal(List<LegalLanguageComponent> theLegal) { 11127 this.legal = theLegal; 11128 return this; 11129 } 11130 11131 public boolean hasLegal() { 11132 if (this.legal == null) 11133 return false; 11134 for (LegalLanguageComponent item : this.legal) 11135 if (!item.isEmpty()) 11136 return true; 11137 return false; 11138 } 11139 11140 public LegalLanguageComponent addLegal() { //3 11141 LegalLanguageComponent t = new LegalLanguageComponent(); 11142 if (this.legal == null) 11143 this.legal = new ArrayList<LegalLanguageComponent>(); 11144 this.legal.add(t); 11145 return t; 11146 } 11147 11148 public Contract addLegal(LegalLanguageComponent t) { //3 11149 if (t == null) 11150 return this; 11151 if (this.legal == null) 11152 this.legal = new ArrayList<LegalLanguageComponent>(); 11153 this.legal.add(t); 11154 return this; 11155 } 11156 11157 /** 11158 * @return The first repetition of repeating field {@link #legal}, creating it if it does not already exist 11159 */ 11160 public LegalLanguageComponent getLegalFirstRep() { 11161 if (getLegal().isEmpty()) { 11162 addLegal(); 11163 } 11164 return getLegal().get(0); 11165 } 11166 11167 /** 11168 * @return {@link #rule} (List of Computable Policy Rule Language Representations of this Contract.) 11169 */ 11170 public List<ComputableLanguageComponent> getRule() { 11171 if (this.rule == null) 11172 this.rule = new ArrayList<ComputableLanguageComponent>(); 11173 return this.rule; 11174 } 11175 11176 /** 11177 * @return Returns a reference to <code>this</code> for easy method chaining 11178 */ 11179 public Contract setRule(List<ComputableLanguageComponent> theRule) { 11180 this.rule = theRule; 11181 return this; 11182 } 11183 11184 public boolean hasRule() { 11185 if (this.rule == null) 11186 return false; 11187 for (ComputableLanguageComponent item : this.rule) 11188 if (!item.isEmpty()) 11189 return true; 11190 return false; 11191 } 11192 11193 public ComputableLanguageComponent addRule() { //3 11194 ComputableLanguageComponent t = new ComputableLanguageComponent(); 11195 if (this.rule == null) 11196 this.rule = new ArrayList<ComputableLanguageComponent>(); 11197 this.rule.add(t); 11198 return t; 11199 } 11200 11201 public Contract addRule(ComputableLanguageComponent t) { //3 11202 if (t == null) 11203 return this; 11204 if (this.rule == null) 11205 this.rule = new ArrayList<ComputableLanguageComponent>(); 11206 this.rule.add(t); 11207 return this; 11208 } 11209 11210 /** 11211 * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist 11212 */ 11213 public ComputableLanguageComponent getRuleFirstRep() { 11214 if (getRule().isEmpty()) { 11215 addRule(); 11216 } 11217 return getRule().get(0); 11218 } 11219 11220 /** 11221 * @return {@link #legallyBinding} (Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.) 11222 */ 11223 public Type getLegallyBinding() { 11224 return this.legallyBinding; 11225 } 11226 11227 /** 11228 * @return {@link #legallyBinding} (Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.) 11229 */ 11230 public Attachment getLegallyBindingAttachment() throws FHIRException { 11231 if (this.legallyBinding == null) 11232 return null; 11233 if (!(this.legallyBinding instanceof Attachment)) 11234 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.legallyBinding.getClass().getName()+" was encountered"); 11235 return (Attachment) this.legallyBinding; 11236 } 11237 11238 public boolean hasLegallyBindingAttachment() { 11239 return this != null && this.legallyBinding instanceof Attachment; 11240 } 11241 11242 /** 11243 * @return {@link #legallyBinding} (Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.) 11244 */ 11245 public Reference getLegallyBindingReference() throws FHIRException { 11246 if (this.legallyBinding == null) 11247 return null; 11248 if (!(this.legallyBinding instanceof Reference)) 11249 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.legallyBinding.getClass().getName()+" was encountered"); 11250 return (Reference) this.legallyBinding; 11251 } 11252 11253 public boolean hasLegallyBindingReference() { 11254 return this != null && this.legallyBinding instanceof Reference; 11255 } 11256 11257 public boolean hasLegallyBinding() { 11258 return this.legallyBinding != null && !this.legallyBinding.isEmpty(); 11259 } 11260 11261 /** 11262 * @param value {@link #legallyBinding} (Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.) 11263 */ 11264 public Contract setLegallyBinding(Type value) { 11265 if (value != null && !(value instanceof Attachment || value instanceof Reference)) 11266 throw new Error("Not the right type for Contract.legallyBinding[x]: "+value.fhirType()); 11267 this.legallyBinding = value; 11268 return this; 11269 } 11270 11271 protected void listChildren(List<Property> children) { 11272 super.listChildren(children); 11273 children.add(new Property("identifier", "Identifier", "Unique identifier for this Contract or a derivative that references a Source Contract.", 0, java.lang.Integer.MAX_VALUE, identifier)); 11274 children.add(new Property("url", "uri", "Canonical identifier for this contract, represented as a URI (globally unique).", 0, 1, url)); 11275 children.add(new Property("version", "string", "An edition identifier used for business purposes to label business significant variants.", 0, 1, version)); 11276 children.add(new Property("status", "code", "The status of the resource instance.", 0, 1, status)); 11277 children.add(new Property("legalState", "CodeableConcept", "Legal states of the formation of a legal instrument, which is a formally executed written document that can be formally attributed to its author, records and formally expresses a legally enforceable act, process, or contractual duty, obligation, or right, and therefore evidences that act, process, or agreement.", 0, 1, legalState)); 11278 children.add(new Property("instantiatesCanonical", "Reference(Contract)", "The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.", 0, 1, instantiatesCanonical)); 11279 children.add(new Property("instantiatesUri", "uri", "The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract.", 0, 1, instantiatesUri)); 11280 children.add(new Property("contentDerivative", "CodeableConcept", "The minimal content derived from the basal information source at a specific stage in its lifecycle.", 0, 1, contentDerivative)); 11281 children.add(new Property("issued", "dateTime", "When this Contract was issued.", 0, 1, issued)); 11282 children.add(new Property("applies", "Period", "Relevant time or time-period when this Contract is applicable.", 0, 1, applies)); 11283 children.add(new Property("expirationType", "CodeableConcept", "Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract.", 0, 1, expirationType)); 11284 children.add(new Property("subject", "Reference(Any)", "The target entity impacted by or of interest to parties to the agreement.", 0, java.lang.Integer.MAX_VALUE, subject)); 11285 children.add(new Property("authority", "Reference(Organization)", "A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.", 0, java.lang.Integer.MAX_VALUE, authority)); 11286 children.add(new Property("domain", "Reference(Location)", "Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.", 0, java.lang.Integer.MAX_VALUE, domain)); 11287 children.add(new Property("site", "Reference(Location)", "Sites in which the contract is complied with, exercised, or in force.", 0, java.lang.Integer.MAX_VALUE, site)); 11288 children.add(new Property("name", "string", "A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name)); 11289 children.add(new Property("title", "string", "A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.", 0, 1, title)); 11290 children.add(new Property("subtitle", "string", "An explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.", 0, 1, subtitle)); 11291 children.add(new Property("alias", "string", "Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation.", 0, java.lang.Integer.MAX_VALUE, alias)); 11292 children.add(new Property("author", "Reference(Person|Patient|Practitioner|Organization)", "The individual or organization that authored the Contract definition, derivative, or instance in any legal state.", 0, 1, author)); 11293 children.add(new Property("scope", "CodeableConcept", "A selector of legal concerns for this Contract definition, derivative, or instance in any legal state.", 0, 1, scope)); 11294 children.add(new Property("topic[x]", "CodeableConcept|Reference(Any)", "Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.", 0, 1, topic)); 11295 children.add(new Property("type", "CodeableConcept", "A high-level category for the legal instrument, whether constructed as a Contract definition, derivative, or instance in any legal state. Provides additional information about its content within the context of the Contract's scope to distinguish the kinds of systems that would be interested in the contract.", 0, 1, type)); 11296 children.add(new Property("subType", "CodeableConcept", "Sub-category for the Contract that distinguishes the kinds of systems that would be interested in the Contract within the context of the Contract's scope.", 0, java.lang.Integer.MAX_VALUE, subType)); 11297 children.add(new Property("contentDefinition", "", "Precusory content developed with a focus and intent of supporting the formation a Contract instance, which may be associated with and transformable into a Contract.", 0, 1, contentDefinition)); 11298 children.add(new Property("term", "", "One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.", 0, java.lang.Integer.MAX_VALUE, term)); 11299 children.add(new Property("supportingInfo", "Reference(Any)", "Information that may be needed by/relevant to the performer in their execution of this term action.", 0, java.lang.Integer.MAX_VALUE, supportingInfo)); 11300 children.add(new Property("relevantHistory", "Reference(Provenance)", "Links to Provenance records for past versions of this Contract definition, derivative, or instance, which identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the Contract. The Provence.entity indicates the target that was changed in the update. http://build.fhir.org/provenance-definitions.html#Provenance.entity.", 0, java.lang.Integer.MAX_VALUE, relevantHistory)); 11301 children.add(new Property("signer", "", "Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.", 0, java.lang.Integer.MAX_VALUE, signer)); 11302 children.add(new Property("friendly", "", "The \"patient friendly language\" versionof the Contract in whole or in parts. \"Patient friendly language\" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", 0, java.lang.Integer.MAX_VALUE, friendly)); 11303 children.add(new Property("legal", "", "List of Legal expressions or representations of this Contract.", 0, java.lang.Integer.MAX_VALUE, legal)); 11304 children.add(new Property("rule", "", "List of Computable Policy Rule Language Representations of this Contract.", 0, java.lang.Integer.MAX_VALUE, rule)); 11305 children.add(new Property("legallyBinding[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse|Contract)", "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the \"source of truth\" and which would be the basis for legal action related to enforcement of this Contract.", 0, 1, legallyBinding)); 11306 } 11307 11308 @Override 11309 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 11310 switch (_hash) { 11311 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique identifier for this Contract or a derivative that references a Source Contract.", 0, java.lang.Integer.MAX_VALUE, identifier); 11312 case 116079: /*url*/ return new Property("url", "uri", "Canonical identifier for this contract, represented as a URI (globally unique).", 0, 1, url); 11313 case 351608024: /*version*/ return new Property("version", "string", "An edition identifier used for business purposes to label business significant variants.", 0, 1, version); 11314 case -892481550: /*status*/ return new Property("status", "code", "The status of the resource instance.", 0, 1, status); 11315 case 568606040: /*legalState*/ return new Property("legalState", "CodeableConcept", "Legal states of the formation of a legal instrument, which is a formally executed written document that can be formally attributed to its author, records and formally expresses a legally enforceable act, process, or contractual duty, obligation, or right, and therefore evidences that act, process, or agreement.", 0, 1, legalState); 11316 case 8911915: /*instantiatesCanonical*/ return new Property("instantiatesCanonical", "Reference(Contract)", "The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.", 0, 1, instantiatesCanonical); 11317 case -1926393373: /*instantiatesUri*/ return new Property("instantiatesUri", "uri", "The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract.", 0, 1, instantiatesUri); 11318 case -92412192: /*contentDerivative*/ return new Property("contentDerivative", "CodeableConcept", "The minimal content derived from the basal information source at a specific stage in its lifecycle.", 0, 1, contentDerivative); 11319 case -1179159893: /*issued*/ return new Property("issued", "dateTime", "When this Contract was issued.", 0, 1, issued); 11320 case -793235316: /*applies*/ return new Property("applies", "Period", "Relevant time or time-period when this Contract is applicable.", 0, 1, applies); 11321 case -668311927: /*expirationType*/ return new Property("expirationType", "CodeableConcept", "Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract.", 0, 1, expirationType); 11322 case -1867885268: /*subject*/ return new Property("subject", "Reference(Any)", "The target entity impacted by or of interest to parties to the agreement.", 0, java.lang.Integer.MAX_VALUE, subject); 11323 case 1475610435: /*authority*/ return new Property("authority", "Reference(Organization)", "A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.", 0, java.lang.Integer.MAX_VALUE, authority); 11324 case -1326197564: /*domain*/ return new Property("domain", "Reference(Location)", "Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.", 0, java.lang.Integer.MAX_VALUE, domain); 11325 case 3530567: /*site*/ return new Property("site", "Reference(Location)", "Sites in which the contract is complied with, exercised, or in force.", 0, java.lang.Integer.MAX_VALUE, site); 11326 case 3373707: /*name*/ return new Property("name", "string", "A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name); 11327 case 110371416: /*title*/ return new Property("title", "string", "A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.", 0, 1, title); 11328 case -2060497896: /*subtitle*/ return new Property("subtitle", "string", "An explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.", 0, 1, subtitle); 11329 case 92902992: /*alias*/ return new Property("alias", "string", "Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation.", 0, java.lang.Integer.MAX_VALUE, alias); 11330 case -1406328437: /*author*/ return new Property("author", "Reference(Person|Patient|Practitioner|Organization)", "The individual or organization that authored the Contract definition, derivative, or instance in any legal state.", 0, 1, author); 11331 case 109264468: /*scope*/ return new Property("scope", "CodeableConcept", "A selector of legal concerns for this Contract definition, derivative, or instance in any legal state.", 0, 1, scope); 11332 case -957295375: /*topic[x]*/ return new Property("topic[x]", "CodeableConcept|Reference(Any)", "Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.", 0, 1, topic); 11333 case 110546223: /*topic*/ return new Property("topic[x]", "CodeableConcept|Reference(Any)", "Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.", 0, 1, topic); 11334 case 777778802: /*topicCodeableConcept*/ return new Property("topic[x]", "CodeableConcept|Reference(Any)", "Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.", 0, 1, topic); 11335 case -343345444: /*topicReference*/ return new Property("topic[x]", "CodeableConcept|Reference(Any)", "Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.", 0, 1, topic); 11336 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "A high-level category for the legal instrument, whether constructed as a Contract definition, derivative, or instance in any legal state. Provides additional information about its content within the context of the Contract's scope to distinguish the kinds of systems that would be interested in the contract.", 0, 1, type); 11337 case -1868521062: /*subType*/ return new Property("subType", "CodeableConcept", "Sub-category for the Contract that distinguishes the kinds of systems that would be interested in the Contract within the context of the Contract's scope.", 0, java.lang.Integer.MAX_VALUE, subType); 11338 case 247055020: /*contentDefinition*/ return new Property("contentDefinition", "", "Precusory content developed with a focus and intent of supporting the formation a Contract instance, which may be associated with and transformable into a Contract.", 0, 1, contentDefinition); 11339 case 3556460: /*term*/ return new Property("term", "", "One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.", 0, java.lang.Integer.MAX_VALUE, term); 11340 case 1922406657: /*supportingInfo*/ return new Property("supportingInfo", "Reference(Any)", "Information that may be needed by/relevant to the performer in their execution of this term action.", 0, java.lang.Integer.MAX_VALUE, supportingInfo); 11341 case 1538891575: /*relevantHistory*/ return new Property("relevantHistory", "Reference(Provenance)", "Links to Provenance records for past versions of this Contract definition, derivative, or instance, which identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the Contract. The Provence.entity indicates the target that was changed in the update. http://build.fhir.org/provenance-definitions.html#Provenance.entity.", 0, java.lang.Integer.MAX_VALUE, relevantHistory); 11342 case -902467798: /*signer*/ return new Property("signer", "", "Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.", 0, java.lang.Integer.MAX_VALUE, signer); 11343 case -1423054677: /*friendly*/ return new Property("friendly", "", "The \"patient friendly language\" versionof the Contract in whole or in parts. \"Patient friendly language\" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", 0, java.lang.Integer.MAX_VALUE, friendly); 11344 case 102851257: /*legal*/ return new Property("legal", "", "List of Legal expressions or representations of this Contract.", 0, java.lang.Integer.MAX_VALUE, legal); 11345 case 3512060: /*rule*/ return new Property("rule", "", "List of Computable Policy Rule Language Representations of this Contract.", 0, java.lang.Integer.MAX_VALUE, rule); 11346 case -772497791: /*legallyBinding[x]*/ return new Property("legallyBinding[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse|Contract)", "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the \"source of truth\" and which would be the basis for legal action related to enforcement of this Contract.", 0, 1, legallyBinding); 11347 case -126751329: /*legallyBinding*/ return new Property("legallyBinding[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse|Contract)", "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the \"source of truth\" and which would be the basis for legal action related to enforcement of this Contract.", 0, 1, legallyBinding); 11348 case 344057890: /*legallyBindingAttachment*/ return new Property("legallyBinding[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse|Contract)", "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the \"source of truth\" and which would be the basis for legal action related to enforcement of this Contract.", 0, 1, legallyBinding); 11349 case -296528788: /*legallyBindingReference*/ return new Property("legallyBinding[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse|Contract)", "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the \"source of truth\" and which would be the basis for legal action related to enforcement of this Contract.", 0, 1, legallyBinding); 11350 default: return super.getNamedProperty(_hash, _name, _checkValid); 11351 } 11352 11353 } 11354 11355 @Override 11356 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 11357 switch (hash) { 11358 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 11359 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 11360 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 11361 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ContractStatus> 11362 case 568606040: /*legalState*/ return this.legalState == null ? new Base[0] : new Base[] {this.legalState}; // CodeableConcept 11363 case 8911915: /*instantiatesCanonical*/ return this.instantiatesCanonical == null ? new Base[0] : new Base[] {this.instantiatesCanonical}; // Reference 11364 case -1926393373: /*instantiatesUri*/ return this.instantiatesUri == null ? new Base[0] : new Base[] {this.instantiatesUri}; // UriType 11365 case -92412192: /*contentDerivative*/ return this.contentDerivative == null ? new Base[0] : new Base[] {this.contentDerivative}; // CodeableConcept 11366 case -1179159893: /*issued*/ return this.issued == null ? new Base[0] : new Base[] {this.issued}; // DateTimeType 11367 case -793235316: /*applies*/ return this.applies == null ? new Base[0] : new Base[] {this.applies}; // Period 11368 case -668311927: /*expirationType*/ return this.expirationType == null ? new Base[0] : new Base[] {this.expirationType}; // CodeableConcept 11369 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : this.subject.toArray(new Base[this.subject.size()]); // Reference 11370 case 1475610435: /*authority*/ return this.authority == null ? new Base[0] : this.authority.toArray(new Base[this.authority.size()]); // Reference 11371 case -1326197564: /*domain*/ return this.domain == null ? new Base[0] : this.domain.toArray(new Base[this.domain.size()]); // Reference 11372 case 3530567: /*site*/ return this.site == null ? new Base[0] : this.site.toArray(new Base[this.site.size()]); // Reference 11373 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 11374 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 11375 case -2060497896: /*subtitle*/ return this.subtitle == null ? new Base[0] : new Base[] {this.subtitle}; // StringType 11376 case 92902992: /*alias*/ return this.alias == null ? new Base[0] : this.alias.toArray(new Base[this.alias.size()]); // StringType 11377 case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Reference 11378 case 109264468: /*scope*/ return this.scope == null ? new Base[0] : new Base[] {this.scope}; // CodeableConcept 11379 case 110546223: /*topic*/ return this.topic == null ? new Base[0] : new Base[] {this.topic}; // Type 11380 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 11381 case -1868521062: /*subType*/ return this.subType == null ? new Base[0] : this.subType.toArray(new Base[this.subType.size()]); // CodeableConcept 11382 case 247055020: /*contentDefinition*/ return this.contentDefinition == null ? new Base[0] : new Base[] {this.contentDefinition}; // ContentDefinitionComponent 11383 case 3556460: /*term*/ return this.term == null ? new Base[0] : this.term.toArray(new Base[this.term.size()]); // TermComponent 11384 case 1922406657: /*supportingInfo*/ return this.supportingInfo == null ? new Base[0] : this.supportingInfo.toArray(new Base[this.supportingInfo.size()]); // Reference 11385 case 1538891575: /*relevantHistory*/ return this.relevantHistory == null ? new Base[0] : this.relevantHistory.toArray(new Base[this.relevantHistory.size()]); // Reference 11386 case -902467798: /*signer*/ return this.signer == null ? new Base[0] : this.signer.toArray(new Base[this.signer.size()]); // SignatoryComponent 11387 case -1423054677: /*friendly*/ return this.friendly == null ? new Base[0] : this.friendly.toArray(new Base[this.friendly.size()]); // FriendlyLanguageComponent 11388 case 102851257: /*legal*/ return this.legal == null ? new Base[0] : this.legal.toArray(new Base[this.legal.size()]); // LegalLanguageComponent 11389 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // ComputableLanguageComponent 11390 case -126751329: /*legallyBinding*/ return this.legallyBinding == null ? new Base[0] : new Base[] {this.legallyBinding}; // Type 11391 default: return super.getProperty(hash, name, checkValid); 11392 } 11393 11394 } 11395 11396 @Override 11397 public Base setProperty(int hash, String name, Base value) throws FHIRException { 11398 switch (hash) { 11399 case -1618432855: // identifier 11400 this.getIdentifier().add(castToIdentifier(value)); // Identifier 11401 return value; 11402 case 116079: // url 11403 this.url = castToUri(value); // UriType 11404 return value; 11405 case 351608024: // version 11406 this.version = castToString(value); // StringType 11407 return value; 11408 case -892481550: // status 11409 value = new ContractStatusEnumFactory().fromType(castToCode(value)); 11410 this.status = (Enumeration) value; // Enumeration<ContractStatus> 11411 return value; 11412 case 568606040: // legalState 11413 this.legalState = castToCodeableConcept(value); // CodeableConcept 11414 return value; 11415 case 8911915: // instantiatesCanonical 11416 this.instantiatesCanonical = castToReference(value); // Reference 11417 return value; 11418 case -1926393373: // instantiatesUri 11419 this.instantiatesUri = castToUri(value); // UriType 11420 return value; 11421 case -92412192: // contentDerivative 11422 this.contentDerivative = castToCodeableConcept(value); // CodeableConcept 11423 return value; 11424 case -1179159893: // issued 11425 this.issued = castToDateTime(value); // DateTimeType 11426 return value; 11427 case -793235316: // applies 11428 this.applies = castToPeriod(value); // Period 11429 return value; 11430 case -668311927: // expirationType 11431 this.expirationType = castToCodeableConcept(value); // CodeableConcept 11432 return value; 11433 case -1867885268: // subject 11434 this.getSubject().add(castToReference(value)); // Reference 11435 return value; 11436 case 1475610435: // authority 11437 this.getAuthority().add(castToReference(value)); // Reference 11438 return value; 11439 case -1326197564: // domain 11440 this.getDomain().add(castToReference(value)); // Reference 11441 return value; 11442 case 3530567: // site 11443 this.getSite().add(castToReference(value)); // Reference 11444 return value; 11445 case 3373707: // name 11446 this.name = castToString(value); // StringType 11447 return value; 11448 case 110371416: // title 11449 this.title = castToString(value); // StringType 11450 return value; 11451 case -2060497896: // subtitle 11452 this.subtitle = castToString(value); // StringType 11453 return value; 11454 case 92902992: // alias 11455 this.getAlias().add(castToString(value)); // StringType 11456 return value; 11457 case -1406328437: // author 11458 this.author = castToReference(value); // Reference 11459 return value; 11460 case 109264468: // scope 11461 this.scope = castToCodeableConcept(value); // CodeableConcept 11462 return value; 11463 case 110546223: // topic 11464 this.topic = castToType(value); // Type 11465 return value; 11466 case 3575610: // type 11467 this.type = castToCodeableConcept(value); // CodeableConcept 11468 return value; 11469 case -1868521062: // subType 11470 this.getSubType().add(castToCodeableConcept(value)); // CodeableConcept 11471 return value; 11472 case 247055020: // contentDefinition 11473 this.contentDefinition = (ContentDefinitionComponent) value; // ContentDefinitionComponent 11474 return value; 11475 case 3556460: // term 11476 this.getTerm().add((TermComponent) value); // TermComponent 11477 return value; 11478 case 1922406657: // supportingInfo 11479 this.getSupportingInfo().add(castToReference(value)); // Reference 11480 return value; 11481 case 1538891575: // relevantHistory 11482 this.getRelevantHistory().add(castToReference(value)); // Reference 11483 return value; 11484 case -902467798: // signer 11485 this.getSigner().add((SignatoryComponent) value); // SignatoryComponent 11486 return value; 11487 case -1423054677: // friendly 11488 this.getFriendly().add((FriendlyLanguageComponent) value); // FriendlyLanguageComponent 11489 return value; 11490 case 102851257: // legal 11491 this.getLegal().add((LegalLanguageComponent) value); // LegalLanguageComponent 11492 return value; 11493 case 3512060: // rule 11494 this.getRule().add((ComputableLanguageComponent) value); // ComputableLanguageComponent 11495 return value; 11496 case -126751329: // legallyBinding 11497 this.legallyBinding = castToType(value); // Type 11498 return value; 11499 default: return super.setProperty(hash, name, value); 11500 } 11501 11502 } 11503 11504 @Override 11505 public Base setProperty(String name, Base value) throws FHIRException { 11506 if (name.equals("identifier")) { 11507 this.getIdentifier().add(castToIdentifier(value)); 11508 } else if (name.equals("url")) { 11509 this.url = castToUri(value); // UriType 11510 } else if (name.equals("version")) { 11511 this.version = castToString(value); // StringType 11512 } else if (name.equals("status")) { 11513 value = new ContractStatusEnumFactory().fromType(castToCode(value)); 11514 this.status = (Enumeration) value; // Enumeration<ContractStatus> 11515 } else if (name.equals("legalState")) { 11516 this.legalState = castToCodeableConcept(value); // CodeableConcept 11517 } else if (name.equals("instantiatesCanonical")) { 11518 this.instantiatesCanonical = castToReference(value); // Reference 11519 } else if (name.equals("instantiatesUri")) { 11520 this.instantiatesUri = castToUri(value); // UriType 11521 } else if (name.equals("contentDerivative")) { 11522 this.contentDerivative = castToCodeableConcept(value); // CodeableConcept 11523 } else if (name.equals("issued")) { 11524 this.issued = castToDateTime(value); // DateTimeType 11525 } else if (name.equals("applies")) { 11526 this.applies = castToPeriod(value); // Period 11527 } else if (name.equals("expirationType")) { 11528 this.expirationType = castToCodeableConcept(value); // CodeableConcept 11529 } else if (name.equals("subject")) { 11530 this.getSubject().add(castToReference(value)); 11531 } else if (name.equals("authority")) { 11532 this.getAuthority().add(castToReference(value)); 11533 } else if (name.equals("domain")) { 11534 this.getDomain().add(castToReference(value)); 11535 } else if (name.equals("site")) { 11536 this.getSite().add(castToReference(value)); 11537 } else if (name.equals("name")) { 11538 this.name = castToString(value); // StringType 11539 } else if (name.equals("title")) { 11540 this.title = castToString(value); // StringType 11541 } else if (name.equals("subtitle")) { 11542 this.subtitle = castToString(value); // StringType 11543 } else if (name.equals("alias")) { 11544 this.getAlias().add(castToString(value)); 11545 } else if (name.equals("author")) { 11546 this.author = castToReference(value); // Reference 11547 } else if (name.equals("scope")) { 11548 this.scope = castToCodeableConcept(value); // CodeableConcept 11549 } else if (name.equals("topic[x]")) { 11550 this.topic = castToType(value); // Type 11551 } else if (name.equals("type")) { 11552 this.type = castToCodeableConcept(value); // CodeableConcept 11553 } else if (name.equals("subType")) { 11554 this.getSubType().add(castToCodeableConcept(value)); 11555 } else if (name.equals("contentDefinition")) { 11556 this.contentDefinition = (ContentDefinitionComponent) value; // ContentDefinitionComponent 11557 } else if (name.equals("term")) { 11558 this.getTerm().add((TermComponent) value); 11559 } else if (name.equals("supportingInfo")) { 11560 this.getSupportingInfo().add(castToReference(value)); 11561 } else if (name.equals("relevantHistory")) { 11562 this.getRelevantHistory().add(castToReference(value)); 11563 } else if (name.equals("signer")) { 11564 this.getSigner().add((SignatoryComponent) value); 11565 } else if (name.equals("friendly")) { 11566 this.getFriendly().add((FriendlyLanguageComponent) value); 11567 } else if (name.equals("legal")) { 11568 this.getLegal().add((LegalLanguageComponent) value); 11569 } else if (name.equals("rule")) { 11570 this.getRule().add((ComputableLanguageComponent) value); 11571 } else if (name.equals("legallyBinding[x]")) { 11572 this.legallyBinding = castToType(value); // Type 11573 } else 11574 return super.setProperty(name, value); 11575 return value; 11576 } 11577 11578 @Override 11579 public Base makeProperty(int hash, String name) throws FHIRException { 11580 switch (hash) { 11581 case -1618432855: return addIdentifier(); 11582 case 116079: return getUrlElement(); 11583 case 351608024: return getVersionElement(); 11584 case -892481550: return getStatusElement(); 11585 case 568606040: return getLegalState(); 11586 case 8911915: return getInstantiatesCanonical(); 11587 case -1926393373: return getInstantiatesUriElement(); 11588 case -92412192: return getContentDerivative(); 11589 case -1179159893: return getIssuedElement(); 11590 case -793235316: return getApplies(); 11591 case -668311927: return getExpirationType(); 11592 case -1867885268: return addSubject(); 11593 case 1475610435: return addAuthority(); 11594 case -1326197564: return addDomain(); 11595 case 3530567: return addSite(); 11596 case 3373707: return getNameElement(); 11597 case 110371416: return getTitleElement(); 11598 case -2060497896: return getSubtitleElement(); 11599 case 92902992: return addAliasElement(); 11600 case -1406328437: return getAuthor(); 11601 case 109264468: return getScope(); 11602 case -957295375: return getTopic(); 11603 case 110546223: return getTopic(); 11604 case 3575610: return getType(); 11605 case -1868521062: return addSubType(); 11606 case 247055020: return getContentDefinition(); 11607 case 3556460: return addTerm(); 11608 case 1922406657: return addSupportingInfo(); 11609 case 1538891575: return addRelevantHistory(); 11610 case -902467798: return addSigner(); 11611 case -1423054677: return addFriendly(); 11612 case 102851257: return addLegal(); 11613 case 3512060: return addRule(); 11614 case -772497791: return getLegallyBinding(); 11615 case -126751329: return getLegallyBinding(); 11616 default: return super.makeProperty(hash, name); 11617 } 11618 11619 } 11620 11621 @Override 11622 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 11623 switch (hash) { 11624 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 11625 case 116079: /*url*/ return new String[] {"uri"}; 11626 case 351608024: /*version*/ return new String[] {"string"}; 11627 case -892481550: /*status*/ return new String[] {"code"}; 11628 case 568606040: /*legalState*/ return new String[] {"CodeableConcept"}; 11629 case 8911915: /*instantiatesCanonical*/ return new String[] {"Reference"}; 11630 case -1926393373: /*instantiatesUri*/ return new String[] {"uri"}; 11631 case -92412192: /*contentDerivative*/ return new String[] {"CodeableConcept"}; 11632 case -1179159893: /*issued*/ return new String[] {"dateTime"}; 11633 case -793235316: /*applies*/ return new String[] {"Period"}; 11634 case -668311927: /*expirationType*/ return new String[] {"CodeableConcept"}; 11635 case -1867885268: /*subject*/ return new String[] {"Reference"}; 11636 case 1475610435: /*authority*/ return new String[] {"Reference"}; 11637 case -1326197564: /*domain*/ return new String[] {"Reference"}; 11638 case 3530567: /*site*/ return new String[] {"Reference"}; 11639 case 3373707: /*name*/ return new String[] {"string"}; 11640 case 110371416: /*title*/ return new String[] {"string"}; 11641 case -2060497896: /*subtitle*/ return new String[] {"string"}; 11642 case 92902992: /*alias*/ return new String[] {"string"}; 11643 case -1406328437: /*author*/ return new String[] {"Reference"}; 11644 case 109264468: /*scope*/ return new String[] {"CodeableConcept"}; 11645 case 110546223: /*topic*/ return new String[] {"CodeableConcept", "Reference"}; 11646 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 11647 case -1868521062: /*subType*/ return new String[] {"CodeableConcept"}; 11648 case 247055020: /*contentDefinition*/ return new String[] {}; 11649 case 3556460: /*term*/ return new String[] {}; 11650 case 1922406657: /*supportingInfo*/ return new String[] {"Reference"}; 11651 case 1538891575: /*relevantHistory*/ return new String[] {"Reference"}; 11652 case -902467798: /*signer*/ return new String[] {}; 11653 case -1423054677: /*friendly*/ return new String[] {}; 11654 case 102851257: /*legal*/ return new String[] {}; 11655 case 3512060: /*rule*/ return new String[] {}; 11656 case -126751329: /*legallyBinding*/ return new String[] {"Attachment", "Reference"}; 11657 default: return super.getTypesForProperty(hash, name); 11658 } 11659 11660 } 11661 11662 @Override 11663 public Base addChild(String name) throws FHIRException { 11664 if (name.equals("identifier")) { 11665 return addIdentifier(); 11666 } 11667 else if (name.equals("url")) { 11668 throw new FHIRException("Cannot call addChild on a primitive type Contract.url"); 11669 } 11670 else if (name.equals("version")) { 11671 throw new FHIRException("Cannot call addChild on a primitive type Contract.version"); 11672 } 11673 else if (name.equals("status")) { 11674 throw new FHIRException("Cannot call addChild on a primitive type Contract.status"); 11675 } 11676 else if (name.equals("legalState")) { 11677 this.legalState = new CodeableConcept(); 11678 return this.legalState; 11679 } 11680 else if (name.equals("instantiatesCanonical")) { 11681 this.instantiatesCanonical = new Reference(); 11682 return this.instantiatesCanonical; 11683 } 11684 else if (name.equals("instantiatesUri")) { 11685 throw new FHIRException("Cannot call addChild on a primitive type Contract.instantiatesUri"); 11686 } 11687 else if (name.equals("contentDerivative")) { 11688 this.contentDerivative = new CodeableConcept(); 11689 return this.contentDerivative; 11690 } 11691 else if (name.equals("issued")) { 11692 throw new FHIRException("Cannot call addChild on a primitive type Contract.issued"); 11693 } 11694 else if (name.equals("applies")) { 11695 this.applies = new Period(); 11696 return this.applies; 11697 } 11698 else if (name.equals("expirationType")) { 11699 this.expirationType = new CodeableConcept(); 11700 return this.expirationType; 11701 } 11702 else if (name.equals("subject")) { 11703 return addSubject(); 11704 } 11705 else if (name.equals("authority")) { 11706 return addAuthority(); 11707 } 11708 else if (name.equals("domain")) { 11709 return addDomain(); 11710 } 11711 else if (name.equals("site")) { 11712 return addSite(); 11713 } 11714 else if (name.equals("name")) { 11715 throw new FHIRException("Cannot call addChild on a primitive type Contract.name"); 11716 } 11717 else if (name.equals("title")) { 11718 throw new FHIRException("Cannot call addChild on a primitive type Contract.title"); 11719 } 11720 else if (name.equals("subtitle")) { 11721 throw new FHIRException("Cannot call addChild on a primitive type Contract.subtitle"); 11722 } 11723 else if (name.equals("alias")) { 11724 throw new FHIRException("Cannot call addChild on a primitive type Contract.alias"); 11725 } 11726 else if (name.equals("author")) { 11727 this.author = new Reference(); 11728 return this.author; 11729 } 11730 else if (name.equals("scope")) { 11731 this.scope = new CodeableConcept(); 11732 return this.scope; 11733 } 11734 else if (name.equals("topicCodeableConcept")) { 11735 this.topic = new CodeableConcept(); 11736 return this.topic; 11737 } 11738 else if (name.equals("topicReference")) { 11739 this.topic = new Reference(); 11740 return this.topic; 11741 } 11742 else if (name.equals("type")) { 11743 this.type = new CodeableConcept(); 11744 return this.type; 11745 } 11746 else if (name.equals("subType")) { 11747 return addSubType(); 11748 } 11749 else if (name.equals("contentDefinition")) { 11750 this.contentDefinition = new ContentDefinitionComponent(); 11751 return this.contentDefinition; 11752 } 11753 else if (name.equals("term")) { 11754 return addTerm(); 11755 } 11756 else if (name.equals("supportingInfo")) { 11757 return addSupportingInfo(); 11758 } 11759 else if (name.equals("relevantHistory")) { 11760 return addRelevantHistory(); 11761 } 11762 else if (name.equals("signer")) { 11763 return addSigner(); 11764 } 11765 else if (name.equals("friendly")) { 11766 return addFriendly(); 11767 } 11768 else if (name.equals("legal")) { 11769 return addLegal(); 11770 } 11771 else if (name.equals("rule")) { 11772 return addRule(); 11773 } 11774 else if (name.equals("legallyBindingAttachment")) { 11775 this.legallyBinding = new Attachment(); 11776 return this.legallyBinding; 11777 } 11778 else if (name.equals("legallyBindingReference")) { 11779 this.legallyBinding = new Reference(); 11780 return this.legallyBinding; 11781 } 11782 else 11783 return super.addChild(name); 11784 } 11785 11786 public String fhirType() { 11787 return "Contract"; 11788 11789 } 11790 11791 public Contract copy() { 11792 Contract dst = new Contract(); 11793 copyValues(dst); 11794 if (identifier != null) { 11795 dst.identifier = new ArrayList<Identifier>(); 11796 for (Identifier i : identifier) 11797 dst.identifier.add(i.copy()); 11798 }; 11799 dst.url = url == null ? null : url.copy(); 11800 dst.version = version == null ? null : version.copy(); 11801 dst.status = status == null ? null : status.copy(); 11802 dst.legalState = legalState == null ? null : legalState.copy(); 11803 dst.instantiatesCanonical = instantiatesCanonical == null ? null : instantiatesCanonical.copy(); 11804 dst.instantiatesUri = instantiatesUri == null ? null : instantiatesUri.copy(); 11805 dst.contentDerivative = contentDerivative == null ? null : contentDerivative.copy(); 11806 dst.issued = issued == null ? null : issued.copy(); 11807 dst.applies = applies == null ? null : applies.copy(); 11808 dst.expirationType = expirationType == null ? null : expirationType.copy(); 11809 if (subject != null) { 11810 dst.subject = new ArrayList<Reference>(); 11811 for (Reference i : subject) 11812 dst.subject.add(i.copy()); 11813 }; 11814 if (authority != null) { 11815 dst.authority = new ArrayList<Reference>(); 11816 for (Reference i : authority) 11817 dst.authority.add(i.copy()); 11818 }; 11819 if (domain != null) { 11820 dst.domain = new ArrayList<Reference>(); 11821 for (Reference i : domain) 11822 dst.domain.add(i.copy()); 11823 }; 11824 if (site != null) { 11825 dst.site = new ArrayList<Reference>(); 11826 for (Reference i : site) 11827 dst.site.add(i.copy()); 11828 }; 11829 dst.name = name == null ? null : name.copy(); 11830 dst.title = title == null ? null : title.copy(); 11831 dst.subtitle = subtitle == null ? null : subtitle.copy(); 11832 if (alias != null) { 11833 dst.alias = new ArrayList<StringType>(); 11834 for (StringType i : alias) 11835 dst.alias.add(i.copy()); 11836 }; 11837 dst.author = author == null ? null : author.copy(); 11838 dst.scope = scope == null ? null : scope.copy(); 11839 dst.topic = topic == null ? null : topic.copy(); 11840 dst.type = type == null ? null : type.copy(); 11841 if (subType != null) { 11842 dst.subType = new ArrayList<CodeableConcept>(); 11843 for (CodeableConcept i : subType) 11844 dst.subType.add(i.copy()); 11845 }; 11846 dst.contentDefinition = contentDefinition == null ? null : contentDefinition.copy(); 11847 if (term != null) { 11848 dst.term = new ArrayList<TermComponent>(); 11849 for (TermComponent i : term) 11850 dst.term.add(i.copy()); 11851 }; 11852 if (supportingInfo != null) { 11853 dst.supportingInfo = new ArrayList<Reference>(); 11854 for (Reference i : supportingInfo) 11855 dst.supportingInfo.add(i.copy()); 11856 }; 11857 if (relevantHistory != null) { 11858 dst.relevantHistory = new ArrayList<Reference>(); 11859 for (Reference i : relevantHistory) 11860 dst.relevantHistory.add(i.copy()); 11861 }; 11862 if (signer != null) { 11863 dst.signer = new ArrayList<SignatoryComponent>(); 11864 for (SignatoryComponent i : signer) 11865 dst.signer.add(i.copy()); 11866 }; 11867 if (friendly != null) { 11868 dst.friendly = new ArrayList<FriendlyLanguageComponent>(); 11869 for (FriendlyLanguageComponent i : friendly) 11870 dst.friendly.add(i.copy()); 11871 }; 11872 if (legal != null) { 11873 dst.legal = new ArrayList<LegalLanguageComponent>(); 11874 for (LegalLanguageComponent i : legal) 11875 dst.legal.add(i.copy()); 11876 }; 11877 if (rule != null) { 11878 dst.rule = new ArrayList<ComputableLanguageComponent>(); 11879 for (ComputableLanguageComponent i : rule) 11880 dst.rule.add(i.copy()); 11881 }; 11882 dst.legallyBinding = legallyBinding == null ? null : legallyBinding.copy(); 11883 return dst; 11884 } 11885 11886 protected Contract typedCopy() { 11887 return copy(); 11888 } 11889 11890 @Override 11891 public boolean equalsDeep(Base other_) { 11892 if (!super.equalsDeep(other_)) 11893 return false; 11894 if (!(other_ instanceof Contract)) 11895 return false; 11896 Contract o = (Contract) other_; 11897 return compareDeep(identifier, o.identifier, true) && compareDeep(url, o.url, true) && compareDeep(version, o.version, true) 11898 && compareDeep(status, o.status, true) && compareDeep(legalState, o.legalState, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true) 11899 && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(contentDerivative, o.contentDerivative, true) 11900 && compareDeep(issued, o.issued, true) && compareDeep(applies, o.applies, true) && compareDeep(expirationType, o.expirationType, true) 11901 && compareDeep(subject, o.subject, true) && compareDeep(authority, o.authority, true) && compareDeep(domain, o.domain, true) 11902 && compareDeep(site, o.site, true) && compareDeep(name, o.name, true) && compareDeep(title, o.title, true) 11903 && compareDeep(subtitle, o.subtitle, true) && compareDeep(alias, o.alias, true) && compareDeep(author, o.author, true) 11904 && compareDeep(scope, o.scope, true) && compareDeep(topic, o.topic, true) && compareDeep(type, o.type, true) 11905 && compareDeep(subType, o.subType, true) && compareDeep(contentDefinition, o.contentDefinition, true) 11906 && compareDeep(term, o.term, true) && compareDeep(supportingInfo, o.supportingInfo, true) && compareDeep(relevantHistory, o.relevantHistory, true) 11907 && compareDeep(signer, o.signer, true) && compareDeep(friendly, o.friendly, true) && compareDeep(legal, o.legal, true) 11908 && compareDeep(rule, o.rule, true) && compareDeep(legallyBinding, o.legallyBinding, true); 11909 } 11910 11911 @Override 11912 public boolean equalsShallow(Base other_) { 11913 if (!super.equalsShallow(other_)) 11914 return false; 11915 if (!(other_ instanceof Contract)) 11916 return false; 11917 Contract o = (Contract) other_; 11918 return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(status, o.status, true) 11919 && compareValues(instantiatesUri, o.instantiatesUri, true) && compareValues(issued, o.issued, true) 11920 && compareValues(name, o.name, true) && compareValues(title, o.title, true) && compareValues(subtitle, o.subtitle, true) 11921 && compareValues(alias, o.alias, true); 11922 } 11923 11924 public boolean isEmpty() { 11925 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, url, version 11926 , status, legalState, instantiatesCanonical, instantiatesUri, contentDerivative, issued 11927 , applies, expirationType, subject, authority, domain, site, name, title, subtitle 11928 , alias, author, scope, topic, type, subType, contentDefinition, term, supportingInfo 11929 , relevantHistory, signer, friendly, legal, rule, legallyBinding); 11930 } 11931 11932 @Override 11933 public ResourceType getResourceType() { 11934 return ResourceType.Contract; 11935 } 11936 11937 /** 11938 * Search parameter: <b>identifier</b> 11939 * <p> 11940 * Description: <b>The identity of the contract</b><br> 11941 * Type: <b>token</b><br> 11942 * Path: <b>Contract.identifier</b><br> 11943 * </p> 11944 */ 11945 @SearchParamDefinition(name="identifier", path="Contract.identifier", description="The identity of the contract", type="token" ) 11946 public static final String SP_IDENTIFIER = "identifier"; 11947 /** 11948 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 11949 * <p> 11950 * Description: <b>The identity of the contract</b><br> 11951 * Type: <b>token</b><br> 11952 * Path: <b>Contract.identifier</b><br> 11953 * </p> 11954 */ 11955 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 11956 11957 /** 11958 * Search parameter: <b>instantiates</b> 11959 * <p> 11960 * Description: <b>A source definition of the contract</b><br> 11961 * Type: <b>uri</b><br> 11962 * Path: <b>Contract.instantiatesUri</b><br> 11963 * </p> 11964 */ 11965 @SearchParamDefinition(name="instantiates", path="Contract.instantiatesUri", description="A source definition of the contract", type="uri" ) 11966 public static final String SP_INSTANTIATES = "instantiates"; 11967 /** 11968 * <b>Fluent Client</b> search parameter constant for <b>instantiates</b> 11969 * <p> 11970 * Description: <b>A source definition of the contract</b><br> 11971 * Type: <b>uri</b><br> 11972 * Path: <b>Contract.instantiatesUri</b><br> 11973 * </p> 11974 */ 11975 public static final ca.uhn.fhir.rest.gclient.UriClientParam INSTANTIATES = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_INSTANTIATES); 11976 11977 /** 11978 * Search parameter: <b>patient</b> 11979 * <p> 11980 * Description: <b>The identity of the subject of the contract (if a patient)</b><br> 11981 * Type: <b>reference</b><br> 11982 * Path: <b>Contract.subject</b><br> 11983 * </p> 11984 */ 11985 @SearchParamDefinition(name="patient", path="Contract.subject.where(resolve() is Patient)", description="The identity of the subject of the contract (if a patient)", type="reference", target={Patient.class } ) 11986 public static final String SP_PATIENT = "patient"; 11987 /** 11988 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 11989 * <p> 11990 * Description: <b>The identity of the subject of the contract (if a patient)</b><br> 11991 * Type: <b>reference</b><br> 11992 * Path: <b>Contract.subject</b><br> 11993 * </p> 11994 */ 11995 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 11996 11997/** 11998 * Constant for fluent queries to be used to add include statements. Specifies 11999 * the path value of "<b>Contract:patient</b>". 12000 */ 12001 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Contract:patient").toLocked(); 12002 12003 /** 12004 * Search parameter: <b>subject</b> 12005 * <p> 12006 * Description: <b>The identity of the subject of the contract</b><br> 12007 * Type: <b>reference</b><br> 12008 * Path: <b>Contract.subject</b><br> 12009 * </p> 12010 */ 12011 @SearchParamDefinition(name="subject", path="Contract.subject", description="The identity of the subject of the contract", type="reference" ) 12012 public static final String SP_SUBJECT = "subject"; 12013 /** 12014 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 12015 * <p> 12016 * Description: <b>The identity of the subject of the contract</b><br> 12017 * Type: <b>reference</b><br> 12018 * Path: <b>Contract.subject</b><br> 12019 * </p> 12020 */ 12021 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 12022 12023/** 12024 * Constant for fluent queries to be used to add include statements. Specifies 12025 * the path value of "<b>Contract:subject</b>". 12026 */ 12027 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Contract:subject").toLocked(); 12028 12029 /** 12030 * Search parameter: <b>authority</b> 12031 * <p> 12032 * Description: <b>The authority of the contract</b><br> 12033 * Type: <b>reference</b><br> 12034 * Path: <b>Contract.authority</b><br> 12035 * </p> 12036 */ 12037 @SearchParamDefinition(name="authority", path="Contract.authority", description="The authority of the contract", type="reference", target={Organization.class } ) 12038 public static final String SP_AUTHORITY = "authority"; 12039 /** 12040 * <b>Fluent Client</b> search parameter constant for <b>authority</b> 12041 * <p> 12042 * Description: <b>The authority of the contract</b><br> 12043 * Type: <b>reference</b><br> 12044 * Path: <b>Contract.authority</b><br> 12045 * </p> 12046 */ 12047 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHORITY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHORITY); 12048 12049/** 12050 * Constant for fluent queries to be used to add include statements. Specifies 12051 * the path value of "<b>Contract:authority</b>". 12052 */ 12053 public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHORITY = new ca.uhn.fhir.model.api.Include("Contract:authority").toLocked(); 12054 12055 /** 12056 * Search parameter: <b>domain</b> 12057 * <p> 12058 * Description: <b>The domain of the contract</b><br> 12059 * Type: <b>reference</b><br> 12060 * Path: <b>Contract.domain</b><br> 12061 * </p> 12062 */ 12063 @SearchParamDefinition(name="domain", path="Contract.domain", description="The domain of the contract", type="reference", target={Location.class } ) 12064 public static final String SP_DOMAIN = "domain"; 12065 /** 12066 * <b>Fluent Client</b> search parameter constant for <b>domain</b> 12067 * <p> 12068 * Description: <b>The domain of the contract</b><br> 12069 * Type: <b>reference</b><br> 12070 * Path: <b>Contract.domain</b><br> 12071 * </p> 12072 */ 12073 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DOMAIN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DOMAIN); 12074 12075/** 12076 * Constant for fluent queries to be used to add include statements. Specifies 12077 * the path value of "<b>Contract:domain</b>". 12078 */ 12079 public static final ca.uhn.fhir.model.api.Include INCLUDE_DOMAIN = new ca.uhn.fhir.model.api.Include("Contract:domain").toLocked(); 12080 12081 /** 12082 * Search parameter: <b>issued</b> 12083 * <p> 12084 * Description: <b>The date/time the contract was issued</b><br> 12085 * Type: <b>date</b><br> 12086 * Path: <b>Contract.issued</b><br> 12087 * </p> 12088 */ 12089 @SearchParamDefinition(name="issued", path="Contract.issued", description="The date/time the contract was issued", type="date" ) 12090 public static final String SP_ISSUED = "issued"; 12091 /** 12092 * <b>Fluent Client</b> search parameter constant for <b>issued</b> 12093 * <p> 12094 * Description: <b>The date/time the contract was issued</b><br> 12095 * Type: <b>date</b><br> 12096 * Path: <b>Contract.issued</b><br> 12097 * </p> 12098 */ 12099 public static final ca.uhn.fhir.rest.gclient.DateClientParam ISSUED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_ISSUED); 12100 12101 /** 12102 * Search parameter: <b>url</b> 12103 * <p> 12104 * Description: <b>The basal contract definition</b><br> 12105 * Type: <b>uri</b><br> 12106 * Path: <b>Contract.url</b><br> 12107 * </p> 12108 */ 12109 @SearchParamDefinition(name="url", path="Contract.url", description="The basal contract definition", type="uri" ) 12110 public static final String SP_URL = "url"; 12111 /** 12112 * <b>Fluent Client</b> search parameter constant for <b>url</b> 12113 * <p> 12114 * Description: <b>The basal contract definition</b><br> 12115 * Type: <b>uri</b><br> 12116 * Path: <b>Contract.url</b><br> 12117 * </p> 12118 */ 12119 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 12120 12121 /** 12122 * Search parameter: <b>signer</b> 12123 * <p> 12124 * Description: <b>Contract Signatory Party</b><br> 12125 * Type: <b>reference</b><br> 12126 * Path: <b>Contract.signer.party</b><br> 12127 * </p> 12128 */ 12129 @SearchParamDefinition(name="signer", path="Contract.signer.party", description="Contract Signatory Party", type="reference", target={Organization.class, Patient.class, Practitioner.class, RelatedPerson.class } ) 12130 public static final String SP_SIGNER = "signer"; 12131 /** 12132 * <b>Fluent Client</b> search parameter constant for <b>signer</b> 12133 * <p> 12134 * Description: <b>Contract Signatory Party</b><br> 12135 * Type: <b>reference</b><br> 12136 * Path: <b>Contract.signer.party</b><br> 12137 * </p> 12138 */ 12139 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SIGNER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SIGNER); 12140 12141/** 12142 * Constant for fluent queries to be used to add include statements. Specifies 12143 * the path value of "<b>Contract:signer</b>". 12144 */ 12145 public static final ca.uhn.fhir.model.api.Include INCLUDE_SIGNER = new ca.uhn.fhir.model.api.Include("Contract:signer").toLocked(); 12146 12147 /** 12148 * Search parameter: <b>status</b> 12149 * <p> 12150 * Description: <b>The status of the contract</b><br> 12151 * Type: <b>token</b><br> 12152 * Path: <b>Contract.status</b><br> 12153 * </p> 12154 */ 12155 @SearchParamDefinition(name="status", path="Contract.status", description="The status of the contract", type="token" ) 12156 public static final String SP_STATUS = "status"; 12157 /** 12158 * <b>Fluent Client</b> search parameter constant for <b>status</b> 12159 * <p> 12160 * Description: <b>The status of the contract</b><br> 12161 * Type: <b>token</b><br> 12162 * Path: <b>Contract.status</b><br> 12163 * </p> 12164 */ 12165 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 12166 12167 12168} 12169