001package org.hl7.fhir.r4.model; 002 003import java.math.BigDecimal; 004 005/*- 006 * #%L 007 * org.hl7.fhir.r4 008 * %% 009 * Copyright (C) 2014 - 2019 Health Level 7 010 * %% 011 * Licensed under the Apache License, Version 2.0 (the "License"); 012 * you may not use this file except in compliance with the License. 013 * You may obtain a copy of the License at 014 * 015 * http://www.apache.org/licenses/LICENSE-2.0 016 * 017 * Unless required by applicable law or agreed to in writing, software 018 * distributed under the License is distributed on an "AS IS" BASIS, 019 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 020 * See the License for the specific language governing permissions and 021 * limitations under the License. 022 * #L% 023 */ 024 025/* 026 Copyright (c) 2011+, HL7, Inc. 027 All rights reserved. 028 029 Redistribution and use in source and binary forms, with or without modification, 030 are permitted provided that the following conditions are met: 031 032 * Redistributions of source code must retain the above copyright notice, this 033 list of conditions and the following disclaimer. 034 * Redistributions in binary form must reproduce the above copyright notice, 035 this list of conditions and the following disclaimer in the documentation 036 and/or other materials provided with the distribution. 037 * Neither the name of HL7 nor the names of its contributors may be used to 038 endorse or promote products derived from this software without specific 039 prior written permission. 040 041 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 042 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 043 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 044 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 045 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 046 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 047 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 048 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 049 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 050 POSSIBILITY OF SUCH DAMAGE. 051 052*/ 053 054// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0 055import java.util.ArrayList; 056import java.util.Date; 057import java.util.List; 058 059import org.hl7.fhir.exceptions.FHIRException; 060import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 061import org.hl7.fhir.utilities.Utilities; 062 063import ca.uhn.fhir.model.api.annotation.Block; 064import ca.uhn.fhir.model.api.annotation.Child; 065import ca.uhn.fhir.model.api.annotation.Description; 066import ca.uhn.fhir.model.api.annotation.ResourceDef; 067import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 068/** 069 * Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement. 070 */ 071@ResourceDef(name="Contract", profile="http://hl7.org/fhir/StructureDefinition/Contract") 072public class Contract extends DomainResource { 073 074 public enum ContractStatus { 075 /** 076 * 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. 077 */ 078 AMENDED, 079 /** 080 * 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. 081 */ 082 APPENDED, 083 /** 084 * 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. 085 */ 086 CANCELLED, 087 /** 088 * 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. 089 */ 090 DISPUTED, 091 /** 092 * Contract was created in error. No Precedence Order. Status may be applied to a Contract with any status. 093 */ 094 ENTEREDINERROR, 095 /** 096 * 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. 097 */ 098 EXECUTABLE, 099 /** 100 * 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. 101 */ 102 EXECUTED, 103 /** 104 * 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. 105 */ 106 NEGOTIABLE, 107 /** 108 * 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. 109 */ 110 OFFERED, 111 /** 112 * 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. 113 */ 114 POLICY, 115 /** 116 * 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. 117 */ 118 REJECTED, 119 /** 120 * 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. 121 */ 122 RENEWED, 123 /** 124 * A Contract that is rescinded. May be required prior to replacing with an updated Contract. Comparable FHIR and v.3 status codes: nullified. 125 */ 126 REVOKED, 127 /** 128 * 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. 129 */ 130 RESOLVED, 131 /** 132 * 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. 133 */ 134 TERMINATED, 135 /** 136 * added to help the parsers with the generic types 137 */ 138 NULL; 139 public static ContractStatus fromCode(String codeString) throws FHIRException { 140 if (codeString == null || "".equals(codeString)) 141 return null; 142 if ("amended".equals(codeString)) 143 return AMENDED; 144 if ("appended".equals(codeString)) 145 return APPENDED; 146 if ("cancelled".equals(codeString)) 147 return CANCELLED; 148 if ("disputed".equals(codeString)) 149 return DISPUTED; 150 if ("entered-in-error".equals(codeString)) 151 return ENTEREDINERROR; 152 if ("executable".equals(codeString)) 153 return EXECUTABLE; 154 if ("executed".equals(codeString)) 155 return EXECUTED; 156 if ("negotiable".equals(codeString)) 157 return NEGOTIABLE; 158 if ("offered".equals(codeString)) 159 return OFFERED; 160 if ("policy".equals(codeString)) 161 return POLICY; 162 if ("rejected".equals(codeString)) 163 return REJECTED; 164 if ("renewed".equals(codeString)) 165 return RENEWED; 166 if ("revoked".equals(codeString)) 167 return REVOKED; 168 if ("resolved".equals(codeString)) 169 return RESOLVED; 170 if ("terminated".equals(codeString)) 171 return TERMINATED; 172 if (Configuration.isAcceptInvalidEnums()) 173 return null; 174 else 175 throw new FHIRException("Unknown ContractStatus code '"+codeString+"'"); 176 } 177 public String toCode() { 178 switch (this) { 179 case AMENDED: return "amended"; 180 case APPENDED: return "appended"; 181 case CANCELLED: return "cancelled"; 182 case DISPUTED: return "disputed"; 183 case ENTEREDINERROR: return "entered-in-error"; 184 case EXECUTABLE: return "executable"; 185 case EXECUTED: return "executed"; 186 case NEGOTIABLE: return "negotiable"; 187 case OFFERED: return "offered"; 188 case POLICY: return "policy"; 189 case REJECTED: return "rejected"; 190 case RENEWED: return "renewed"; 191 case REVOKED: return "revoked"; 192 case RESOLVED: return "resolved"; 193 case TERMINATED: return "terminated"; 194 default: return "?"; 195 } 196 } 197 public String getSystem() { 198 switch (this) { 199 case AMENDED: return "http://hl7.org/fhir/contract-status"; 200 case APPENDED: return "http://hl7.org/fhir/contract-status"; 201 case CANCELLED: return "http://hl7.org/fhir/contract-status"; 202 case DISPUTED: return "http://hl7.org/fhir/contract-status"; 203 case ENTEREDINERROR: return "http://hl7.org/fhir/contract-status"; 204 case EXECUTABLE: return "http://hl7.org/fhir/contract-status"; 205 case EXECUTED: return "http://hl7.org/fhir/contract-status"; 206 case NEGOTIABLE: return "http://hl7.org/fhir/contract-status"; 207 case OFFERED: return "http://hl7.org/fhir/contract-status"; 208 case POLICY: return "http://hl7.org/fhir/contract-status"; 209 case REJECTED: return "http://hl7.org/fhir/contract-status"; 210 case RENEWED: return "http://hl7.org/fhir/contract-status"; 211 case REVOKED: return "http://hl7.org/fhir/contract-status"; 212 case RESOLVED: return "http://hl7.org/fhir/contract-status"; 213 case TERMINATED: return "http://hl7.org/fhir/contract-status"; 214 default: return "?"; 215 } 216 } 217 public String getDefinition() { 218 switch (this) { 219 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."; 220 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."; 221 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."; 222 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."; 223 case ENTEREDINERROR: return "Contract was created in error. No Precedence Order. Status may be applied to a Contract with any status."; 224 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."; 225 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."; 226 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."; 227 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."; 228 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."; 229 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."; 230 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."; 231 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."; 232 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."; 233 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."; 234 default: return "?"; 235 } 236 } 237 public String getDisplay() { 238 switch (this) { 239 case AMENDED: return "Amended"; 240 case APPENDED: return "Appended"; 241 case CANCELLED: return "Cancelled"; 242 case DISPUTED: return "Disputed"; 243 case ENTEREDINERROR: return "Entered in Error"; 244 case EXECUTABLE: return "Executable"; 245 case EXECUTED: return "Executed"; 246 case NEGOTIABLE: return "Negotiable"; 247 case OFFERED: return "Offered"; 248 case POLICY: return "Policy"; 249 case REJECTED: return "Rejected"; 250 case RENEWED: return "Renewed"; 251 case REVOKED: return "Revoked"; 252 case RESOLVED: return "Resolved"; 253 case TERMINATED: return "Terminated"; 254 default: return "?"; 255 } 256 } 257 } 258 259 public static class ContractStatusEnumFactory implements EnumFactory<ContractStatus> { 260 public ContractStatus fromCode(String codeString) throws IllegalArgumentException { 261 if (codeString == null || "".equals(codeString)) 262 if (codeString == null || "".equals(codeString)) 263 return null; 264 if ("amended".equals(codeString)) 265 return ContractStatus.AMENDED; 266 if ("appended".equals(codeString)) 267 return ContractStatus.APPENDED; 268 if ("cancelled".equals(codeString)) 269 return ContractStatus.CANCELLED; 270 if ("disputed".equals(codeString)) 271 return ContractStatus.DISPUTED; 272 if ("entered-in-error".equals(codeString)) 273 return ContractStatus.ENTEREDINERROR; 274 if ("executable".equals(codeString)) 275 return ContractStatus.EXECUTABLE; 276 if ("executed".equals(codeString)) 277 return ContractStatus.EXECUTED; 278 if ("negotiable".equals(codeString)) 279 return ContractStatus.NEGOTIABLE; 280 if ("offered".equals(codeString)) 281 return ContractStatus.OFFERED; 282 if ("policy".equals(codeString)) 283 return ContractStatus.POLICY; 284 if ("rejected".equals(codeString)) 285 return ContractStatus.REJECTED; 286 if ("renewed".equals(codeString)) 287 return ContractStatus.RENEWED; 288 if ("revoked".equals(codeString)) 289 return ContractStatus.REVOKED; 290 if ("resolved".equals(codeString)) 291 return ContractStatus.RESOLVED; 292 if ("terminated".equals(codeString)) 293 return ContractStatus.TERMINATED; 294 throw new IllegalArgumentException("Unknown ContractStatus code '"+codeString+"'"); 295 } 296 public Enumeration<ContractStatus> fromType(Base code) throws FHIRException { 297 if (code == null) 298 return null; 299 if (code.isEmpty()) 300 return new Enumeration<ContractStatus>(this); 301 String codeString = ((PrimitiveType) code).asStringValue(); 302 if (codeString == null || "".equals(codeString)) 303 return null; 304 if ("amended".equals(codeString)) 305 return new Enumeration<ContractStatus>(this, ContractStatus.AMENDED); 306 if ("appended".equals(codeString)) 307 return new Enumeration<ContractStatus>(this, ContractStatus.APPENDED); 308 if ("cancelled".equals(codeString)) 309 return new Enumeration<ContractStatus>(this, ContractStatus.CANCELLED); 310 if ("disputed".equals(codeString)) 311 return new Enumeration<ContractStatus>(this, ContractStatus.DISPUTED); 312 if ("entered-in-error".equals(codeString)) 313 return new Enumeration<ContractStatus>(this, ContractStatus.ENTEREDINERROR); 314 if ("executable".equals(codeString)) 315 return new Enumeration<ContractStatus>(this, ContractStatus.EXECUTABLE); 316 if ("executed".equals(codeString)) 317 return new Enumeration<ContractStatus>(this, ContractStatus.EXECUTED); 318 if ("negotiable".equals(codeString)) 319 return new Enumeration<ContractStatus>(this, ContractStatus.NEGOTIABLE); 320 if ("offered".equals(codeString)) 321 return new Enumeration<ContractStatus>(this, ContractStatus.OFFERED); 322 if ("policy".equals(codeString)) 323 return new Enumeration<ContractStatus>(this, ContractStatus.POLICY); 324 if ("rejected".equals(codeString)) 325 return new Enumeration<ContractStatus>(this, ContractStatus.REJECTED); 326 if ("renewed".equals(codeString)) 327 return new Enumeration<ContractStatus>(this, ContractStatus.RENEWED); 328 if ("revoked".equals(codeString)) 329 return new Enumeration<ContractStatus>(this, ContractStatus.REVOKED); 330 if ("resolved".equals(codeString)) 331 return new Enumeration<ContractStatus>(this, ContractStatus.RESOLVED); 332 if ("terminated".equals(codeString)) 333 return new Enumeration<ContractStatus>(this, ContractStatus.TERMINATED); 334 throw new FHIRException("Unknown ContractStatus code '"+codeString+"'"); 335 } 336 public String toCode(ContractStatus code) { 337 if (code == ContractStatus.AMENDED) 338 return "amended"; 339 if (code == ContractStatus.APPENDED) 340 return "appended"; 341 if (code == ContractStatus.CANCELLED) 342 return "cancelled"; 343 if (code == ContractStatus.DISPUTED) 344 return "disputed"; 345 if (code == ContractStatus.ENTEREDINERROR) 346 return "entered-in-error"; 347 if (code == ContractStatus.EXECUTABLE) 348 return "executable"; 349 if (code == ContractStatus.EXECUTED) 350 return "executed"; 351 if (code == ContractStatus.NEGOTIABLE) 352 return "negotiable"; 353 if (code == ContractStatus.OFFERED) 354 return "offered"; 355 if (code == ContractStatus.POLICY) 356 return "policy"; 357 if (code == ContractStatus.REJECTED) 358 return "rejected"; 359 if (code == ContractStatus.RENEWED) 360 return "renewed"; 361 if (code == ContractStatus.REVOKED) 362 return "revoked"; 363 if (code == ContractStatus.RESOLVED) 364 return "resolved"; 365 if (code == ContractStatus.TERMINATED) 366 return "terminated"; 367 return "?"; 368 } 369 public String toSystem(ContractStatus code) { 370 return code.getSystem(); 371 } 372 } 373 374 public enum ContractPublicationStatus { 375 /** 376 * 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. 377 */ 378 AMENDED, 379 /** 380 * 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. 381 */ 382 APPENDED, 383 /** 384 * 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. 385 */ 386 CANCELLED, 387 /** 388 * 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. 389 */ 390 DISPUTED, 391 /** 392 * Contract was created in error. No Precedence Order. Status may be applied to a Contract with any status. 393 */ 394 ENTEREDINERROR, 395 /** 396 * 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. 397 */ 398 EXECUTABLE, 399 /** 400 * 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. 401 */ 402 EXECUTED, 403 /** 404 * 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. 405 */ 406 NEGOTIABLE, 407 /** 408 * 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. 409 */ 410 OFFERED, 411 /** 412 * 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. 413 */ 414 POLICY, 415 /** 416 * 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. 417 */ 418 REJECTED, 419 /** 420 * 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. 421 */ 422 RENEWED, 423 /** 424 * A Contract that is rescinded. May be required prior to replacing with an updated Contract. Comparable FHIR and v.3 status codes: nullified. 425 */ 426 REVOKED, 427 /** 428 * 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. 429 */ 430 RESOLVED, 431 /** 432 * 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. 433 */ 434 TERMINATED, 435 /** 436 * added to help the parsers with the generic types 437 */ 438 NULL; 439 public static ContractPublicationStatus fromCode(String codeString) throws FHIRException { 440 if (codeString == null || "".equals(codeString)) 441 return null; 442 if ("amended".equals(codeString)) 443 return AMENDED; 444 if ("appended".equals(codeString)) 445 return APPENDED; 446 if ("cancelled".equals(codeString)) 447 return CANCELLED; 448 if ("disputed".equals(codeString)) 449 return DISPUTED; 450 if ("entered-in-error".equals(codeString)) 451 return ENTEREDINERROR; 452 if ("executable".equals(codeString)) 453 return EXECUTABLE; 454 if ("executed".equals(codeString)) 455 return EXECUTED; 456 if ("negotiable".equals(codeString)) 457 return NEGOTIABLE; 458 if ("offered".equals(codeString)) 459 return OFFERED; 460 if ("policy".equals(codeString)) 461 return POLICY; 462 if ("rejected".equals(codeString)) 463 return REJECTED; 464 if ("renewed".equals(codeString)) 465 return RENEWED; 466 if ("revoked".equals(codeString)) 467 return REVOKED; 468 if ("resolved".equals(codeString)) 469 return RESOLVED; 470 if ("terminated".equals(codeString)) 471 return TERMINATED; 472 if (Configuration.isAcceptInvalidEnums()) 473 return null; 474 else 475 throw new FHIRException("Unknown ContractPublicationStatus code '"+codeString+"'"); 476 } 477 public String toCode() { 478 switch (this) { 479 case AMENDED: return "amended"; 480 case APPENDED: return "appended"; 481 case CANCELLED: return "cancelled"; 482 case DISPUTED: return "disputed"; 483 case ENTEREDINERROR: return "entered-in-error"; 484 case EXECUTABLE: return "executable"; 485 case EXECUTED: return "executed"; 486 case NEGOTIABLE: return "negotiable"; 487 case OFFERED: return "offered"; 488 case POLICY: return "policy"; 489 case REJECTED: return "rejected"; 490 case RENEWED: return "renewed"; 491 case REVOKED: return "revoked"; 492 case RESOLVED: return "resolved"; 493 case TERMINATED: return "terminated"; 494 default: return "?"; 495 } 496 } 497 public String getSystem() { 498 switch (this) { 499 case AMENDED: return "http://hl7.org/fhir/contract-publicationstatus"; 500 case APPENDED: return "http://hl7.org/fhir/contract-publicationstatus"; 501 case CANCELLED: return "http://hl7.org/fhir/contract-publicationstatus"; 502 case DISPUTED: return "http://hl7.org/fhir/contract-publicationstatus"; 503 case ENTEREDINERROR: return "http://hl7.org/fhir/contract-publicationstatus"; 504 case EXECUTABLE: return "http://hl7.org/fhir/contract-publicationstatus"; 505 case EXECUTED: return "http://hl7.org/fhir/contract-publicationstatus"; 506 case NEGOTIABLE: return "http://hl7.org/fhir/contract-publicationstatus"; 507 case OFFERED: return "http://hl7.org/fhir/contract-publicationstatus"; 508 case POLICY: return "http://hl7.org/fhir/contract-publicationstatus"; 509 case REJECTED: return "http://hl7.org/fhir/contract-publicationstatus"; 510 case RENEWED: return "http://hl7.org/fhir/contract-publicationstatus"; 511 case REVOKED: return "http://hl7.org/fhir/contract-publicationstatus"; 512 case RESOLVED: return "http://hl7.org/fhir/contract-publicationstatus"; 513 case TERMINATED: return "http://hl7.org/fhir/contract-publicationstatus"; 514 default: return "?"; 515 } 516 } 517 public String getDefinition() { 518 switch (this) { 519 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."; 520 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."; 521 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."; 522 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."; 523 case ENTEREDINERROR: return "Contract was created in error. No Precedence Order. Status may be applied to a Contract with any status."; 524 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."; 525 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."; 526 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."; 527 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."; 528 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."; 529 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."; 530 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."; 531 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."; 532 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."; 533 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."; 534 default: return "?"; 535 } 536 } 537 public String getDisplay() { 538 switch (this) { 539 case AMENDED: return "Amended"; 540 case APPENDED: return "Appended"; 541 case CANCELLED: return "Cancelled"; 542 case DISPUTED: return "Disputed"; 543 case ENTEREDINERROR: return "Entered in Error"; 544 case EXECUTABLE: return "Executable"; 545 case EXECUTED: return "Executed"; 546 case NEGOTIABLE: return "Negotiable"; 547 case OFFERED: return "Offered"; 548 case POLICY: return "Policy"; 549 case REJECTED: return "Rejected"; 550 case RENEWED: return "Renewed"; 551 case REVOKED: return "Revoked"; 552 case RESOLVED: return "Resolved"; 553 case TERMINATED: return "Terminated"; 554 default: return "?"; 555 } 556 } 557 } 558 559 public static class ContractPublicationStatusEnumFactory implements EnumFactory<ContractPublicationStatus> { 560 public ContractPublicationStatus fromCode(String codeString) throws IllegalArgumentException { 561 if (codeString == null || "".equals(codeString)) 562 if (codeString == null || "".equals(codeString)) 563 return null; 564 if ("amended".equals(codeString)) 565 return ContractPublicationStatus.AMENDED; 566 if ("appended".equals(codeString)) 567 return ContractPublicationStatus.APPENDED; 568 if ("cancelled".equals(codeString)) 569 return ContractPublicationStatus.CANCELLED; 570 if ("disputed".equals(codeString)) 571 return ContractPublicationStatus.DISPUTED; 572 if ("entered-in-error".equals(codeString)) 573 return ContractPublicationStatus.ENTEREDINERROR; 574 if ("executable".equals(codeString)) 575 return ContractPublicationStatus.EXECUTABLE; 576 if ("executed".equals(codeString)) 577 return ContractPublicationStatus.EXECUTED; 578 if ("negotiable".equals(codeString)) 579 return ContractPublicationStatus.NEGOTIABLE; 580 if ("offered".equals(codeString)) 581 return ContractPublicationStatus.OFFERED; 582 if ("policy".equals(codeString)) 583 return ContractPublicationStatus.POLICY; 584 if ("rejected".equals(codeString)) 585 return ContractPublicationStatus.REJECTED; 586 if ("renewed".equals(codeString)) 587 return ContractPublicationStatus.RENEWED; 588 if ("revoked".equals(codeString)) 589 return ContractPublicationStatus.REVOKED; 590 if ("resolved".equals(codeString)) 591 return ContractPublicationStatus.RESOLVED; 592 if ("terminated".equals(codeString)) 593 return ContractPublicationStatus.TERMINATED; 594 throw new IllegalArgumentException("Unknown ContractPublicationStatus code '"+codeString+"'"); 595 } 596 public Enumeration<ContractPublicationStatus> fromType(Base code) throws FHIRException { 597 if (code == null) 598 return null; 599 if (code.isEmpty()) 600 return new Enumeration<ContractPublicationStatus>(this); 601 String codeString = ((PrimitiveType) code).asStringValue(); 602 if (codeString == null || "".equals(codeString)) 603 return null; 604 if ("amended".equals(codeString)) 605 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.AMENDED); 606 if ("appended".equals(codeString)) 607 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.APPENDED); 608 if ("cancelled".equals(codeString)) 609 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.CANCELLED); 610 if ("disputed".equals(codeString)) 611 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.DISPUTED); 612 if ("entered-in-error".equals(codeString)) 613 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.ENTEREDINERROR); 614 if ("executable".equals(codeString)) 615 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.EXECUTABLE); 616 if ("executed".equals(codeString)) 617 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.EXECUTED); 618 if ("negotiable".equals(codeString)) 619 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.NEGOTIABLE); 620 if ("offered".equals(codeString)) 621 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.OFFERED); 622 if ("policy".equals(codeString)) 623 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.POLICY); 624 if ("rejected".equals(codeString)) 625 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.REJECTED); 626 if ("renewed".equals(codeString)) 627 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.RENEWED); 628 if ("revoked".equals(codeString)) 629 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.REVOKED); 630 if ("resolved".equals(codeString)) 631 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.RESOLVED); 632 if ("terminated".equals(codeString)) 633 return new Enumeration<ContractPublicationStatus>(this, ContractPublicationStatus.TERMINATED); 634 throw new FHIRException("Unknown ContractPublicationStatus code '"+codeString+"'"); 635 } 636 public String toCode(ContractPublicationStatus code) { 637 if (code == ContractPublicationStatus.AMENDED) 638 return "amended"; 639 if (code == ContractPublicationStatus.APPENDED) 640 return "appended"; 641 if (code == ContractPublicationStatus.CANCELLED) 642 return "cancelled"; 643 if (code == ContractPublicationStatus.DISPUTED) 644 return "disputed"; 645 if (code == ContractPublicationStatus.ENTEREDINERROR) 646 return "entered-in-error"; 647 if (code == ContractPublicationStatus.EXECUTABLE) 648 return "executable"; 649 if (code == ContractPublicationStatus.EXECUTED) 650 return "executed"; 651 if (code == ContractPublicationStatus.NEGOTIABLE) 652 return "negotiable"; 653 if (code == ContractPublicationStatus.OFFERED) 654 return "offered"; 655 if (code == ContractPublicationStatus.POLICY) 656 return "policy"; 657 if (code == ContractPublicationStatus.REJECTED) 658 return "rejected"; 659 if (code == ContractPublicationStatus.RENEWED) 660 return "renewed"; 661 if (code == ContractPublicationStatus.REVOKED) 662 return "revoked"; 663 if (code == ContractPublicationStatus.RESOLVED) 664 return "resolved"; 665 if (code == ContractPublicationStatus.TERMINATED) 666 return "terminated"; 667 return "?"; 668 } 669 public String toSystem(ContractPublicationStatus code) { 670 return code.getSystem(); 671 } 672 } 673 674 @Block() 675 public static class ContentDefinitionComponent extends BackboneElement implements IBaseBackboneElement { 676 /** 677 * 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. 678 */ 679 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 680 @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." ) 681 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-definition-type") 682 protected CodeableConcept type; 683 684 /** 685 * Detailed Precusory content type. 686 */ 687 @Child(name = "subType", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 688 @Description(shortDefinition="Detailed Content Type Definition", formalDefinition="Detailed Precusory content type." ) 689 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-definition-subtype") 690 protected CodeableConcept subType; 691 692 /** 693 * The individual or organization that published the Contract precursor content. 694 */ 695 @Child(name = "publisher", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=3, min=0, max=1, modifier=false, summary=false) 696 @Description(shortDefinition="Publisher Entity", formalDefinition="The individual or organization that published the Contract precursor content." ) 697 protected Reference publisher; 698 699 /** 700 * The actual object that is the target of the reference (The individual or organization that published the Contract precursor content.) 701 */ 702 protected Resource publisherTarget; 703 704 /** 705 * 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. 706 */ 707 @Child(name = "publicationDate", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=false) 708 @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." ) 709 protected DateTimeType publicationDate; 710 711 /** 712 * draft | active | retired | unknown. 713 */ 714 @Child(name = "publicationStatus", type = {CodeType.class}, order=5, min=1, max=1, modifier=false, summary=false) 715 @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="draft | active | retired | unknown." ) 716 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-publicationstatus") 717 protected Enumeration<ContractPublicationStatus> publicationStatus; 718 719 /** 720 * A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content. 721 */ 722 @Child(name = "copyright", type = {MarkdownType.class}, order=6, min=0, max=1, modifier=false, summary=false) 723 @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." ) 724 protected MarkdownType copyright; 725 726 private static final long serialVersionUID = -699592864L; 727 728 /** 729 * Constructor 730 */ 731 public ContentDefinitionComponent() { 732 super(); 733 } 734 735 /** 736 * Constructor 737 */ 738 public ContentDefinitionComponent(CodeableConcept type, Enumeration<ContractPublicationStatus> publicationStatus) { 739 super(); 740 this.type = type; 741 this.publicationStatus = publicationStatus; 742 } 743 744 /** 745 * @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.) 746 */ 747 public CodeableConcept getType() { 748 if (this.type == null) 749 if (Configuration.errorOnAutoCreate()) 750 throw new Error("Attempt to auto-create ContentDefinitionComponent.type"); 751 else if (Configuration.doAutoCreate()) 752 this.type = new CodeableConcept(); // cc 753 return this.type; 754 } 755 756 public boolean hasType() { 757 return this.type != null && !this.type.isEmpty(); 758 } 759 760 /** 761 * @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.) 762 */ 763 public ContentDefinitionComponent setType(CodeableConcept value) { 764 this.type = value; 765 return this; 766 } 767 768 /** 769 * @return {@link #subType} (Detailed Precusory content type.) 770 */ 771 public CodeableConcept getSubType() { 772 if (this.subType == null) 773 if (Configuration.errorOnAutoCreate()) 774 throw new Error("Attempt to auto-create ContentDefinitionComponent.subType"); 775 else if (Configuration.doAutoCreate()) 776 this.subType = new CodeableConcept(); // cc 777 return this.subType; 778 } 779 780 public boolean hasSubType() { 781 return this.subType != null && !this.subType.isEmpty(); 782 } 783 784 /** 785 * @param value {@link #subType} (Detailed Precusory content type.) 786 */ 787 public ContentDefinitionComponent setSubType(CodeableConcept value) { 788 this.subType = value; 789 return this; 790 } 791 792 /** 793 * @return {@link #publisher} (The individual or organization that published the Contract precursor content.) 794 */ 795 public Reference getPublisher() { 796 if (this.publisher == null) 797 if (Configuration.errorOnAutoCreate()) 798 throw new Error("Attempt to auto-create ContentDefinitionComponent.publisher"); 799 else if (Configuration.doAutoCreate()) 800 this.publisher = new Reference(); // cc 801 return this.publisher; 802 } 803 804 public boolean hasPublisher() { 805 return this.publisher != null && !this.publisher.isEmpty(); 806 } 807 808 /** 809 * @param value {@link #publisher} (The individual or organization that published the Contract precursor content.) 810 */ 811 public ContentDefinitionComponent setPublisher(Reference value) { 812 this.publisher = value; 813 return this; 814 } 815 816 /** 817 * @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.) 818 */ 819 public Resource getPublisherTarget() { 820 return this.publisherTarget; 821 } 822 823 /** 824 * @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.) 825 */ 826 public ContentDefinitionComponent setPublisherTarget(Resource value) { 827 this.publisherTarget = value; 828 return this; 829 } 830 831 /** 832 * @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 833 */ 834 public DateTimeType getPublicationDateElement() { 835 if (this.publicationDate == null) 836 if (Configuration.errorOnAutoCreate()) 837 throw new Error("Attempt to auto-create ContentDefinitionComponent.publicationDate"); 838 else if (Configuration.doAutoCreate()) 839 this.publicationDate = new DateTimeType(); // bb 840 return this.publicationDate; 841 } 842 843 public boolean hasPublicationDateElement() { 844 return this.publicationDate != null && !this.publicationDate.isEmpty(); 845 } 846 847 public boolean hasPublicationDate() { 848 return this.publicationDate != null && !this.publicationDate.isEmpty(); 849 } 850 851 /** 852 * @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 853 */ 854 public ContentDefinitionComponent setPublicationDateElement(DateTimeType value) { 855 this.publicationDate = value; 856 return this; 857 } 858 859 /** 860 * @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. 861 */ 862 public Date getPublicationDate() { 863 return this.publicationDate == null ? null : this.publicationDate.getValue(); 864 } 865 866 /** 867 * @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. 868 */ 869 public ContentDefinitionComponent setPublicationDate(Date value) { 870 if (value == null) 871 this.publicationDate = null; 872 else { 873 if (this.publicationDate == null) 874 this.publicationDate = new DateTimeType(); 875 this.publicationDate.setValue(value); 876 } 877 return this; 878 } 879 880 /** 881 * @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 882 */ 883 public Enumeration<ContractPublicationStatus> getPublicationStatusElement() { 884 if (this.publicationStatus == null) 885 if (Configuration.errorOnAutoCreate()) 886 throw new Error("Attempt to auto-create ContentDefinitionComponent.publicationStatus"); 887 else if (Configuration.doAutoCreate()) 888 this.publicationStatus = new Enumeration<ContractPublicationStatus>(new ContractPublicationStatusEnumFactory()); // bb 889 return this.publicationStatus; 890 } 891 892 public boolean hasPublicationStatusElement() { 893 return this.publicationStatus != null && !this.publicationStatus.isEmpty(); 894 } 895 896 public boolean hasPublicationStatus() { 897 return this.publicationStatus != null && !this.publicationStatus.isEmpty(); 898 } 899 900 /** 901 * @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 902 */ 903 public ContentDefinitionComponent setPublicationStatusElement(Enumeration<ContractPublicationStatus> value) { 904 this.publicationStatus = value; 905 return this; 906 } 907 908 /** 909 * @return draft | active | retired | unknown. 910 */ 911 public ContractPublicationStatus getPublicationStatus() { 912 return this.publicationStatus == null ? null : this.publicationStatus.getValue(); 913 } 914 915 /** 916 * @param value draft | active | retired | unknown. 917 */ 918 public ContentDefinitionComponent setPublicationStatus(ContractPublicationStatus value) { 919 if (this.publicationStatus == null) 920 this.publicationStatus = new Enumeration<ContractPublicationStatus>(new ContractPublicationStatusEnumFactory()); 921 this.publicationStatus.setValue(value); 922 return this; 923 } 924 925 /** 926 * @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 927 */ 928 public MarkdownType getCopyrightElement() { 929 if (this.copyright == null) 930 if (Configuration.errorOnAutoCreate()) 931 throw new Error("Attempt to auto-create ContentDefinitionComponent.copyright"); 932 else if (Configuration.doAutoCreate()) 933 this.copyright = new MarkdownType(); // bb 934 return this.copyright; 935 } 936 937 public boolean hasCopyrightElement() { 938 return this.copyright != null && !this.copyright.isEmpty(); 939 } 940 941 public boolean hasCopyright() { 942 return this.copyright != null && !this.copyright.isEmpty(); 943 } 944 945 /** 946 * @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 947 */ 948 public ContentDefinitionComponent setCopyrightElement(MarkdownType value) { 949 this.copyright = value; 950 return this; 951 } 952 953 /** 954 * @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. 955 */ 956 public String getCopyright() { 957 return this.copyright == null ? null : this.copyright.getValue(); 958 } 959 960 /** 961 * @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. 962 */ 963 public ContentDefinitionComponent setCopyright(String value) { 964 if (value == null) 965 this.copyright = null; 966 else { 967 if (this.copyright == null) 968 this.copyright = new MarkdownType(); 969 this.copyright.setValue(value); 970 } 971 return this; 972 } 973 974 protected void listChildren(List<Property> children) { 975 super.listChildren(children); 976 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)); 977 children.add(new Property("subType", "CodeableConcept", "Detailed Precusory content type.", 0, 1, subType)); 978 children.add(new Property("publisher", "Reference(Practitioner|PractitionerRole|Organization)", "The individual or organization that published the Contract precursor content.", 0, 1, publisher)); 979 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)); 980 children.add(new Property("publicationStatus", "code", "draft | active | retired | unknown.", 0, 1, publicationStatus)); 981 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)); 982 } 983 984 @Override 985 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 986 switch (_hash) { 987 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); 988 case -1868521062: /*subType*/ return new Property("subType", "CodeableConcept", "Detailed Precusory content type.", 0, 1, subType); 989 case 1447404028: /*publisher*/ return new Property("publisher", "Reference(Practitioner|PractitionerRole|Organization)", "The individual or organization that published the Contract precursor content.", 0, 1, publisher); 990 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); 991 case 616500542: /*publicationStatus*/ return new Property("publicationStatus", "code", "draft | active | retired | unknown.", 0, 1, publicationStatus); 992 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); 993 default: return super.getNamedProperty(_hash, _name, _checkValid); 994 } 995 996 } 997 998 @Override 999 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1000 switch (hash) { 1001 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1002 case -1868521062: /*subType*/ return this.subType == null ? new Base[0] : new Base[] {this.subType}; // CodeableConcept 1003 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // Reference 1004 case 1470566394: /*publicationDate*/ return this.publicationDate == null ? new Base[0] : new Base[] {this.publicationDate}; // DateTimeType 1005 case 616500542: /*publicationStatus*/ return this.publicationStatus == null ? new Base[0] : new Base[] {this.publicationStatus}; // Enumeration<ContractPublicationStatus> 1006 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 1007 default: return super.getProperty(hash, name, checkValid); 1008 } 1009 1010 } 1011 1012 @Override 1013 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1014 switch (hash) { 1015 case 3575610: // type 1016 this.type = castToCodeableConcept(value); // CodeableConcept 1017 return value; 1018 case -1868521062: // subType 1019 this.subType = castToCodeableConcept(value); // CodeableConcept 1020 return value; 1021 case 1447404028: // publisher 1022 this.publisher = castToReference(value); // Reference 1023 return value; 1024 case 1470566394: // publicationDate 1025 this.publicationDate = castToDateTime(value); // DateTimeType 1026 return value; 1027 case 616500542: // publicationStatus 1028 value = new ContractPublicationStatusEnumFactory().fromType(castToCode(value)); 1029 this.publicationStatus = (Enumeration) value; // Enumeration<ContractPublicationStatus> 1030 return value; 1031 case 1522889671: // copyright 1032 this.copyright = castToMarkdown(value); // MarkdownType 1033 return value; 1034 default: return super.setProperty(hash, name, value); 1035 } 1036 1037 } 1038 1039 @Override 1040 public Base setProperty(String name, Base value) throws FHIRException { 1041 if (name.equals("type")) { 1042 this.type = castToCodeableConcept(value); // CodeableConcept 1043 } else if (name.equals("subType")) { 1044 this.subType = castToCodeableConcept(value); // CodeableConcept 1045 } else if (name.equals("publisher")) { 1046 this.publisher = castToReference(value); // Reference 1047 } else if (name.equals("publicationDate")) { 1048 this.publicationDate = castToDateTime(value); // DateTimeType 1049 } else if (name.equals("publicationStatus")) { 1050 value = new ContractPublicationStatusEnumFactory().fromType(castToCode(value)); 1051 this.publicationStatus = (Enumeration) value; // Enumeration<ContractPublicationStatus> 1052 } else if (name.equals("copyright")) { 1053 this.copyright = castToMarkdown(value); // MarkdownType 1054 } else 1055 return super.setProperty(name, value); 1056 return value; 1057 } 1058 1059 @Override 1060 public Base makeProperty(int hash, String name) throws FHIRException { 1061 switch (hash) { 1062 case 3575610: return getType(); 1063 case -1868521062: return getSubType(); 1064 case 1447404028: return getPublisher(); 1065 case 1470566394: return getPublicationDateElement(); 1066 case 616500542: return getPublicationStatusElement(); 1067 case 1522889671: return getCopyrightElement(); 1068 default: return super.makeProperty(hash, name); 1069 } 1070 1071 } 1072 1073 @Override 1074 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1075 switch (hash) { 1076 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1077 case -1868521062: /*subType*/ return new String[] {"CodeableConcept"}; 1078 case 1447404028: /*publisher*/ return new String[] {"Reference"}; 1079 case 1470566394: /*publicationDate*/ return new String[] {"dateTime"}; 1080 case 616500542: /*publicationStatus*/ return new String[] {"code"}; 1081 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 1082 default: return super.getTypesForProperty(hash, name); 1083 } 1084 1085 } 1086 1087 @Override 1088 public Base addChild(String name) throws FHIRException { 1089 if (name.equals("type")) { 1090 this.type = new CodeableConcept(); 1091 return this.type; 1092 } 1093 else if (name.equals("subType")) { 1094 this.subType = new CodeableConcept(); 1095 return this.subType; 1096 } 1097 else if (name.equals("publisher")) { 1098 this.publisher = new Reference(); 1099 return this.publisher; 1100 } 1101 else if (name.equals("publicationDate")) { 1102 throw new FHIRException("Cannot call addChild on a primitive type Contract.publicationDate"); 1103 } 1104 else if (name.equals("publicationStatus")) { 1105 throw new FHIRException("Cannot call addChild on a primitive type Contract.publicationStatus"); 1106 } 1107 else if (name.equals("copyright")) { 1108 throw new FHIRException("Cannot call addChild on a primitive type Contract.copyright"); 1109 } 1110 else 1111 return super.addChild(name); 1112 } 1113 1114 public ContentDefinitionComponent copy() { 1115 ContentDefinitionComponent dst = new ContentDefinitionComponent(); 1116 copyValues(dst); 1117 dst.type = type == null ? null : type.copy(); 1118 dst.subType = subType == null ? null : subType.copy(); 1119 dst.publisher = publisher == null ? null : publisher.copy(); 1120 dst.publicationDate = publicationDate == null ? null : publicationDate.copy(); 1121 dst.publicationStatus = publicationStatus == null ? null : publicationStatus.copy(); 1122 dst.copyright = copyright == null ? null : copyright.copy(); 1123 return dst; 1124 } 1125 1126 @Override 1127 public boolean equalsDeep(Base other_) { 1128 if (!super.equalsDeep(other_)) 1129 return false; 1130 if (!(other_ instanceof ContentDefinitionComponent)) 1131 return false; 1132 ContentDefinitionComponent o = (ContentDefinitionComponent) other_; 1133 return compareDeep(type, o.type, true) && compareDeep(subType, o.subType, true) && compareDeep(publisher, o.publisher, true) 1134 && compareDeep(publicationDate, o.publicationDate, true) && compareDeep(publicationStatus, o.publicationStatus, true) 1135 && compareDeep(copyright, o.copyright, true); 1136 } 1137 1138 @Override 1139 public boolean equalsShallow(Base other_) { 1140 if (!super.equalsShallow(other_)) 1141 return false; 1142 if (!(other_ instanceof ContentDefinitionComponent)) 1143 return false; 1144 ContentDefinitionComponent o = (ContentDefinitionComponent) other_; 1145 return compareValues(publicationDate, o.publicationDate, true) && compareValues(publicationStatus, o.publicationStatus, true) 1146 && compareValues(copyright, o.copyright, true); 1147 } 1148 1149 public boolean isEmpty() { 1150 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, subType, publisher 1151 , publicationDate, publicationStatus, copyright); 1152 } 1153 1154 public String fhirType() { 1155 return "Contract.contentDefinition"; 1156 1157 } 1158 1159 } 1160 1161 @Block() 1162 public static class TermComponent extends BackboneElement implements IBaseBackboneElement { 1163 /** 1164 * Unique identifier for this particular Contract Provision. 1165 */ 1166 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) 1167 @Description(shortDefinition="Contract Term Number", formalDefinition="Unique identifier for this particular Contract Provision." ) 1168 protected Identifier identifier; 1169 1170 /** 1171 * When this Contract Provision was issued. 1172 */ 1173 @Child(name = "issued", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) 1174 @Description(shortDefinition="Contract Term Issue Date Time", formalDefinition="When this Contract Provision was issued." ) 1175 protected DateTimeType issued; 1176 1177 /** 1178 * Relevant time or time-period when this Contract Provision is applicable. 1179 */ 1180 @Child(name = "applies", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=true) 1181 @Description(shortDefinition="Contract Term Effective Time", formalDefinition="Relevant time or time-period when this Contract Provision is applicable." ) 1182 protected Period applies; 1183 1184 /** 1185 * The entity that the term applies to. 1186 */ 1187 @Child(name = "topic", type = {CodeableConcept.class, Reference.class}, order=4, min=0, max=1, modifier=false, summary=false) 1188 @Description(shortDefinition="Term Concern", formalDefinition="The entity that the term applies to." ) 1189 protected Type topic; 1190 1191 /** 1192 * 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. 1193 */ 1194 @Child(name = "type", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) 1195 @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." ) 1196 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-term-type") 1197 protected CodeableConcept type; 1198 1199 /** 1200 * A specialized legal clause or condition based on overarching contract type. 1201 */ 1202 @Child(name = "subType", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) 1203 @Description(shortDefinition="Contract Term Type specific classification", formalDefinition="A specialized legal clause or condition based on overarching contract type." ) 1204 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-term-subtype") 1205 protected CodeableConcept subType; 1206 1207 /** 1208 * Statement of a provision in a policy or a contract. 1209 */ 1210 @Child(name = "text", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) 1211 @Description(shortDefinition="Term Statement", formalDefinition="Statement of a provision in a policy or a contract." ) 1212 protected StringType text; 1213 1214 /** 1215 * Security labels that protect the handling of information about the term and its elements, which may be specifically identified.. 1216 */ 1217 @Child(name = "securityLabel", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1218 @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.." ) 1219 protected List<SecurityLabelComponent> securityLabel; 1220 1221 /** 1222 * The matter of concern in the context of this provision of the agrement. 1223 */ 1224 @Child(name = "offer", type = {}, order=9, min=1, max=1, modifier=false, summary=false) 1225 @Description(shortDefinition="Context of the Contract term", formalDefinition="The matter of concern in the context of this provision of the agrement." ) 1226 protected ContractOfferComponent offer; 1227 1228 /** 1229 * Contract Term Asset List. 1230 */ 1231 @Child(name = "asset", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1232 @Description(shortDefinition="Contract Term Asset List", formalDefinition="Contract Term Asset List." ) 1233 protected List<ContractAssetComponent> asset; 1234 1235 /** 1236 * An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place. 1237 */ 1238 @Child(name = "action", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1239 @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." ) 1240 protected List<ActionComponent> action; 1241 1242 /** 1243 * Nested group of Contract Provisions. 1244 */ 1245 @Child(name = "group", type = {TermComponent.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1246 @Description(shortDefinition="Nested Contract Term Group", formalDefinition="Nested group of Contract Provisions." ) 1247 protected List<TermComponent> group; 1248 1249 private static final long serialVersionUID = -460907186L; 1250 1251 /** 1252 * Constructor 1253 */ 1254 public TermComponent() { 1255 super(); 1256 } 1257 1258 /** 1259 * Constructor 1260 */ 1261 public TermComponent(ContractOfferComponent offer) { 1262 super(); 1263 this.offer = offer; 1264 } 1265 1266 /** 1267 * @return {@link #identifier} (Unique identifier for this particular Contract Provision.) 1268 */ 1269 public Identifier getIdentifier() { 1270 if (this.identifier == null) 1271 if (Configuration.errorOnAutoCreate()) 1272 throw new Error("Attempt to auto-create TermComponent.identifier"); 1273 else if (Configuration.doAutoCreate()) 1274 this.identifier = new Identifier(); // cc 1275 return this.identifier; 1276 } 1277 1278 public boolean hasIdentifier() { 1279 return this.identifier != null && !this.identifier.isEmpty(); 1280 } 1281 1282 /** 1283 * @param value {@link #identifier} (Unique identifier for this particular Contract Provision.) 1284 */ 1285 public TermComponent setIdentifier(Identifier value) { 1286 this.identifier = value; 1287 return this; 1288 } 1289 1290 /** 1291 * @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 1292 */ 1293 public DateTimeType getIssuedElement() { 1294 if (this.issued == null) 1295 if (Configuration.errorOnAutoCreate()) 1296 throw new Error("Attempt to auto-create TermComponent.issued"); 1297 else if (Configuration.doAutoCreate()) 1298 this.issued = new DateTimeType(); // bb 1299 return this.issued; 1300 } 1301 1302 public boolean hasIssuedElement() { 1303 return this.issued != null && !this.issued.isEmpty(); 1304 } 1305 1306 public boolean hasIssued() { 1307 return this.issued != null && !this.issued.isEmpty(); 1308 } 1309 1310 /** 1311 * @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 1312 */ 1313 public TermComponent setIssuedElement(DateTimeType value) { 1314 this.issued = value; 1315 return this; 1316 } 1317 1318 /** 1319 * @return When this Contract Provision was issued. 1320 */ 1321 public Date getIssued() { 1322 return this.issued == null ? null : this.issued.getValue(); 1323 } 1324 1325 /** 1326 * @param value When this Contract Provision was issued. 1327 */ 1328 public TermComponent setIssued(Date value) { 1329 if (value == null) 1330 this.issued = null; 1331 else { 1332 if (this.issued == null) 1333 this.issued = new DateTimeType(); 1334 this.issued.setValue(value); 1335 } 1336 return this; 1337 } 1338 1339 /** 1340 * @return {@link #applies} (Relevant time or time-period when this Contract Provision is applicable.) 1341 */ 1342 public Period getApplies() { 1343 if (this.applies == null) 1344 if (Configuration.errorOnAutoCreate()) 1345 throw new Error("Attempt to auto-create TermComponent.applies"); 1346 else if (Configuration.doAutoCreate()) 1347 this.applies = new Period(); // cc 1348 return this.applies; 1349 } 1350 1351 public boolean hasApplies() { 1352 return this.applies != null && !this.applies.isEmpty(); 1353 } 1354 1355 /** 1356 * @param value {@link #applies} (Relevant time or time-period when this Contract Provision is applicable.) 1357 */ 1358 public TermComponent setApplies(Period value) { 1359 this.applies = value; 1360 return this; 1361 } 1362 1363 /** 1364 * @return {@link #topic} (The entity that the term applies to.) 1365 */ 1366 public Type getTopic() { 1367 return this.topic; 1368 } 1369 1370 /** 1371 * @return {@link #topic} (The entity that the term applies to.) 1372 */ 1373 public CodeableConcept getTopicCodeableConcept() throws FHIRException { 1374 if (this.topic == null) 1375 this.topic = new CodeableConcept(); 1376 if (!(this.topic instanceof CodeableConcept)) 1377 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.topic.getClass().getName()+" was encountered"); 1378 return (CodeableConcept) this.topic; 1379 } 1380 1381 public boolean hasTopicCodeableConcept() { 1382 return this != null && this.topic instanceof CodeableConcept; 1383 } 1384 1385 /** 1386 * @return {@link #topic} (The entity that the term applies to.) 1387 */ 1388 public Reference getTopicReference() throws FHIRException { 1389 if (this.topic == null) 1390 this.topic = new Reference(); 1391 if (!(this.topic instanceof Reference)) 1392 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.topic.getClass().getName()+" was encountered"); 1393 return (Reference) this.topic; 1394 } 1395 1396 public boolean hasTopicReference() { 1397 return this != null && this.topic instanceof Reference; 1398 } 1399 1400 public boolean hasTopic() { 1401 return this.topic != null && !this.topic.isEmpty(); 1402 } 1403 1404 /** 1405 * @param value {@link #topic} (The entity that the term applies to.) 1406 */ 1407 public TermComponent setTopic(Type value) { 1408 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 1409 throw new Error("Not the right type for Contract.term.topic[x]: "+value.fhirType()); 1410 this.topic = value; 1411 return this; 1412 } 1413 1414 /** 1415 * @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.) 1416 */ 1417 public CodeableConcept getType() { 1418 if (this.type == null) 1419 if (Configuration.errorOnAutoCreate()) 1420 throw new Error("Attempt to auto-create TermComponent.type"); 1421 else if (Configuration.doAutoCreate()) 1422 this.type = new CodeableConcept(); // cc 1423 return this.type; 1424 } 1425 1426 public boolean hasType() { 1427 return this.type != null && !this.type.isEmpty(); 1428 } 1429 1430 /** 1431 * @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.) 1432 */ 1433 public TermComponent setType(CodeableConcept value) { 1434 this.type = value; 1435 return this; 1436 } 1437 1438 /** 1439 * @return {@link #subType} (A specialized legal clause or condition based on overarching contract type.) 1440 */ 1441 public CodeableConcept getSubType() { 1442 if (this.subType == null) 1443 if (Configuration.errorOnAutoCreate()) 1444 throw new Error("Attempt to auto-create TermComponent.subType"); 1445 else if (Configuration.doAutoCreate()) 1446 this.subType = new CodeableConcept(); // cc 1447 return this.subType; 1448 } 1449 1450 public boolean hasSubType() { 1451 return this.subType != null && !this.subType.isEmpty(); 1452 } 1453 1454 /** 1455 * @param value {@link #subType} (A specialized legal clause or condition based on overarching contract type.) 1456 */ 1457 public TermComponent setSubType(CodeableConcept value) { 1458 this.subType = value; 1459 return this; 1460 } 1461 1462 /** 1463 * @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 1464 */ 1465 public StringType getTextElement() { 1466 if (this.text == null) 1467 if (Configuration.errorOnAutoCreate()) 1468 throw new Error("Attempt to auto-create TermComponent.text"); 1469 else if (Configuration.doAutoCreate()) 1470 this.text = new StringType(); // bb 1471 return this.text; 1472 } 1473 1474 public boolean hasTextElement() { 1475 return this.text != null && !this.text.isEmpty(); 1476 } 1477 1478 public boolean hasText() { 1479 return this.text != null && !this.text.isEmpty(); 1480 } 1481 1482 /** 1483 * @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 1484 */ 1485 public TermComponent setTextElement(StringType value) { 1486 this.text = value; 1487 return this; 1488 } 1489 1490 /** 1491 * @return Statement of a provision in a policy or a contract. 1492 */ 1493 public String getText() { 1494 return this.text == null ? null : this.text.getValue(); 1495 } 1496 1497 /** 1498 * @param value Statement of a provision in a policy or a contract. 1499 */ 1500 public TermComponent setText(String value) { 1501 if (Utilities.noString(value)) 1502 this.text = null; 1503 else { 1504 if (this.text == null) 1505 this.text = new StringType(); 1506 this.text.setValue(value); 1507 } 1508 return this; 1509 } 1510 1511 /** 1512 * @return {@link #securityLabel} (Security labels that protect the handling of information about the term and its elements, which may be specifically identified..) 1513 */ 1514 public List<SecurityLabelComponent> getSecurityLabel() { 1515 if (this.securityLabel == null) 1516 this.securityLabel = new ArrayList<SecurityLabelComponent>(); 1517 return this.securityLabel; 1518 } 1519 1520 /** 1521 * @return Returns a reference to <code>this</code> for easy method chaining 1522 */ 1523 public TermComponent setSecurityLabel(List<SecurityLabelComponent> theSecurityLabel) { 1524 this.securityLabel = theSecurityLabel; 1525 return this; 1526 } 1527 1528 public boolean hasSecurityLabel() { 1529 if (this.securityLabel == null) 1530 return false; 1531 for (SecurityLabelComponent item : this.securityLabel) 1532 if (!item.isEmpty()) 1533 return true; 1534 return false; 1535 } 1536 1537 public SecurityLabelComponent addSecurityLabel() { //3 1538 SecurityLabelComponent t = new SecurityLabelComponent(); 1539 if (this.securityLabel == null) 1540 this.securityLabel = new ArrayList<SecurityLabelComponent>(); 1541 this.securityLabel.add(t); 1542 return t; 1543 } 1544 1545 public TermComponent addSecurityLabel(SecurityLabelComponent t) { //3 1546 if (t == null) 1547 return this; 1548 if (this.securityLabel == null) 1549 this.securityLabel = new ArrayList<SecurityLabelComponent>(); 1550 this.securityLabel.add(t); 1551 return this; 1552 } 1553 1554 /** 1555 * @return The first repetition of repeating field {@link #securityLabel}, creating it if it does not already exist 1556 */ 1557 public SecurityLabelComponent getSecurityLabelFirstRep() { 1558 if (getSecurityLabel().isEmpty()) { 1559 addSecurityLabel(); 1560 } 1561 return getSecurityLabel().get(0); 1562 } 1563 1564 /** 1565 * @return {@link #offer} (The matter of concern in the context of this provision of the agrement.) 1566 */ 1567 public ContractOfferComponent getOffer() { 1568 if (this.offer == null) 1569 if (Configuration.errorOnAutoCreate()) 1570 throw new Error("Attempt to auto-create TermComponent.offer"); 1571 else if (Configuration.doAutoCreate()) 1572 this.offer = new ContractOfferComponent(); // cc 1573 return this.offer; 1574 } 1575 1576 public boolean hasOffer() { 1577 return this.offer != null && !this.offer.isEmpty(); 1578 } 1579 1580 /** 1581 * @param value {@link #offer} (The matter of concern in the context of this provision of the agrement.) 1582 */ 1583 public TermComponent setOffer(ContractOfferComponent value) { 1584 this.offer = value; 1585 return this; 1586 } 1587 1588 /** 1589 * @return {@link #asset} (Contract Term Asset List.) 1590 */ 1591 public List<ContractAssetComponent> getAsset() { 1592 if (this.asset == null) 1593 this.asset = new ArrayList<ContractAssetComponent>(); 1594 return this.asset; 1595 } 1596 1597 /** 1598 * @return Returns a reference to <code>this</code> for easy method chaining 1599 */ 1600 public TermComponent setAsset(List<ContractAssetComponent> theAsset) { 1601 this.asset = theAsset; 1602 return this; 1603 } 1604 1605 public boolean hasAsset() { 1606 if (this.asset == null) 1607 return false; 1608 for (ContractAssetComponent item : this.asset) 1609 if (!item.isEmpty()) 1610 return true; 1611 return false; 1612 } 1613 1614 public ContractAssetComponent addAsset() { //3 1615 ContractAssetComponent t = new ContractAssetComponent(); 1616 if (this.asset == null) 1617 this.asset = new ArrayList<ContractAssetComponent>(); 1618 this.asset.add(t); 1619 return t; 1620 } 1621 1622 public TermComponent addAsset(ContractAssetComponent t) { //3 1623 if (t == null) 1624 return this; 1625 if (this.asset == null) 1626 this.asset = new ArrayList<ContractAssetComponent>(); 1627 this.asset.add(t); 1628 return this; 1629 } 1630 1631 /** 1632 * @return The first repetition of repeating field {@link #asset}, creating it if it does not already exist 1633 */ 1634 public ContractAssetComponent getAssetFirstRep() { 1635 if (getAsset().isEmpty()) { 1636 addAsset(); 1637 } 1638 return getAsset().get(0); 1639 } 1640 1641 /** 1642 * @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.) 1643 */ 1644 public List<ActionComponent> getAction() { 1645 if (this.action == null) 1646 this.action = new ArrayList<ActionComponent>(); 1647 return this.action; 1648 } 1649 1650 /** 1651 * @return Returns a reference to <code>this</code> for easy method chaining 1652 */ 1653 public TermComponent setAction(List<ActionComponent> theAction) { 1654 this.action = theAction; 1655 return this; 1656 } 1657 1658 public boolean hasAction() { 1659 if (this.action == null) 1660 return false; 1661 for (ActionComponent item : this.action) 1662 if (!item.isEmpty()) 1663 return true; 1664 return false; 1665 } 1666 1667 public ActionComponent addAction() { //3 1668 ActionComponent t = new ActionComponent(); 1669 if (this.action == null) 1670 this.action = new ArrayList<ActionComponent>(); 1671 this.action.add(t); 1672 return t; 1673 } 1674 1675 public TermComponent addAction(ActionComponent t) { //3 1676 if (t == null) 1677 return this; 1678 if (this.action == null) 1679 this.action = new ArrayList<ActionComponent>(); 1680 this.action.add(t); 1681 return this; 1682 } 1683 1684 /** 1685 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 1686 */ 1687 public ActionComponent getActionFirstRep() { 1688 if (getAction().isEmpty()) { 1689 addAction(); 1690 } 1691 return getAction().get(0); 1692 } 1693 1694 /** 1695 * @return {@link #group} (Nested group of Contract Provisions.) 1696 */ 1697 public List<TermComponent> getGroup() { 1698 if (this.group == null) 1699 this.group = new ArrayList<TermComponent>(); 1700 return this.group; 1701 } 1702 1703 /** 1704 * @return Returns a reference to <code>this</code> for easy method chaining 1705 */ 1706 public TermComponent setGroup(List<TermComponent> theGroup) { 1707 this.group = theGroup; 1708 return this; 1709 } 1710 1711 public boolean hasGroup() { 1712 if (this.group == null) 1713 return false; 1714 for (TermComponent item : this.group) 1715 if (!item.isEmpty()) 1716 return true; 1717 return false; 1718 } 1719 1720 public TermComponent addGroup() { //3 1721 TermComponent t = new TermComponent(); 1722 if (this.group == null) 1723 this.group = new ArrayList<TermComponent>(); 1724 this.group.add(t); 1725 return t; 1726 } 1727 1728 public TermComponent addGroup(TermComponent t) { //3 1729 if (t == null) 1730 return this; 1731 if (this.group == null) 1732 this.group = new ArrayList<TermComponent>(); 1733 this.group.add(t); 1734 return this; 1735 } 1736 1737 /** 1738 * @return The first repetition of repeating field {@link #group}, creating it if it does not already exist 1739 */ 1740 public TermComponent getGroupFirstRep() { 1741 if (getGroup().isEmpty()) { 1742 addGroup(); 1743 } 1744 return getGroup().get(0); 1745 } 1746 1747 protected void listChildren(List<Property> children) { 1748 super.listChildren(children); 1749 children.add(new Property("identifier", "Identifier", "Unique identifier for this particular Contract Provision.", 0, 1, identifier)); 1750 children.add(new Property("issued", "dateTime", "When this Contract Provision was issued.", 0, 1, issued)); 1751 children.add(new Property("applies", "Period", "Relevant time or time-period when this Contract Provision is applicable.", 0, 1, applies)); 1752 children.add(new Property("topic[x]", "CodeableConcept|Reference(Any)", "The entity that the term applies to.", 0, 1, topic)); 1753 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)); 1754 children.add(new Property("subType", "CodeableConcept", "A specialized legal clause or condition based on overarching contract type.", 0, 1, subType)); 1755 children.add(new Property("text", "string", "Statement of a provision in a policy or a contract.", 0, 1, text)); 1756 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)); 1757 children.add(new Property("offer", "", "The matter of concern in the context of this provision of the agrement.", 0, 1, offer)); 1758 children.add(new Property("asset", "", "Contract Term Asset List.", 0, java.lang.Integer.MAX_VALUE, asset)); 1759 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)); 1760 children.add(new Property("group", "@Contract.term", "Nested group of Contract Provisions.", 0, java.lang.Integer.MAX_VALUE, group)); 1761 } 1762 1763 @Override 1764 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1765 switch (_hash) { 1766 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique identifier for this particular Contract Provision.", 0, 1, identifier); 1767 case -1179159893: /*issued*/ return new Property("issued", "dateTime", "When this Contract Provision was issued.", 0, 1, issued); 1768 case -793235316: /*applies*/ return new Property("applies", "Period", "Relevant time or time-period when this Contract Provision is applicable.", 0, 1, applies); 1769 case -957295375: /*topic[x]*/ return new Property("topic[x]", "CodeableConcept|Reference(Any)", "The entity that the term applies to.", 0, 1, topic); 1770 case 110546223: /*topic*/ return new Property("topic[x]", "CodeableConcept|Reference(Any)", "The entity that the term applies to.", 0, 1, topic); 1771 case 777778802: /*topicCodeableConcept*/ return new Property("topic[x]", "CodeableConcept|Reference(Any)", "The entity that the term applies to.", 0, 1, topic); 1772 case -343345444: /*topicReference*/ return new Property("topic[x]", "CodeableConcept|Reference(Any)", "The entity that the term applies to.", 0, 1, topic); 1773 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); 1774 case -1868521062: /*subType*/ return new Property("subType", "CodeableConcept", "A specialized legal clause or condition based on overarching contract type.", 0, 1, subType); 1775 case 3556653: /*text*/ return new Property("text", "string", "Statement of a provision in a policy or a contract.", 0, 1, text); 1776 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); 1777 case 105650780: /*offer*/ return new Property("offer", "", "The matter of concern in the context of this provision of the agrement.", 0, 1, offer); 1778 case 93121264: /*asset*/ return new Property("asset", "", "Contract Term Asset List.", 0, java.lang.Integer.MAX_VALUE, asset); 1779 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); 1780 case 98629247: /*group*/ return new Property("group", "@Contract.term", "Nested group of Contract Provisions.", 0, java.lang.Integer.MAX_VALUE, group); 1781 default: return super.getNamedProperty(_hash, _name, _checkValid); 1782 } 1783 1784 } 1785 1786 @Override 1787 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1788 switch (hash) { 1789 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 1790 case -1179159893: /*issued*/ return this.issued == null ? new Base[0] : new Base[] {this.issued}; // DateTimeType 1791 case -793235316: /*applies*/ return this.applies == null ? new Base[0] : new Base[] {this.applies}; // Period 1792 case 110546223: /*topic*/ return this.topic == null ? new Base[0] : new Base[] {this.topic}; // Type 1793 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1794 case -1868521062: /*subType*/ return this.subType == null ? new Base[0] : new Base[] {this.subType}; // CodeableConcept 1795 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 1796 case -722296940: /*securityLabel*/ return this.securityLabel == null ? new Base[0] : this.securityLabel.toArray(new Base[this.securityLabel.size()]); // SecurityLabelComponent 1797 case 105650780: /*offer*/ return this.offer == null ? new Base[0] : new Base[] {this.offer}; // ContractOfferComponent 1798 case 93121264: /*asset*/ return this.asset == null ? new Base[0] : this.asset.toArray(new Base[this.asset.size()]); // ContractAssetComponent 1799 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // ActionComponent 1800 case 98629247: /*group*/ return this.group == null ? new Base[0] : this.group.toArray(new Base[this.group.size()]); // TermComponent 1801 default: return super.getProperty(hash, name, checkValid); 1802 } 1803 1804 } 1805 1806 @Override 1807 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1808 switch (hash) { 1809 case -1618432855: // identifier 1810 this.identifier = castToIdentifier(value); // Identifier 1811 return value; 1812 case -1179159893: // issued 1813 this.issued = castToDateTime(value); // DateTimeType 1814 return value; 1815 case -793235316: // applies 1816 this.applies = castToPeriod(value); // Period 1817 return value; 1818 case 110546223: // topic 1819 this.topic = castToType(value); // Type 1820 return value; 1821 case 3575610: // type 1822 this.type = castToCodeableConcept(value); // CodeableConcept 1823 return value; 1824 case -1868521062: // subType 1825 this.subType = castToCodeableConcept(value); // CodeableConcept 1826 return value; 1827 case 3556653: // text 1828 this.text = castToString(value); // StringType 1829 return value; 1830 case -722296940: // securityLabel 1831 this.getSecurityLabel().add((SecurityLabelComponent) value); // SecurityLabelComponent 1832 return value; 1833 case 105650780: // offer 1834 this.offer = (ContractOfferComponent) value; // ContractOfferComponent 1835 return value; 1836 case 93121264: // asset 1837 this.getAsset().add((ContractAssetComponent) value); // ContractAssetComponent 1838 return value; 1839 case -1422950858: // action 1840 this.getAction().add((ActionComponent) value); // ActionComponent 1841 return value; 1842 case 98629247: // group 1843 this.getGroup().add((TermComponent) value); // TermComponent 1844 return value; 1845 default: return super.setProperty(hash, name, value); 1846 } 1847 1848 } 1849 1850 @Override 1851 public Base setProperty(String name, Base value) throws FHIRException { 1852 if (name.equals("identifier")) { 1853 this.identifier = castToIdentifier(value); // Identifier 1854 } else if (name.equals("issued")) { 1855 this.issued = castToDateTime(value); // DateTimeType 1856 } else if (name.equals("applies")) { 1857 this.applies = castToPeriod(value); // Period 1858 } else if (name.equals("topic[x]")) { 1859 this.topic = castToType(value); // Type 1860 } else if (name.equals("type")) { 1861 this.type = castToCodeableConcept(value); // CodeableConcept 1862 } else if (name.equals("subType")) { 1863 this.subType = castToCodeableConcept(value); // CodeableConcept 1864 } else if (name.equals("text")) { 1865 this.text = castToString(value); // StringType 1866 } else if (name.equals("securityLabel")) { 1867 this.getSecurityLabel().add((SecurityLabelComponent) value); 1868 } else if (name.equals("offer")) { 1869 this.offer = (ContractOfferComponent) value; // ContractOfferComponent 1870 } else if (name.equals("asset")) { 1871 this.getAsset().add((ContractAssetComponent) value); 1872 } else if (name.equals("action")) { 1873 this.getAction().add((ActionComponent) value); 1874 } else if (name.equals("group")) { 1875 this.getGroup().add((TermComponent) value); 1876 } else 1877 return super.setProperty(name, value); 1878 return value; 1879 } 1880 1881 @Override 1882 public Base makeProperty(int hash, String name) throws FHIRException { 1883 switch (hash) { 1884 case -1618432855: return getIdentifier(); 1885 case -1179159893: return getIssuedElement(); 1886 case -793235316: return getApplies(); 1887 case -957295375: return getTopic(); 1888 case 110546223: return getTopic(); 1889 case 3575610: return getType(); 1890 case -1868521062: return getSubType(); 1891 case 3556653: return getTextElement(); 1892 case -722296940: return addSecurityLabel(); 1893 case 105650780: return getOffer(); 1894 case 93121264: return addAsset(); 1895 case -1422950858: return addAction(); 1896 case 98629247: return addGroup(); 1897 default: return super.makeProperty(hash, name); 1898 } 1899 1900 } 1901 1902 @Override 1903 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1904 switch (hash) { 1905 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1906 case -1179159893: /*issued*/ return new String[] {"dateTime"}; 1907 case -793235316: /*applies*/ return new String[] {"Period"}; 1908 case 110546223: /*topic*/ return new String[] {"CodeableConcept", "Reference"}; 1909 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1910 case -1868521062: /*subType*/ return new String[] {"CodeableConcept"}; 1911 case 3556653: /*text*/ return new String[] {"string"}; 1912 case -722296940: /*securityLabel*/ return new String[] {}; 1913 case 105650780: /*offer*/ return new String[] {}; 1914 case 93121264: /*asset*/ return new String[] {}; 1915 case -1422950858: /*action*/ return new String[] {}; 1916 case 98629247: /*group*/ return new String[] {"@Contract.term"}; 1917 default: return super.getTypesForProperty(hash, name); 1918 } 1919 1920 } 1921 1922 @Override 1923 public Base addChild(String name) throws FHIRException { 1924 if (name.equals("identifier")) { 1925 this.identifier = new Identifier(); 1926 return this.identifier; 1927 } 1928 else if (name.equals("issued")) { 1929 throw new FHIRException("Cannot call addChild on a primitive type Contract.issued"); 1930 } 1931 else if (name.equals("applies")) { 1932 this.applies = new Period(); 1933 return this.applies; 1934 } 1935 else if (name.equals("topicCodeableConcept")) { 1936 this.topic = new CodeableConcept(); 1937 return this.topic; 1938 } 1939 else if (name.equals("topicReference")) { 1940 this.topic = new Reference(); 1941 return this.topic; 1942 } 1943 else if (name.equals("type")) { 1944 this.type = new CodeableConcept(); 1945 return this.type; 1946 } 1947 else if (name.equals("subType")) { 1948 this.subType = new CodeableConcept(); 1949 return this.subType; 1950 } 1951 else if (name.equals("text")) { 1952 throw new FHIRException("Cannot call addChild on a primitive type Contract.text"); 1953 } 1954 else if (name.equals("securityLabel")) { 1955 return addSecurityLabel(); 1956 } 1957 else if (name.equals("offer")) { 1958 this.offer = new ContractOfferComponent(); 1959 return this.offer; 1960 } 1961 else if (name.equals("asset")) { 1962 return addAsset(); 1963 } 1964 else if (name.equals("action")) { 1965 return addAction(); 1966 } 1967 else if (name.equals("group")) { 1968 return addGroup(); 1969 } 1970 else 1971 return super.addChild(name); 1972 } 1973 1974 public TermComponent copy() { 1975 TermComponent dst = new TermComponent(); 1976 copyValues(dst); 1977 dst.identifier = identifier == null ? null : identifier.copy(); 1978 dst.issued = issued == null ? null : issued.copy(); 1979 dst.applies = applies == null ? null : applies.copy(); 1980 dst.topic = topic == null ? null : topic.copy(); 1981 dst.type = type == null ? null : type.copy(); 1982 dst.subType = subType == null ? null : subType.copy(); 1983 dst.text = text == null ? null : text.copy(); 1984 if (securityLabel != null) { 1985 dst.securityLabel = new ArrayList<SecurityLabelComponent>(); 1986 for (SecurityLabelComponent i : securityLabel) 1987 dst.securityLabel.add(i.copy()); 1988 }; 1989 dst.offer = offer == null ? null : offer.copy(); 1990 if (asset != null) { 1991 dst.asset = new ArrayList<ContractAssetComponent>(); 1992 for (ContractAssetComponent i : asset) 1993 dst.asset.add(i.copy()); 1994 }; 1995 if (action != null) { 1996 dst.action = new ArrayList<ActionComponent>(); 1997 for (ActionComponent i : action) 1998 dst.action.add(i.copy()); 1999 }; 2000 if (group != null) { 2001 dst.group = new ArrayList<TermComponent>(); 2002 for (TermComponent i : group) 2003 dst.group.add(i.copy()); 2004 }; 2005 return dst; 2006 } 2007 2008 @Override 2009 public boolean equalsDeep(Base other_) { 2010 if (!super.equalsDeep(other_)) 2011 return false; 2012 if (!(other_ instanceof TermComponent)) 2013 return false; 2014 TermComponent o = (TermComponent) other_; 2015 return compareDeep(identifier, o.identifier, true) && compareDeep(issued, o.issued, true) && compareDeep(applies, o.applies, true) 2016 && compareDeep(topic, o.topic, true) && compareDeep(type, o.type, true) && compareDeep(subType, o.subType, true) 2017 && compareDeep(text, o.text, true) && compareDeep(securityLabel, o.securityLabel, true) && compareDeep(offer, o.offer, true) 2018 && compareDeep(asset, o.asset, true) && compareDeep(action, o.action, true) && compareDeep(group, o.group, true) 2019 ; 2020 } 2021 2022 @Override 2023 public boolean equalsShallow(Base other_) { 2024 if (!super.equalsShallow(other_)) 2025 return false; 2026 if (!(other_ instanceof TermComponent)) 2027 return false; 2028 TermComponent o = (TermComponent) other_; 2029 return compareValues(issued, o.issued, true) && compareValues(text, o.text, true); 2030 } 2031 2032 public boolean isEmpty() { 2033 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, issued, applies 2034 , topic, type, subType, text, securityLabel, offer, asset, action, group); 2035 } 2036 2037 public String fhirType() { 2038 return "Contract.term"; 2039 2040 } 2041 2042 } 2043 2044 @Block() 2045 public static class SecurityLabelComponent extends BackboneElement implements IBaseBackboneElement { 2046 /** 2047 * Number used to link this term or term element to the applicable Security Label. 2048 */ 2049 @Child(name = "number", type = {UnsignedIntType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2050 @Description(shortDefinition="Link to Security Labels", formalDefinition="Number used to link this term or term element to the applicable Security Label." ) 2051 protected List<UnsignedIntType> number; 2052 2053 /** 2054 * Security label privacy tag that species the level of confidentiality protection required for this term and/or term elements. 2055 */ 2056 @Child(name = "classification", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false) 2057 @Description(shortDefinition="Confidentiality Protection", formalDefinition="Security label privacy tag that species the level of confidentiality protection required for this term and/or term elements." ) 2058 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-security-classification") 2059 protected Coding classification; 2060 2061 /** 2062 * Security label privacy tag that species the applicable privacy and security policies governing this term and/or term elements. 2063 */ 2064 @Child(name = "category", type = {Coding.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2065 @Description(shortDefinition="Applicable Policy", formalDefinition="Security label privacy tag that species the applicable privacy and security policies governing this term and/or term elements." ) 2066 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-security-category") 2067 protected List<Coding> category; 2068 2069 /** 2070 * Security label privacy tag that species the manner in which term and/or term elements are to be protected. 2071 */ 2072 @Child(name = "control", type = {Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2073 @Description(shortDefinition="Handling Instructions", formalDefinition="Security label privacy tag that species the manner in which term and/or term elements are to be protected." ) 2074 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-security-control") 2075 protected List<Coding> control; 2076 2077 private static final long serialVersionUID = 788281758L; 2078 2079 /** 2080 * Constructor 2081 */ 2082 public SecurityLabelComponent() { 2083 super(); 2084 } 2085 2086 /** 2087 * Constructor 2088 */ 2089 public SecurityLabelComponent(Coding classification) { 2090 super(); 2091 this.classification = classification; 2092 } 2093 2094 /** 2095 * @return {@link #number} (Number used to link this term or term element to the applicable Security Label.) 2096 */ 2097 public List<UnsignedIntType> getNumber() { 2098 if (this.number == null) 2099 this.number = new ArrayList<UnsignedIntType>(); 2100 return this.number; 2101 } 2102 2103 /** 2104 * @return Returns a reference to <code>this</code> for easy method chaining 2105 */ 2106 public SecurityLabelComponent setNumber(List<UnsignedIntType> theNumber) { 2107 this.number = theNumber; 2108 return this; 2109 } 2110 2111 public boolean hasNumber() { 2112 if (this.number == null) 2113 return false; 2114 for (UnsignedIntType item : this.number) 2115 if (!item.isEmpty()) 2116 return true; 2117 return false; 2118 } 2119 2120 /** 2121 * @return {@link #number} (Number used to link this term or term element to the applicable Security Label.) 2122 */ 2123 public UnsignedIntType addNumberElement() {//2 2124 UnsignedIntType t = new UnsignedIntType(); 2125 if (this.number == null) 2126 this.number = new ArrayList<UnsignedIntType>(); 2127 this.number.add(t); 2128 return t; 2129 } 2130 2131 /** 2132 * @param value {@link #number} (Number used to link this term or term element to the applicable Security Label.) 2133 */ 2134 public SecurityLabelComponent addNumber(int value) { //1 2135 UnsignedIntType t = new UnsignedIntType(); 2136 t.setValue(value); 2137 if (this.number == null) 2138 this.number = new ArrayList<UnsignedIntType>(); 2139 this.number.add(t); 2140 return this; 2141 } 2142 2143 /** 2144 * @param value {@link #number} (Number used to link this term or term element to the applicable Security Label.) 2145 */ 2146 public boolean hasNumber(int value) { 2147 if (this.number == null) 2148 return false; 2149 for (UnsignedIntType v : this.number) 2150 if (v.getValue().equals(value)) // unsignedInt 2151 return true; 2152 return false; 2153 } 2154 2155 /** 2156 * @return {@link #classification} (Security label privacy tag that species the level of confidentiality protection required for this term and/or term elements.) 2157 */ 2158 public Coding getClassification() { 2159 if (this.classification == null) 2160 if (Configuration.errorOnAutoCreate()) 2161 throw new Error("Attempt to auto-create SecurityLabelComponent.classification"); 2162 else if (Configuration.doAutoCreate()) 2163 this.classification = new Coding(); // cc 2164 return this.classification; 2165 } 2166 2167 public boolean hasClassification() { 2168 return this.classification != null && !this.classification.isEmpty(); 2169 } 2170 2171 /** 2172 * @param value {@link #classification} (Security label privacy tag that species the level of confidentiality protection required for this term and/or term elements.) 2173 */ 2174 public SecurityLabelComponent setClassification(Coding value) { 2175 this.classification = value; 2176 return this; 2177 } 2178 2179 /** 2180 * @return {@link #category} (Security label privacy tag that species the applicable privacy and security policies governing this term and/or term elements.) 2181 */ 2182 public List<Coding> getCategory() { 2183 if (this.category == null) 2184 this.category = new ArrayList<Coding>(); 2185 return this.category; 2186 } 2187 2188 /** 2189 * @return Returns a reference to <code>this</code> for easy method chaining 2190 */ 2191 public SecurityLabelComponent setCategory(List<Coding> theCategory) { 2192 this.category = theCategory; 2193 return this; 2194 } 2195 2196 public boolean hasCategory() { 2197 if (this.category == null) 2198 return false; 2199 for (Coding item : this.category) 2200 if (!item.isEmpty()) 2201 return true; 2202 return false; 2203 } 2204 2205 public Coding addCategory() { //3 2206 Coding t = new Coding(); 2207 if (this.category == null) 2208 this.category = new ArrayList<Coding>(); 2209 this.category.add(t); 2210 return t; 2211 } 2212 2213 public SecurityLabelComponent addCategory(Coding t) { //3 2214 if (t == null) 2215 return this; 2216 if (this.category == null) 2217 this.category = new ArrayList<Coding>(); 2218 this.category.add(t); 2219 return this; 2220 } 2221 2222 /** 2223 * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist 2224 */ 2225 public Coding getCategoryFirstRep() { 2226 if (getCategory().isEmpty()) { 2227 addCategory(); 2228 } 2229 return getCategory().get(0); 2230 } 2231 2232 /** 2233 * @return {@link #control} (Security label privacy tag that species the manner in which term and/or term elements are to be protected.) 2234 */ 2235 public List<Coding> getControl() { 2236 if (this.control == null) 2237 this.control = new ArrayList<Coding>(); 2238 return this.control; 2239 } 2240 2241 /** 2242 * @return Returns a reference to <code>this</code> for easy method chaining 2243 */ 2244 public SecurityLabelComponent setControl(List<Coding> theControl) { 2245 this.control = theControl; 2246 return this; 2247 } 2248 2249 public boolean hasControl() { 2250 if (this.control == null) 2251 return false; 2252 for (Coding item : this.control) 2253 if (!item.isEmpty()) 2254 return true; 2255 return false; 2256 } 2257 2258 public Coding addControl() { //3 2259 Coding t = new Coding(); 2260 if (this.control == null) 2261 this.control = new ArrayList<Coding>(); 2262 this.control.add(t); 2263 return t; 2264 } 2265 2266 public SecurityLabelComponent addControl(Coding t) { //3 2267 if (t == null) 2268 return this; 2269 if (this.control == null) 2270 this.control = new ArrayList<Coding>(); 2271 this.control.add(t); 2272 return this; 2273 } 2274 2275 /** 2276 * @return The first repetition of repeating field {@link #control}, creating it if it does not already exist 2277 */ 2278 public Coding getControlFirstRep() { 2279 if (getControl().isEmpty()) { 2280 addControl(); 2281 } 2282 return getControl().get(0); 2283 } 2284 2285 protected void listChildren(List<Property> children) { 2286 super.listChildren(children); 2287 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)); 2288 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)); 2289 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)); 2290 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)); 2291 } 2292 2293 @Override 2294 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2295 switch (_hash) { 2296 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); 2297 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); 2298 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); 2299 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); 2300 default: return super.getNamedProperty(_hash, _name, _checkValid); 2301 } 2302 2303 } 2304 2305 @Override 2306 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2307 switch (hash) { 2308 case -1034364087: /*number*/ return this.number == null ? new Base[0] : this.number.toArray(new Base[this.number.size()]); // UnsignedIntType 2309 case 382350310: /*classification*/ return this.classification == null ? new Base[0] : new Base[] {this.classification}; // Coding 2310 case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // Coding 2311 case 951543133: /*control*/ return this.control == null ? new Base[0] : this.control.toArray(new Base[this.control.size()]); // Coding 2312 default: return super.getProperty(hash, name, checkValid); 2313 } 2314 2315 } 2316 2317 @Override 2318 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2319 switch (hash) { 2320 case -1034364087: // number 2321 this.getNumber().add(castToUnsignedInt(value)); // UnsignedIntType 2322 return value; 2323 case 382350310: // classification 2324 this.classification = castToCoding(value); // Coding 2325 return value; 2326 case 50511102: // category 2327 this.getCategory().add(castToCoding(value)); // Coding 2328 return value; 2329 case 951543133: // control 2330 this.getControl().add(castToCoding(value)); // Coding 2331 return value; 2332 default: return super.setProperty(hash, name, value); 2333 } 2334 2335 } 2336 2337 @Override 2338 public Base setProperty(String name, Base value) throws FHIRException { 2339 if (name.equals("number")) { 2340 this.getNumber().add(castToUnsignedInt(value)); 2341 } else if (name.equals("classification")) { 2342 this.classification = castToCoding(value); // Coding 2343 } else if (name.equals("category")) { 2344 this.getCategory().add(castToCoding(value)); 2345 } else if (name.equals("control")) { 2346 this.getControl().add(castToCoding(value)); 2347 } else 2348 return super.setProperty(name, value); 2349 return value; 2350 } 2351 2352 @Override 2353 public Base makeProperty(int hash, String name) throws FHIRException { 2354 switch (hash) { 2355 case -1034364087: return addNumberElement(); 2356 case 382350310: return getClassification(); 2357 case 50511102: return addCategory(); 2358 case 951543133: return addControl(); 2359 default: return super.makeProperty(hash, name); 2360 } 2361 2362 } 2363 2364 @Override 2365 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2366 switch (hash) { 2367 case -1034364087: /*number*/ return new String[] {"unsignedInt"}; 2368 case 382350310: /*classification*/ return new String[] {"Coding"}; 2369 case 50511102: /*category*/ return new String[] {"Coding"}; 2370 case 951543133: /*control*/ return new String[] {"Coding"}; 2371 default: return super.getTypesForProperty(hash, name); 2372 } 2373 2374 } 2375 2376 @Override 2377 public Base addChild(String name) throws FHIRException { 2378 if (name.equals("number")) { 2379 throw new FHIRException("Cannot call addChild on a primitive type Contract.number"); 2380 } 2381 else if (name.equals("classification")) { 2382 this.classification = new Coding(); 2383 return this.classification; 2384 } 2385 else if (name.equals("category")) { 2386 return addCategory(); 2387 } 2388 else if (name.equals("control")) { 2389 return addControl(); 2390 } 2391 else 2392 return super.addChild(name); 2393 } 2394 2395 public SecurityLabelComponent copy() { 2396 SecurityLabelComponent dst = new SecurityLabelComponent(); 2397 copyValues(dst); 2398 if (number != null) { 2399 dst.number = new ArrayList<UnsignedIntType>(); 2400 for (UnsignedIntType i : number) 2401 dst.number.add(i.copy()); 2402 }; 2403 dst.classification = classification == null ? null : classification.copy(); 2404 if (category != null) { 2405 dst.category = new ArrayList<Coding>(); 2406 for (Coding i : category) 2407 dst.category.add(i.copy()); 2408 }; 2409 if (control != null) { 2410 dst.control = new ArrayList<Coding>(); 2411 for (Coding i : control) 2412 dst.control.add(i.copy()); 2413 }; 2414 return dst; 2415 } 2416 2417 @Override 2418 public boolean equalsDeep(Base other_) { 2419 if (!super.equalsDeep(other_)) 2420 return false; 2421 if (!(other_ instanceof SecurityLabelComponent)) 2422 return false; 2423 SecurityLabelComponent o = (SecurityLabelComponent) other_; 2424 return compareDeep(number, o.number, true) && compareDeep(classification, o.classification, true) 2425 && compareDeep(category, o.category, true) && compareDeep(control, o.control, true); 2426 } 2427 2428 @Override 2429 public boolean equalsShallow(Base other_) { 2430 if (!super.equalsShallow(other_)) 2431 return false; 2432 if (!(other_ instanceof SecurityLabelComponent)) 2433 return false; 2434 SecurityLabelComponent o = (SecurityLabelComponent) other_; 2435 return compareValues(number, o.number, true); 2436 } 2437 2438 public boolean isEmpty() { 2439 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(number, classification, category 2440 , control); 2441 } 2442 2443 public String fhirType() { 2444 return "Contract.term.securityLabel"; 2445 2446 } 2447 2448 } 2449 2450 @Block() 2451 public static class ContractOfferComponent extends BackboneElement implements IBaseBackboneElement { 2452 /** 2453 * Unique identifier for this particular Contract Provision. 2454 */ 2455 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2456 @Description(shortDefinition="Offer business ID", formalDefinition="Unique identifier for this particular Contract Provision." ) 2457 protected List<Identifier> identifier; 2458 2459 /** 2460 * Offer Recipient. 2461 */ 2462 @Child(name = "party", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2463 @Description(shortDefinition="Offer Recipient", formalDefinition="Offer Recipient." ) 2464 protected List<ContractPartyComponent> party; 2465 2466 /** 2467 * 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). 2468 */ 2469 @Child(name = "topic", type = {Reference.class}, order=3, min=0, max=1, modifier=false, summary=true) 2470 @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)." ) 2471 protected Reference topic; 2472 2473 /** 2474 * 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).) 2475 */ 2476 protected Resource topicTarget; 2477 2478 /** 2479 * Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit. 2480 */ 2481 @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 2482 @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." ) 2483 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-term-type") 2484 protected CodeableConcept type; 2485 2486 /** 2487 * Type of choice made by accepting party with respect to an offer made by an offeror/ grantee. 2488 */ 2489 @Child(name = "decision", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) 2490 @Description(shortDefinition="Accepting party choice", formalDefinition="Type of choice made by accepting party with respect to an offer made by an offeror/ grantee." ) 2491 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ActConsentDirective") 2492 protected CodeableConcept decision; 2493 2494 /** 2495 * How the decision about a Contract was conveyed. 2496 */ 2497 @Child(name = "decisionMode", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2498 @Description(shortDefinition="How decision is conveyed", formalDefinition="How the decision about a Contract was conveyed." ) 2499 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-decision-mode") 2500 protected List<CodeableConcept> decisionMode; 2501 2502 /** 2503 * Response to offer text. 2504 */ 2505 @Child(name = "answer", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2506 @Description(shortDefinition="Response to offer text", formalDefinition="Response to offer text." ) 2507 protected List<AnswerComponent> answer; 2508 2509 /** 2510 * Human readable form of this Contract Offer. 2511 */ 2512 @Child(name = "text", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) 2513 @Description(shortDefinition="Human readable offer text", formalDefinition="Human readable form of this Contract Offer." ) 2514 protected StringType text; 2515 2516 /** 2517 * The id of the clause or question text of the offer in the referenced questionnaire/response. 2518 */ 2519 @Child(name = "linkId", type = {StringType.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2520 @Description(shortDefinition="Pointer to text", formalDefinition="The id of the clause or question text of the offer in the referenced questionnaire/response." ) 2521 protected List<StringType> linkId; 2522 2523 /** 2524 * Security labels that protects the offer. 2525 */ 2526 @Child(name = "securityLabelNumber", type = {UnsignedIntType.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2527 @Description(shortDefinition="Offer restriction numbers", formalDefinition="Security labels that protects the offer." ) 2528 protected List<UnsignedIntType> securityLabelNumber; 2529 2530 private static final long serialVersionUID = -395674449L; 2531 2532 /** 2533 * Constructor 2534 */ 2535 public ContractOfferComponent() { 2536 super(); 2537 } 2538 2539 /** 2540 * @return {@link #identifier} (Unique identifier for this particular Contract Provision.) 2541 */ 2542 public List<Identifier> getIdentifier() { 2543 if (this.identifier == null) 2544 this.identifier = new ArrayList<Identifier>(); 2545 return this.identifier; 2546 } 2547 2548 /** 2549 * @return Returns a reference to <code>this</code> for easy method chaining 2550 */ 2551 public ContractOfferComponent setIdentifier(List<Identifier> theIdentifier) { 2552 this.identifier = theIdentifier; 2553 return this; 2554 } 2555 2556 public boolean hasIdentifier() { 2557 if (this.identifier == null) 2558 return false; 2559 for (Identifier item : this.identifier) 2560 if (!item.isEmpty()) 2561 return true; 2562 return false; 2563 } 2564 2565 public Identifier addIdentifier() { //3 2566 Identifier t = new Identifier(); 2567 if (this.identifier == null) 2568 this.identifier = new ArrayList<Identifier>(); 2569 this.identifier.add(t); 2570 return t; 2571 } 2572 2573 public ContractOfferComponent addIdentifier(Identifier t) { //3 2574 if (t == null) 2575 return this; 2576 if (this.identifier == null) 2577 this.identifier = new ArrayList<Identifier>(); 2578 this.identifier.add(t); 2579 return this; 2580 } 2581 2582 /** 2583 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 2584 */ 2585 public Identifier getIdentifierFirstRep() { 2586 if (getIdentifier().isEmpty()) { 2587 addIdentifier(); 2588 } 2589 return getIdentifier().get(0); 2590 } 2591 2592 /** 2593 * @return {@link #party} (Offer Recipient.) 2594 */ 2595 public List<ContractPartyComponent> getParty() { 2596 if (this.party == null) 2597 this.party = new ArrayList<ContractPartyComponent>(); 2598 return this.party; 2599 } 2600 2601 /** 2602 * @return Returns a reference to <code>this</code> for easy method chaining 2603 */ 2604 public ContractOfferComponent setParty(List<ContractPartyComponent> theParty) { 2605 this.party = theParty; 2606 return this; 2607 } 2608 2609 public boolean hasParty() { 2610 if (this.party == null) 2611 return false; 2612 for (ContractPartyComponent item : this.party) 2613 if (!item.isEmpty()) 2614 return true; 2615 return false; 2616 } 2617 2618 public ContractPartyComponent addParty() { //3 2619 ContractPartyComponent t = new ContractPartyComponent(); 2620 if (this.party == null) 2621 this.party = new ArrayList<ContractPartyComponent>(); 2622 this.party.add(t); 2623 return t; 2624 } 2625 2626 public ContractOfferComponent addParty(ContractPartyComponent t) { //3 2627 if (t == null) 2628 return this; 2629 if (this.party == null) 2630 this.party = new ArrayList<ContractPartyComponent>(); 2631 this.party.add(t); 2632 return this; 2633 } 2634 2635 /** 2636 * @return The first repetition of repeating field {@link #party}, creating it if it does not already exist 2637 */ 2638 public ContractPartyComponent getPartyFirstRep() { 2639 if (getParty().isEmpty()) { 2640 addParty(); 2641 } 2642 return getParty().get(0); 2643 } 2644 2645 /** 2646 * @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).) 2647 */ 2648 public Reference getTopic() { 2649 if (this.topic == null) 2650 if (Configuration.errorOnAutoCreate()) 2651 throw new Error("Attempt to auto-create ContractOfferComponent.topic"); 2652 else if (Configuration.doAutoCreate()) 2653 this.topic = new Reference(); // cc 2654 return this.topic; 2655 } 2656 2657 public boolean hasTopic() { 2658 return this.topic != null && !this.topic.isEmpty(); 2659 } 2660 2661 /** 2662 * @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).) 2663 */ 2664 public ContractOfferComponent setTopic(Reference value) { 2665 this.topic = value; 2666 return this; 2667 } 2668 2669 /** 2670 * @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).) 2671 */ 2672 public Resource getTopicTarget() { 2673 return this.topicTarget; 2674 } 2675 2676 /** 2677 * @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).) 2678 */ 2679 public ContractOfferComponent setTopicTarget(Resource value) { 2680 this.topicTarget = value; 2681 return this; 2682 } 2683 2684 /** 2685 * @return {@link #type} (Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.) 2686 */ 2687 public CodeableConcept getType() { 2688 if (this.type == null) 2689 if (Configuration.errorOnAutoCreate()) 2690 throw new Error("Attempt to auto-create ContractOfferComponent.type"); 2691 else if (Configuration.doAutoCreate()) 2692 this.type = new CodeableConcept(); // cc 2693 return this.type; 2694 } 2695 2696 public boolean hasType() { 2697 return this.type != null && !this.type.isEmpty(); 2698 } 2699 2700 /** 2701 * @param value {@link #type} (Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.) 2702 */ 2703 public ContractOfferComponent setType(CodeableConcept value) { 2704 this.type = value; 2705 return this; 2706 } 2707 2708 /** 2709 * @return {@link #decision} (Type of choice made by accepting party with respect to an offer made by an offeror/ grantee.) 2710 */ 2711 public CodeableConcept getDecision() { 2712 if (this.decision == null) 2713 if (Configuration.errorOnAutoCreate()) 2714 throw new Error("Attempt to auto-create ContractOfferComponent.decision"); 2715 else if (Configuration.doAutoCreate()) 2716 this.decision = new CodeableConcept(); // cc 2717 return this.decision; 2718 } 2719 2720 public boolean hasDecision() { 2721 return this.decision != null && !this.decision.isEmpty(); 2722 } 2723 2724 /** 2725 * @param value {@link #decision} (Type of choice made by accepting party with respect to an offer made by an offeror/ grantee.) 2726 */ 2727 public ContractOfferComponent setDecision(CodeableConcept value) { 2728 this.decision = value; 2729 return this; 2730 } 2731 2732 /** 2733 * @return {@link #decisionMode} (How the decision about a Contract was conveyed.) 2734 */ 2735 public List<CodeableConcept> getDecisionMode() { 2736 if (this.decisionMode == null) 2737 this.decisionMode = new ArrayList<CodeableConcept>(); 2738 return this.decisionMode; 2739 } 2740 2741 /** 2742 * @return Returns a reference to <code>this</code> for easy method chaining 2743 */ 2744 public ContractOfferComponent setDecisionMode(List<CodeableConcept> theDecisionMode) { 2745 this.decisionMode = theDecisionMode; 2746 return this; 2747 } 2748 2749 public boolean hasDecisionMode() { 2750 if (this.decisionMode == null) 2751 return false; 2752 for (CodeableConcept item : this.decisionMode) 2753 if (!item.isEmpty()) 2754 return true; 2755 return false; 2756 } 2757 2758 public CodeableConcept addDecisionMode() { //3 2759 CodeableConcept t = new CodeableConcept(); 2760 if (this.decisionMode == null) 2761 this.decisionMode = new ArrayList<CodeableConcept>(); 2762 this.decisionMode.add(t); 2763 return t; 2764 } 2765 2766 public ContractOfferComponent addDecisionMode(CodeableConcept t) { //3 2767 if (t == null) 2768 return this; 2769 if (this.decisionMode == null) 2770 this.decisionMode = new ArrayList<CodeableConcept>(); 2771 this.decisionMode.add(t); 2772 return this; 2773 } 2774 2775 /** 2776 * @return The first repetition of repeating field {@link #decisionMode}, creating it if it does not already exist 2777 */ 2778 public CodeableConcept getDecisionModeFirstRep() { 2779 if (getDecisionMode().isEmpty()) { 2780 addDecisionMode(); 2781 } 2782 return getDecisionMode().get(0); 2783 } 2784 2785 /** 2786 * @return {@link #answer} (Response to offer text.) 2787 */ 2788 public List<AnswerComponent> getAnswer() { 2789 if (this.answer == null) 2790 this.answer = new ArrayList<AnswerComponent>(); 2791 return this.answer; 2792 } 2793 2794 /** 2795 * @return Returns a reference to <code>this</code> for easy method chaining 2796 */ 2797 public ContractOfferComponent setAnswer(List<AnswerComponent> theAnswer) { 2798 this.answer = theAnswer; 2799 return this; 2800 } 2801 2802 public boolean hasAnswer() { 2803 if (this.answer == null) 2804 return false; 2805 for (AnswerComponent item : this.answer) 2806 if (!item.isEmpty()) 2807 return true; 2808 return false; 2809 } 2810 2811 public AnswerComponent addAnswer() { //3 2812 AnswerComponent t = new AnswerComponent(); 2813 if (this.answer == null) 2814 this.answer = new ArrayList<AnswerComponent>(); 2815 this.answer.add(t); 2816 return t; 2817 } 2818 2819 public ContractOfferComponent addAnswer(AnswerComponent t) { //3 2820 if (t == null) 2821 return this; 2822 if (this.answer == null) 2823 this.answer = new ArrayList<AnswerComponent>(); 2824 this.answer.add(t); 2825 return this; 2826 } 2827 2828 /** 2829 * @return The first repetition of repeating field {@link #answer}, creating it if it does not already exist 2830 */ 2831 public AnswerComponent getAnswerFirstRep() { 2832 if (getAnswer().isEmpty()) { 2833 addAnswer(); 2834 } 2835 return getAnswer().get(0); 2836 } 2837 2838 /** 2839 * @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 2840 */ 2841 public StringType getTextElement() { 2842 if (this.text == null) 2843 if (Configuration.errorOnAutoCreate()) 2844 throw new Error("Attempt to auto-create ContractOfferComponent.text"); 2845 else if (Configuration.doAutoCreate()) 2846 this.text = new StringType(); // bb 2847 return this.text; 2848 } 2849 2850 public boolean hasTextElement() { 2851 return this.text != null && !this.text.isEmpty(); 2852 } 2853 2854 public boolean hasText() { 2855 return this.text != null && !this.text.isEmpty(); 2856 } 2857 2858 /** 2859 * @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 2860 */ 2861 public ContractOfferComponent setTextElement(StringType value) { 2862 this.text = value; 2863 return this; 2864 } 2865 2866 /** 2867 * @return Human readable form of this Contract Offer. 2868 */ 2869 public String getText() { 2870 return this.text == null ? null : this.text.getValue(); 2871 } 2872 2873 /** 2874 * @param value Human readable form of this Contract Offer. 2875 */ 2876 public ContractOfferComponent setText(String value) { 2877 if (Utilities.noString(value)) 2878 this.text = null; 2879 else { 2880 if (this.text == null) 2881 this.text = new StringType(); 2882 this.text.setValue(value); 2883 } 2884 return this; 2885 } 2886 2887 /** 2888 * @return {@link #linkId} (The id of the clause or question text of the offer in the referenced questionnaire/response.) 2889 */ 2890 public List<StringType> getLinkId() { 2891 if (this.linkId == null) 2892 this.linkId = new ArrayList<StringType>(); 2893 return this.linkId; 2894 } 2895 2896 /** 2897 * @return Returns a reference to <code>this</code> for easy method chaining 2898 */ 2899 public ContractOfferComponent setLinkId(List<StringType> theLinkId) { 2900 this.linkId = theLinkId; 2901 return this; 2902 } 2903 2904 public boolean hasLinkId() { 2905 if (this.linkId == null) 2906 return false; 2907 for (StringType item : this.linkId) 2908 if (!item.isEmpty()) 2909 return true; 2910 return false; 2911 } 2912 2913 /** 2914 * @return {@link #linkId} (The id of the clause or question text of the offer in the referenced questionnaire/response.) 2915 */ 2916 public StringType addLinkIdElement() {//2 2917 StringType t = new StringType(); 2918 if (this.linkId == null) 2919 this.linkId = new ArrayList<StringType>(); 2920 this.linkId.add(t); 2921 return t; 2922 } 2923 2924 /** 2925 * @param value {@link #linkId} (The id of the clause or question text of the offer in the referenced questionnaire/response.) 2926 */ 2927 public ContractOfferComponent addLinkId(String value) { //1 2928 StringType t = new StringType(); 2929 t.setValue(value); 2930 if (this.linkId == null) 2931 this.linkId = new ArrayList<StringType>(); 2932 this.linkId.add(t); 2933 return this; 2934 } 2935 2936 /** 2937 * @param value {@link #linkId} (The id of the clause or question text of the offer in the referenced questionnaire/response.) 2938 */ 2939 public boolean hasLinkId(String value) { 2940 if (this.linkId == null) 2941 return false; 2942 for (StringType v : this.linkId) 2943 if (v.getValue().equals(value)) // string 2944 return true; 2945 return false; 2946 } 2947 2948 /** 2949 * @return {@link #securityLabelNumber} (Security labels that protects the offer.) 2950 */ 2951 public List<UnsignedIntType> getSecurityLabelNumber() { 2952 if (this.securityLabelNumber == null) 2953 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 2954 return this.securityLabelNumber; 2955 } 2956 2957 /** 2958 * @return Returns a reference to <code>this</code> for easy method chaining 2959 */ 2960 public ContractOfferComponent setSecurityLabelNumber(List<UnsignedIntType> theSecurityLabelNumber) { 2961 this.securityLabelNumber = theSecurityLabelNumber; 2962 return this; 2963 } 2964 2965 public boolean hasSecurityLabelNumber() { 2966 if (this.securityLabelNumber == null) 2967 return false; 2968 for (UnsignedIntType item : this.securityLabelNumber) 2969 if (!item.isEmpty()) 2970 return true; 2971 return false; 2972 } 2973 2974 /** 2975 * @return {@link #securityLabelNumber} (Security labels that protects the offer.) 2976 */ 2977 public UnsignedIntType addSecurityLabelNumberElement() {//2 2978 UnsignedIntType t = new UnsignedIntType(); 2979 if (this.securityLabelNumber == null) 2980 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 2981 this.securityLabelNumber.add(t); 2982 return t; 2983 } 2984 2985 /** 2986 * @param value {@link #securityLabelNumber} (Security labels that protects the offer.) 2987 */ 2988 public ContractOfferComponent addSecurityLabelNumber(int value) { //1 2989 UnsignedIntType t = new UnsignedIntType(); 2990 t.setValue(value); 2991 if (this.securityLabelNumber == null) 2992 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 2993 this.securityLabelNumber.add(t); 2994 return this; 2995 } 2996 2997 /** 2998 * @param value {@link #securityLabelNumber} (Security labels that protects the offer.) 2999 */ 3000 public boolean hasSecurityLabelNumber(int value) { 3001 if (this.securityLabelNumber == null) 3002 return false; 3003 for (UnsignedIntType v : this.securityLabelNumber) 3004 if (v.getValue().equals(value)) // unsignedInt 3005 return true; 3006 return false; 3007 } 3008 3009 protected void listChildren(List<Property> children) { 3010 super.listChildren(children); 3011 children.add(new Property("identifier", "Identifier", "Unique identifier for this particular Contract Provision.", 0, java.lang.Integer.MAX_VALUE, identifier)); 3012 children.add(new Property("party", "", "Offer Recipient.", 0, java.lang.Integer.MAX_VALUE, party)); 3013 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)); 3014 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)); 3015 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)); 3016 children.add(new Property("decisionMode", "CodeableConcept", "How the decision about a Contract was conveyed.", 0, java.lang.Integer.MAX_VALUE, decisionMode)); 3017 children.add(new Property("answer", "", "Response to offer text.", 0, java.lang.Integer.MAX_VALUE, answer)); 3018 children.add(new Property("text", "string", "Human readable form of this Contract Offer.", 0, 1, text)); 3019 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)); 3020 children.add(new Property("securityLabelNumber", "unsignedInt", "Security labels that protects the offer.", 0, java.lang.Integer.MAX_VALUE, securityLabelNumber)); 3021 } 3022 3023 @Override 3024 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3025 switch (_hash) { 3026 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique identifier for this particular Contract Provision.", 0, java.lang.Integer.MAX_VALUE, identifier); 3027 case 106437350: /*party*/ return new Property("party", "", "Offer Recipient.", 0, java.lang.Integer.MAX_VALUE, party); 3028 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); 3029 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); 3030 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); 3031 case 675909535: /*decisionMode*/ return new Property("decisionMode", "CodeableConcept", "How the decision about a Contract was conveyed.", 0, java.lang.Integer.MAX_VALUE, decisionMode); 3032 case -1412808770: /*answer*/ return new Property("answer", "", "Response to offer text.", 0, java.lang.Integer.MAX_VALUE, answer); 3033 case 3556653: /*text*/ return new Property("text", "string", "Human readable form of this Contract Offer.", 0, 1, text); 3034 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); 3035 case -149460995: /*securityLabelNumber*/ return new Property("securityLabelNumber", "unsignedInt", "Security labels that protects the offer.", 0, java.lang.Integer.MAX_VALUE, securityLabelNumber); 3036 default: return super.getNamedProperty(_hash, _name, _checkValid); 3037 } 3038 3039 } 3040 3041 @Override 3042 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3043 switch (hash) { 3044 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 3045 case 106437350: /*party*/ return this.party == null ? new Base[0] : this.party.toArray(new Base[this.party.size()]); // ContractPartyComponent 3046 case 110546223: /*topic*/ return this.topic == null ? new Base[0] : new Base[] {this.topic}; // Reference 3047 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 3048 case 565719004: /*decision*/ return this.decision == null ? new Base[0] : new Base[] {this.decision}; // CodeableConcept 3049 case 675909535: /*decisionMode*/ return this.decisionMode == null ? new Base[0] : this.decisionMode.toArray(new Base[this.decisionMode.size()]); // CodeableConcept 3050 case -1412808770: /*answer*/ return this.answer == null ? new Base[0] : this.answer.toArray(new Base[this.answer.size()]); // AnswerComponent 3051 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 3052 case -1102667083: /*linkId*/ return this.linkId == null ? new Base[0] : this.linkId.toArray(new Base[this.linkId.size()]); // StringType 3053 case -149460995: /*securityLabelNumber*/ return this.securityLabelNumber == null ? new Base[0] : this.securityLabelNumber.toArray(new Base[this.securityLabelNumber.size()]); // UnsignedIntType 3054 default: return super.getProperty(hash, name, checkValid); 3055 } 3056 3057 } 3058 3059 @Override 3060 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3061 switch (hash) { 3062 case -1618432855: // identifier 3063 this.getIdentifier().add(castToIdentifier(value)); // Identifier 3064 return value; 3065 case 106437350: // party 3066 this.getParty().add((ContractPartyComponent) value); // ContractPartyComponent 3067 return value; 3068 case 110546223: // topic 3069 this.topic = castToReference(value); // Reference 3070 return value; 3071 case 3575610: // type 3072 this.type = castToCodeableConcept(value); // CodeableConcept 3073 return value; 3074 case 565719004: // decision 3075 this.decision = castToCodeableConcept(value); // CodeableConcept 3076 return value; 3077 case 675909535: // decisionMode 3078 this.getDecisionMode().add(castToCodeableConcept(value)); // CodeableConcept 3079 return value; 3080 case -1412808770: // answer 3081 this.getAnswer().add((AnswerComponent) value); // AnswerComponent 3082 return value; 3083 case 3556653: // text 3084 this.text = castToString(value); // StringType 3085 return value; 3086 case -1102667083: // linkId 3087 this.getLinkId().add(castToString(value)); // StringType 3088 return value; 3089 case -149460995: // securityLabelNumber 3090 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); // UnsignedIntType 3091 return value; 3092 default: return super.setProperty(hash, name, value); 3093 } 3094 3095 } 3096 3097 @Override 3098 public Base setProperty(String name, Base value) throws FHIRException { 3099 if (name.equals("identifier")) { 3100 this.getIdentifier().add(castToIdentifier(value)); 3101 } else if (name.equals("party")) { 3102 this.getParty().add((ContractPartyComponent) value); 3103 } else if (name.equals("topic")) { 3104 this.topic = castToReference(value); // Reference 3105 } else if (name.equals("type")) { 3106 this.type = castToCodeableConcept(value); // CodeableConcept 3107 } else if (name.equals("decision")) { 3108 this.decision = castToCodeableConcept(value); // CodeableConcept 3109 } else if (name.equals("decisionMode")) { 3110 this.getDecisionMode().add(castToCodeableConcept(value)); 3111 } else if (name.equals("answer")) { 3112 this.getAnswer().add((AnswerComponent) value); 3113 } else if (name.equals("text")) { 3114 this.text = castToString(value); // StringType 3115 } else if (name.equals("linkId")) { 3116 this.getLinkId().add(castToString(value)); 3117 } else if (name.equals("securityLabelNumber")) { 3118 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); 3119 } else 3120 return super.setProperty(name, value); 3121 return value; 3122 } 3123 3124 @Override 3125 public Base makeProperty(int hash, String name) throws FHIRException { 3126 switch (hash) { 3127 case -1618432855: return addIdentifier(); 3128 case 106437350: return addParty(); 3129 case 110546223: return getTopic(); 3130 case 3575610: return getType(); 3131 case 565719004: return getDecision(); 3132 case 675909535: return addDecisionMode(); 3133 case -1412808770: return addAnswer(); 3134 case 3556653: return getTextElement(); 3135 case -1102667083: return addLinkIdElement(); 3136 case -149460995: return addSecurityLabelNumberElement(); 3137 default: return super.makeProperty(hash, name); 3138 } 3139 3140 } 3141 3142 @Override 3143 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3144 switch (hash) { 3145 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 3146 case 106437350: /*party*/ return new String[] {}; 3147 case 110546223: /*topic*/ return new String[] {"Reference"}; 3148 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 3149 case 565719004: /*decision*/ return new String[] {"CodeableConcept"}; 3150 case 675909535: /*decisionMode*/ return new String[] {"CodeableConcept"}; 3151 case -1412808770: /*answer*/ return new String[] {}; 3152 case 3556653: /*text*/ return new String[] {"string"}; 3153 case -1102667083: /*linkId*/ return new String[] {"string"}; 3154 case -149460995: /*securityLabelNumber*/ return new String[] {"unsignedInt"}; 3155 default: return super.getTypesForProperty(hash, name); 3156 } 3157 3158 } 3159 3160 @Override 3161 public Base addChild(String name) throws FHIRException { 3162 if (name.equals("identifier")) { 3163 return addIdentifier(); 3164 } 3165 else if (name.equals("party")) { 3166 return addParty(); 3167 } 3168 else if (name.equals("topic")) { 3169 this.topic = new Reference(); 3170 return this.topic; 3171 } 3172 else if (name.equals("type")) { 3173 this.type = new CodeableConcept(); 3174 return this.type; 3175 } 3176 else if (name.equals("decision")) { 3177 this.decision = new CodeableConcept(); 3178 return this.decision; 3179 } 3180 else if (name.equals("decisionMode")) { 3181 return addDecisionMode(); 3182 } 3183 else if (name.equals("answer")) { 3184 return addAnswer(); 3185 } 3186 else if (name.equals("text")) { 3187 throw new FHIRException("Cannot call addChild on a primitive type Contract.text"); 3188 } 3189 else if (name.equals("linkId")) { 3190 throw new FHIRException("Cannot call addChild on a primitive type Contract.linkId"); 3191 } 3192 else if (name.equals("securityLabelNumber")) { 3193 throw new FHIRException("Cannot call addChild on a primitive type Contract.securityLabelNumber"); 3194 } 3195 else 3196 return super.addChild(name); 3197 } 3198 3199 public ContractOfferComponent copy() { 3200 ContractOfferComponent dst = new ContractOfferComponent(); 3201 copyValues(dst); 3202 if (identifier != null) { 3203 dst.identifier = new ArrayList<Identifier>(); 3204 for (Identifier i : identifier) 3205 dst.identifier.add(i.copy()); 3206 }; 3207 if (party != null) { 3208 dst.party = new ArrayList<ContractPartyComponent>(); 3209 for (ContractPartyComponent i : party) 3210 dst.party.add(i.copy()); 3211 }; 3212 dst.topic = topic == null ? null : topic.copy(); 3213 dst.type = type == null ? null : type.copy(); 3214 dst.decision = decision == null ? null : decision.copy(); 3215 if (decisionMode != null) { 3216 dst.decisionMode = new ArrayList<CodeableConcept>(); 3217 for (CodeableConcept i : decisionMode) 3218 dst.decisionMode.add(i.copy()); 3219 }; 3220 if (answer != null) { 3221 dst.answer = new ArrayList<AnswerComponent>(); 3222 for (AnswerComponent i : answer) 3223 dst.answer.add(i.copy()); 3224 }; 3225 dst.text = text == null ? null : text.copy(); 3226 if (linkId != null) { 3227 dst.linkId = new ArrayList<StringType>(); 3228 for (StringType i : linkId) 3229 dst.linkId.add(i.copy()); 3230 }; 3231 if (securityLabelNumber != null) { 3232 dst.securityLabelNumber = new ArrayList<UnsignedIntType>(); 3233 for (UnsignedIntType i : securityLabelNumber) 3234 dst.securityLabelNumber.add(i.copy()); 3235 }; 3236 return dst; 3237 } 3238 3239 @Override 3240 public boolean equalsDeep(Base other_) { 3241 if (!super.equalsDeep(other_)) 3242 return false; 3243 if (!(other_ instanceof ContractOfferComponent)) 3244 return false; 3245 ContractOfferComponent o = (ContractOfferComponent) other_; 3246 return compareDeep(identifier, o.identifier, true) && compareDeep(party, o.party, true) && compareDeep(topic, o.topic, true) 3247 && compareDeep(type, o.type, true) && compareDeep(decision, o.decision, true) && compareDeep(decisionMode, o.decisionMode, true) 3248 && compareDeep(answer, o.answer, true) && compareDeep(text, o.text, true) && compareDeep(linkId, o.linkId, true) 3249 && compareDeep(securityLabelNumber, o.securityLabelNumber, true); 3250 } 3251 3252 @Override 3253 public boolean equalsShallow(Base other_) { 3254 if (!super.equalsShallow(other_)) 3255 return false; 3256 if (!(other_ instanceof ContractOfferComponent)) 3257 return false; 3258 ContractOfferComponent o = (ContractOfferComponent) other_; 3259 return compareValues(text, o.text, true) && compareValues(linkId, o.linkId, true) && compareValues(securityLabelNumber, o.securityLabelNumber, true) 3260 ; 3261 } 3262 3263 public boolean isEmpty() { 3264 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, party, topic 3265 , type, decision, decisionMode, answer, text, linkId, securityLabelNumber); 3266 } 3267 3268 public String fhirType() { 3269 return "Contract.term.offer"; 3270 3271 } 3272 3273 } 3274 3275 @Block() 3276 public static class ContractPartyComponent extends BackboneElement implements IBaseBackboneElement { 3277 /** 3278 * Participant in the offer. 3279 */ 3280 @Child(name = "reference", type = {Patient.class, RelatedPerson.class, Practitioner.class, PractitionerRole.class, Device.class, Group.class, Organization.class}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3281 @Description(shortDefinition="Referenced entity", formalDefinition="Participant in the offer." ) 3282 protected List<Reference> reference; 3283 /** 3284 * The actual objects that are the target of the reference (Participant in the offer.) 3285 */ 3286 protected List<Resource> referenceTarget; 3287 3288 3289 /** 3290 * How the party participates in the offer. 3291 */ 3292 @Child(name = "role", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false) 3293 @Description(shortDefinition="Participant engagement type", formalDefinition="How the party participates in the offer." ) 3294 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-party-role") 3295 protected CodeableConcept role; 3296 3297 private static final long serialVersionUID = 128949255L; 3298 3299 /** 3300 * Constructor 3301 */ 3302 public ContractPartyComponent() { 3303 super(); 3304 } 3305 3306 /** 3307 * Constructor 3308 */ 3309 public ContractPartyComponent(CodeableConcept role) { 3310 super(); 3311 this.role = role; 3312 } 3313 3314 /** 3315 * @return {@link #reference} (Participant in the offer.) 3316 */ 3317 public List<Reference> getReference() { 3318 if (this.reference == null) 3319 this.reference = new ArrayList<Reference>(); 3320 return this.reference; 3321 } 3322 3323 /** 3324 * @return Returns a reference to <code>this</code> for easy method chaining 3325 */ 3326 public ContractPartyComponent setReference(List<Reference> theReference) { 3327 this.reference = theReference; 3328 return this; 3329 } 3330 3331 public boolean hasReference() { 3332 if (this.reference == null) 3333 return false; 3334 for (Reference item : this.reference) 3335 if (!item.isEmpty()) 3336 return true; 3337 return false; 3338 } 3339 3340 public Reference addReference() { //3 3341 Reference t = new Reference(); 3342 if (this.reference == null) 3343 this.reference = new ArrayList<Reference>(); 3344 this.reference.add(t); 3345 return t; 3346 } 3347 3348 public ContractPartyComponent addReference(Reference t) { //3 3349 if (t == null) 3350 return this; 3351 if (this.reference == null) 3352 this.reference = new ArrayList<Reference>(); 3353 this.reference.add(t); 3354 return this; 3355 } 3356 3357 /** 3358 * @return The first repetition of repeating field {@link #reference}, creating it if it does not already exist 3359 */ 3360 public Reference getReferenceFirstRep() { 3361 if (getReference().isEmpty()) { 3362 addReference(); 3363 } 3364 return getReference().get(0); 3365 } 3366 3367 /** 3368 * @deprecated Use Reference#setResource(IBaseResource) instead 3369 */ 3370 @Deprecated 3371 public List<Resource> getReferenceTarget() { 3372 if (this.referenceTarget == null) 3373 this.referenceTarget = new ArrayList<Resource>(); 3374 return this.referenceTarget; 3375 } 3376 3377 /** 3378 * @return {@link #role} (How the party participates in the offer.) 3379 */ 3380 public CodeableConcept getRole() { 3381 if (this.role == null) 3382 if (Configuration.errorOnAutoCreate()) 3383 throw new Error("Attempt to auto-create ContractPartyComponent.role"); 3384 else if (Configuration.doAutoCreate()) 3385 this.role = new CodeableConcept(); // cc 3386 return this.role; 3387 } 3388 3389 public boolean hasRole() { 3390 return this.role != null && !this.role.isEmpty(); 3391 } 3392 3393 /** 3394 * @param value {@link #role} (How the party participates in the offer.) 3395 */ 3396 public ContractPartyComponent setRole(CodeableConcept value) { 3397 this.role = value; 3398 return this; 3399 } 3400 3401 protected void listChildren(List<Property> children) { 3402 super.listChildren(children); 3403 children.add(new Property("reference", "Reference(Patient|RelatedPerson|Practitioner|PractitionerRole|Device|Group|Organization)", "Participant in the offer.", 0, java.lang.Integer.MAX_VALUE, reference)); 3404 children.add(new Property("role", "CodeableConcept", "How the party participates in the offer.", 0, 1, role)); 3405 } 3406 3407 @Override 3408 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3409 switch (_hash) { 3410 case -925155509: /*reference*/ return new Property("reference", "Reference(Patient|RelatedPerson|Practitioner|PractitionerRole|Device|Group|Organization)", "Participant in the offer.", 0, java.lang.Integer.MAX_VALUE, reference); 3411 case 3506294: /*role*/ return new Property("role", "CodeableConcept", "How the party participates in the offer.", 0, 1, role); 3412 default: return super.getNamedProperty(_hash, _name, _checkValid); 3413 } 3414 3415 } 3416 3417 @Override 3418 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3419 switch (hash) { 3420 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : this.reference.toArray(new Base[this.reference.size()]); // Reference 3421 case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept 3422 default: return super.getProperty(hash, name, checkValid); 3423 } 3424 3425 } 3426 3427 @Override 3428 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3429 switch (hash) { 3430 case -925155509: // reference 3431 this.getReference().add(castToReference(value)); // Reference 3432 return value; 3433 case 3506294: // role 3434 this.role = castToCodeableConcept(value); // CodeableConcept 3435 return value; 3436 default: return super.setProperty(hash, name, value); 3437 } 3438 3439 } 3440 3441 @Override 3442 public Base setProperty(String name, Base value) throws FHIRException { 3443 if (name.equals("reference")) { 3444 this.getReference().add(castToReference(value)); 3445 } else if (name.equals("role")) { 3446 this.role = castToCodeableConcept(value); // CodeableConcept 3447 } else 3448 return super.setProperty(name, value); 3449 return value; 3450 } 3451 3452 @Override 3453 public Base makeProperty(int hash, String name) throws FHIRException { 3454 switch (hash) { 3455 case -925155509: return addReference(); 3456 case 3506294: return getRole(); 3457 default: return super.makeProperty(hash, name); 3458 } 3459 3460 } 3461 3462 @Override 3463 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3464 switch (hash) { 3465 case -925155509: /*reference*/ return new String[] {"Reference"}; 3466 case 3506294: /*role*/ return new String[] {"CodeableConcept"}; 3467 default: return super.getTypesForProperty(hash, name); 3468 } 3469 3470 } 3471 3472 @Override 3473 public Base addChild(String name) throws FHIRException { 3474 if (name.equals("reference")) { 3475 return addReference(); 3476 } 3477 else if (name.equals("role")) { 3478 this.role = new CodeableConcept(); 3479 return this.role; 3480 } 3481 else 3482 return super.addChild(name); 3483 } 3484 3485 public ContractPartyComponent copy() { 3486 ContractPartyComponent dst = new ContractPartyComponent(); 3487 copyValues(dst); 3488 if (reference != null) { 3489 dst.reference = new ArrayList<Reference>(); 3490 for (Reference i : reference) 3491 dst.reference.add(i.copy()); 3492 }; 3493 dst.role = role == null ? null : role.copy(); 3494 return dst; 3495 } 3496 3497 @Override 3498 public boolean equalsDeep(Base other_) { 3499 if (!super.equalsDeep(other_)) 3500 return false; 3501 if (!(other_ instanceof ContractPartyComponent)) 3502 return false; 3503 ContractPartyComponent o = (ContractPartyComponent) other_; 3504 return compareDeep(reference, o.reference, true) && compareDeep(role, o.role, true); 3505 } 3506 3507 @Override 3508 public boolean equalsShallow(Base other_) { 3509 if (!super.equalsShallow(other_)) 3510 return false; 3511 if (!(other_ instanceof ContractPartyComponent)) 3512 return false; 3513 ContractPartyComponent o = (ContractPartyComponent) other_; 3514 return true; 3515 } 3516 3517 public boolean isEmpty() { 3518 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(reference, role); 3519 } 3520 3521 public String fhirType() { 3522 return "Contract.term.offer.party"; 3523 3524 } 3525 3526 } 3527 3528 @Block() 3529 public static class AnswerComponent extends BackboneElement implements IBaseBackboneElement { 3530 /** 3531 * 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. 3532 */ 3533 @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) 3534 @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." ) 3535 protected Type value; 3536 3537 private static final long serialVersionUID = -732981989L; 3538 3539 /** 3540 * Constructor 3541 */ 3542 public AnswerComponent() { 3543 super(); 3544 } 3545 3546 /** 3547 * Constructor 3548 */ 3549 public AnswerComponent(Type value) { 3550 super(); 3551 this.value = value; 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 Type getValue() { 3558 return this.value; 3559 } 3560 3561 /** 3562 * @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.) 3563 */ 3564 public BooleanType getValueBooleanType() throws FHIRException { 3565 if (this.value == null) 3566 this.value = new BooleanType(); 3567 if (!(this.value instanceof BooleanType)) 3568 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 3569 return (BooleanType) this.value; 3570 } 3571 3572 public boolean hasValueBooleanType() { 3573 return this != null && this.value instanceof BooleanType; 3574 } 3575 3576 /** 3577 * @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.) 3578 */ 3579 public DecimalType getValueDecimalType() throws FHIRException { 3580 if (this.value == null) 3581 this.value = new DecimalType(); 3582 if (!(this.value instanceof DecimalType)) 3583 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered"); 3584 return (DecimalType) this.value; 3585 } 3586 3587 public boolean hasValueDecimalType() { 3588 return this != null && this.value instanceof DecimalType; 3589 } 3590 3591 /** 3592 * @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.) 3593 */ 3594 public IntegerType getValueIntegerType() throws FHIRException { 3595 if (this.value == null) 3596 this.value = new IntegerType(); 3597 if (!(this.value instanceof IntegerType)) 3598 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); 3599 return (IntegerType) this.value; 3600 } 3601 3602 public boolean hasValueIntegerType() { 3603 return this != null && this.value instanceof IntegerType; 3604 } 3605 3606 /** 3607 * @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.) 3608 */ 3609 public DateType getValueDateType() throws FHIRException { 3610 if (this.value == null) 3611 this.value = new DateType(); 3612 if (!(this.value instanceof DateType)) 3613 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered"); 3614 return (DateType) this.value; 3615 } 3616 3617 public boolean hasValueDateType() { 3618 return this != null && this.value instanceof DateType; 3619 } 3620 3621 /** 3622 * @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.) 3623 */ 3624 public DateTimeType getValueDateTimeType() throws FHIRException { 3625 if (this.value == null) 3626 this.value = new DateTimeType(); 3627 if (!(this.value instanceof DateTimeType)) 3628 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 3629 return (DateTimeType) this.value; 3630 } 3631 3632 public boolean hasValueDateTimeType() { 3633 return this != null && this.value instanceof DateTimeType; 3634 } 3635 3636 /** 3637 * @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.) 3638 */ 3639 public TimeType getValueTimeType() throws FHIRException { 3640 if (this.value == null) 3641 this.value = new TimeType(); 3642 if (!(this.value instanceof TimeType)) 3643 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 3644 return (TimeType) this.value; 3645 } 3646 3647 public boolean hasValueTimeType() { 3648 return this != null && this.value instanceof TimeType; 3649 } 3650 3651 /** 3652 * @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.) 3653 */ 3654 public StringType getValueStringType() throws FHIRException { 3655 if (this.value == null) 3656 this.value = new StringType(); 3657 if (!(this.value instanceof StringType)) 3658 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); 3659 return (StringType) this.value; 3660 } 3661 3662 public boolean hasValueStringType() { 3663 return this != null && this.value instanceof StringType; 3664 } 3665 3666 /** 3667 * @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.) 3668 */ 3669 public UriType getValueUriType() throws FHIRException { 3670 if (this.value == null) 3671 this.value = new UriType(); 3672 if (!(this.value instanceof UriType)) 3673 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered"); 3674 return (UriType) this.value; 3675 } 3676 3677 public boolean hasValueUriType() { 3678 return this != null && this.value instanceof UriType; 3679 } 3680 3681 /** 3682 * @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.) 3683 */ 3684 public Attachment getValueAttachment() throws FHIRException { 3685 if (this.value == null) 3686 this.value = new Attachment(); 3687 if (!(this.value instanceof Attachment)) 3688 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered"); 3689 return (Attachment) this.value; 3690 } 3691 3692 public boolean hasValueAttachment() { 3693 return this != null && this.value instanceof Attachment; 3694 } 3695 3696 /** 3697 * @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.) 3698 */ 3699 public Coding getValueCoding() throws FHIRException { 3700 if (this.value == null) 3701 this.value = new Coding(); 3702 if (!(this.value instanceof Coding)) 3703 throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered"); 3704 return (Coding) this.value; 3705 } 3706 3707 public boolean hasValueCoding() { 3708 return this != null && this.value instanceof Coding; 3709 } 3710 3711 /** 3712 * @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.) 3713 */ 3714 public Quantity getValueQuantity() throws FHIRException { 3715 if (this.value == null) 3716 this.value = new Quantity(); 3717 if (!(this.value instanceof Quantity)) 3718 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 3719 return (Quantity) this.value; 3720 } 3721 3722 public boolean hasValueQuantity() { 3723 return this != null && this.value instanceof Quantity; 3724 } 3725 3726 /** 3727 * @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.) 3728 */ 3729 public Reference getValueReference() throws FHIRException { 3730 if (this.value == null) 3731 this.value = new Reference(); 3732 if (!(this.value instanceof Reference)) 3733 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered"); 3734 return (Reference) this.value; 3735 } 3736 3737 public boolean hasValueReference() { 3738 return this != null && this.value instanceof Reference; 3739 } 3740 3741 public boolean hasValue() { 3742 return this.value != null && !this.value.isEmpty(); 3743 } 3744 3745 /** 3746 * @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.) 3747 */ 3748 public AnswerComponent setValue(Type value) { 3749 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)) 3750 throw new Error("Not the right type for Contract.term.offer.answer.value[x]: "+value.fhirType()); 3751 this.value = value; 3752 return this; 3753 } 3754 3755 protected void listChildren(List<Property> children) { 3756 super.listChildren(children); 3757 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)); 3758 } 3759 3760 @Override 3761 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3762 switch (_hash) { 3763 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); 3764 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); 3765 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); 3766 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); 3767 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); 3768 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); 3769 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); 3770 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); 3771 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); 3772 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); 3773 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); 3774 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); 3775 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); 3776 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); 3777 default: return super.getNamedProperty(_hash, _name, _checkValid); 3778 } 3779 3780 } 3781 3782 @Override 3783 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3784 switch (hash) { 3785 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type 3786 default: return super.getProperty(hash, name, checkValid); 3787 } 3788 3789 } 3790 3791 @Override 3792 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3793 switch (hash) { 3794 case 111972721: // value 3795 this.value = castToType(value); // Type 3796 return value; 3797 default: return super.setProperty(hash, name, value); 3798 } 3799 3800 } 3801 3802 @Override 3803 public Base setProperty(String name, Base value) throws FHIRException { 3804 if (name.equals("value[x]")) { 3805 this.value = castToType(value); // Type 3806 } else 3807 return super.setProperty(name, value); 3808 return value; 3809 } 3810 3811 @Override 3812 public Base makeProperty(int hash, String name) throws FHIRException { 3813 switch (hash) { 3814 case -1410166417: return getValue(); 3815 case 111972721: return getValue(); 3816 default: return super.makeProperty(hash, name); 3817 } 3818 3819 } 3820 3821 @Override 3822 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3823 switch (hash) { 3824 case 111972721: /*value*/ return new String[] {"boolean", "decimal", "integer", "date", "dateTime", "time", "string", "uri", "Attachment", "Coding", "Quantity", "Reference"}; 3825 default: return super.getTypesForProperty(hash, name); 3826 } 3827 3828 } 3829 3830 @Override 3831 public Base addChild(String name) throws FHIRException { 3832 if (name.equals("valueBoolean")) { 3833 this.value = new BooleanType(); 3834 return this.value; 3835 } 3836 else if (name.equals("valueDecimal")) { 3837 this.value = new DecimalType(); 3838 return this.value; 3839 } 3840 else if (name.equals("valueInteger")) { 3841 this.value = new IntegerType(); 3842 return this.value; 3843 } 3844 else if (name.equals("valueDate")) { 3845 this.value = new DateType(); 3846 return this.value; 3847 } 3848 else if (name.equals("valueDateTime")) { 3849 this.value = new DateTimeType(); 3850 return this.value; 3851 } 3852 else if (name.equals("valueTime")) { 3853 this.value = new TimeType(); 3854 return this.value; 3855 } 3856 else if (name.equals("valueString")) { 3857 this.value = new StringType(); 3858 return this.value; 3859 } 3860 else if (name.equals("valueUri")) { 3861 this.value = new UriType(); 3862 return this.value; 3863 } 3864 else if (name.equals("valueAttachment")) { 3865 this.value = new Attachment(); 3866 return this.value; 3867 } 3868 else if (name.equals("valueCoding")) { 3869 this.value = new Coding(); 3870 return this.value; 3871 } 3872 else if (name.equals("valueQuantity")) { 3873 this.value = new Quantity(); 3874 return this.value; 3875 } 3876 else if (name.equals("valueReference")) { 3877 this.value = new Reference(); 3878 return this.value; 3879 } 3880 else 3881 return super.addChild(name); 3882 } 3883 3884 public AnswerComponent copy() { 3885 AnswerComponent dst = new AnswerComponent(); 3886 copyValues(dst); 3887 dst.value = value == null ? null : value.copy(); 3888 return dst; 3889 } 3890 3891 @Override 3892 public boolean equalsDeep(Base other_) { 3893 if (!super.equalsDeep(other_)) 3894 return false; 3895 if (!(other_ instanceof AnswerComponent)) 3896 return false; 3897 AnswerComponent o = (AnswerComponent) other_; 3898 return compareDeep(value, o.value, true); 3899 } 3900 3901 @Override 3902 public boolean equalsShallow(Base other_) { 3903 if (!super.equalsShallow(other_)) 3904 return false; 3905 if (!(other_ instanceof AnswerComponent)) 3906 return false; 3907 AnswerComponent o = (AnswerComponent) other_; 3908 return true; 3909 } 3910 3911 public boolean isEmpty() { 3912 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(value); 3913 } 3914 3915 public String fhirType() { 3916 return "Contract.term.offer.answer"; 3917 3918 } 3919 3920 } 3921 3922 @Block() 3923 public static class ContractAssetComponent extends BackboneElement implements IBaseBackboneElement { 3924 /** 3925 * Differentiates the kind of the asset . 3926 */ 3927 @Child(name = "scope", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 3928 @Description(shortDefinition="Range of asset", formalDefinition="Differentiates the kind of the asset ." ) 3929 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-assetscope") 3930 protected CodeableConcept scope; 3931 3932 /** 3933 * Target entity type about which the term may be concerned. 3934 */ 3935 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3936 @Description(shortDefinition="Asset category", formalDefinition="Target entity type about which the term may be concerned." ) 3937 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-assettype") 3938 protected List<CodeableConcept> type; 3939 3940 /** 3941 * Associated entities. 3942 */ 3943 @Child(name = "typeReference", type = {Reference.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3944 @Description(shortDefinition="Associated entities", formalDefinition="Associated entities." ) 3945 protected List<Reference> typeReference; 3946 /** 3947 * The actual objects that are the target of the reference (Associated entities.) 3948 */ 3949 protected List<Resource> typeReferenceTarget; 3950 3951 3952 /** 3953 * May be a subtype or part of an offered asset. 3954 */ 3955 @Child(name = "subtype", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3956 @Description(shortDefinition="Asset sub-category", formalDefinition="May be a subtype or part of an offered asset." ) 3957 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-assetsubtype") 3958 protected List<CodeableConcept> subtype; 3959 3960 /** 3961 * 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. 3962 */ 3963 @Child(name = "relationship", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=false) 3964 @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." ) 3965 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/consent-content-class") 3966 protected Coding relationship; 3967 3968 /** 3969 * Circumstance of the asset. 3970 */ 3971 @Child(name = "context", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3972 @Description(shortDefinition="Circumstance of the asset", formalDefinition="Circumstance of the asset." ) 3973 protected List<AssetContextComponent> context; 3974 3975 /** 3976 * Description of the quality and completeness of the asset that imay be a factor in its valuation. 3977 */ 3978 @Child(name = "condition", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) 3979 @Description(shortDefinition="Quality desctiption of asset", formalDefinition="Description of the quality and completeness of the asset that imay be a factor in its valuation." ) 3980 protected StringType condition; 3981 3982 /** 3983 * Type of Asset availability for use or ownership. 3984 */ 3985 @Child(name = "periodType", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3986 @Description(shortDefinition="Asset availability types", formalDefinition="Type of Asset availability for use or ownership." ) 3987 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/asset-availability") 3988 protected List<CodeableConcept> periodType; 3989 3990 /** 3991 * Asset relevant contractual time period. 3992 */ 3993 @Child(name = "period", type = {Period.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3994 @Description(shortDefinition="Time period of the asset", formalDefinition="Asset relevant contractual time period." ) 3995 protected List<Period> period; 3996 3997 /** 3998 * Time period of asset use. 3999 */ 4000 @Child(name = "usePeriod", type = {Period.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4001 @Description(shortDefinition="Time period", formalDefinition="Time period of asset use." ) 4002 protected List<Period> usePeriod; 4003 4004 /** 4005 * Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract. 4006 */ 4007 @Child(name = "text", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) 4008 @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." ) 4009 protected StringType text; 4010 4011 /** 4012 * Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse. 4013 */ 4014 @Child(name = "linkId", type = {StringType.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4015 @Description(shortDefinition="Pointer to asset text", formalDefinition="Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse." ) 4016 protected List<StringType> linkId; 4017 4018 /** 4019 * Response to assets. 4020 */ 4021 @Child(name = "answer", type = {AnswerComponent.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4022 @Description(shortDefinition="Response to assets", formalDefinition="Response to assets." ) 4023 protected List<AnswerComponent> answer; 4024 4025 /** 4026 * Security labels that protects the asset. 4027 */ 4028 @Child(name = "securityLabelNumber", type = {UnsignedIntType.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4029 @Description(shortDefinition="Asset restriction numbers", formalDefinition="Security labels that protects the asset." ) 4030 protected List<UnsignedIntType> securityLabelNumber; 4031 4032 /** 4033 * Contract Valued Item List. 4034 */ 4035 @Child(name = "valuedItem", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4036 @Description(shortDefinition="Contract Valued Item List", formalDefinition="Contract Valued Item List." ) 4037 protected List<ValuedItemComponent> valuedItem; 4038 4039 private static final long serialVersionUID = -1080398792L; 4040 4041 /** 4042 * Constructor 4043 */ 4044 public ContractAssetComponent() { 4045 super(); 4046 } 4047 4048 /** 4049 * @return {@link #scope} (Differentiates the kind of the asset .) 4050 */ 4051 public CodeableConcept getScope() { 4052 if (this.scope == null) 4053 if (Configuration.errorOnAutoCreate()) 4054 throw new Error("Attempt to auto-create ContractAssetComponent.scope"); 4055 else if (Configuration.doAutoCreate()) 4056 this.scope = new CodeableConcept(); // cc 4057 return this.scope; 4058 } 4059 4060 public boolean hasScope() { 4061 return this.scope != null && !this.scope.isEmpty(); 4062 } 4063 4064 /** 4065 * @param value {@link #scope} (Differentiates the kind of the asset .) 4066 */ 4067 public ContractAssetComponent setScope(CodeableConcept value) { 4068 this.scope = value; 4069 return this; 4070 } 4071 4072 /** 4073 * @return {@link #type} (Target entity type about which the term may be concerned.) 4074 */ 4075 public List<CodeableConcept> getType() { 4076 if (this.type == null) 4077 this.type = new ArrayList<CodeableConcept>(); 4078 return this.type; 4079 } 4080 4081 /** 4082 * @return Returns a reference to <code>this</code> for easy method chaining 4083 */ 4084 public ContractAssetComponent setType(List<CodeableConcept> theType) { 4085 this.type = theType; 4086 return this; 4087 } 4088 4089 public boolean hasType() { 4090 if (this.type == null) 4091 return false; 4092 for (CodeableConcept item : this.type) 4093 if (!item.isEmpty()) 4094 return true; 4095 return false; 4096 } 4097 4098 public CodeableConcept addType() { //3 4099 CodeableConcept t = new CodeableConcept(); 4100 if (this.type == null) 4101 this.type = new ArrayList<CodeableConcept>(); 4102 this.type.add(t); 4103 return t; 4104 } 4105 4106 public ContractAssetComponent addType(CodeableConcept t) { //3 4107 if (t == null) 4108 return this; 4109 if (this.type == null) 4110 this.type = new ArrayList<CodeableConcept>(); 4111 this.type.add(t); 4112 return this; 4113 } 4114 4115 /** 4116 * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist 4117 */ 4118 public CodeableConcept getTypeFirstRep() { 4119 if (getType().isEmpty()) { 4120 addType(); 4121 } 4122 return getType().get(0); 4123 } 4124 4125 /** 4126 * @return {@link #typeReference} (Associated entities.) 4127 */ 4128 public List<Reference> getTypeReference() { 4129 if (this.typeReference == null) 4130 this.typeReference = new ArrayList<Reference>(); 4131 return this.typeReference; 4132 } 4133 4134 /** 4135 * @return Returns a reference to <code>this</code> for easy method chaining 4136 */ 4137 public ContractAssetComponent setTypeReference(List<Reference> theTypeReference) { 4138 this.typeReference = theTypeReference; 4139 return this; 4140 } 4141 4142 public boolean hasTypeReference() { 4143 if (this.typeReference == null) 4144 return false; 4145 for (Reference item : this.typeReference) 4146 if (!item.isEmpty()) 4147 return true; 4148 return false; 4149 } 4150 4151 public Reference addTypeReference() { //3 4152 Reference t = new Reference(); 4153 if (this.typeReference == null) 4154 this.typeReference = new ArrayList<Reference>(); 4155 this.typeReference.add(t); 4156 return t; 4157 } 4158 4159 public ContractAssetComponent addTypeReference(Reference t) { //3 4160 if (t == null) 4161 return this; 4162 if (this.typeReference == null) 4163 this.typeReference = new ArrayList<Reference>(); 4164 this.typeReference.add(t); 4165 return this; 4166 } 4167 4168 /** 4169 * @return The first repetition of repeating field {@link #typeReference}, creating it if it does not already exist 4170 */ 4171 public Reference getTypeReferenceFirstRep() { 4172 if (getTypeReference().isEmpty()) { 4173 addTypeReference(); 4174 } 4175 return getTypeReference().get(0); 4176 } 4177 4178 /** 4179 * @deprecated Use Reference#setResource(IBaseResource) instead 4180 */ 4181 @Deprecated 4182 public List<Resource> getTypeReferenceTarget() { 4183 if (this.typeReferenceTarget == null) 4184 this.typeReferenceTarget = new ArrayList<Resource>(); 4185 return this.typeReferenceTarget; 4186 } 4187 4188 /** 4189 * @return {@link #subtype} (May be a subtype or part of an offered asset.) 4190 */ 4191 public List<CodeableConcept> getSubtype() { 4192 if (this.subtype == null) 4193 this.subtype = new ArrayList<CodeableConcept>(); 4194 return this.subtype; 4195 } 4196 4197 /** 4198 * @return Returns a reference to <code>this</code> for easy method chaining 4199 */ 4200 public ContractAssetComponent setSubtype(List<CodeableConcept> theSubtype) { 4201 this.subtype = theSubtype; 4202 return this; 4203 } 4204 4205 public boolean hasSubtype() { 4206 if (this.subtype == null) 4207 return false; 4208 for (CodeableConcept item : this.subtype) 4209 if (!item.isEmpty()) 4210 return true; 4211 return false; 4212 } 4213 4214 public CodeableConcept addSubtype() { //3 4215 CodeableConcept t = new CodeableConcept(); 4216 if (this.subtype == null) 4217 this.subtype = new ArrayList<CodeableConcept>(); 4218 this.subtype.add(t); 4219 return t; 4220 } 4221 4222 public ContractAssetComponent addSubtype(CodeableConcept t) { //3 4223 if (t == null) 4224 return this; 4225 if (this.subtype == null) 4226 this.subtype = new ArrayList<CodeableConcept>(); 4227 this.subtype.add(t); 4228 return this; 4229 } 4230 4231 /** 4232 * @return The first repetition of repeating field {@link #subtype}, creating it if it does not already exist 4233 */ 4234 public CodeableConcept getSubtypeFirstRep() { 4235 if (getSubtype().isEmpty()) { 4236 addSubtype(); 4237 } 4238 return getSubtype().get(0); 4239 } 4240 4241 /** 4242 * @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.) 4243 */ 4244 public Coding getRelationship() { 4245 if (this.relationship == null) 4246 if (Configuration.errorOnAutoCreate()) 4247 throw new Error("Attempt to auto-create ContractAssetComponent.relationship"); 4248 else if (Configuration.doAutoCreate()) 4249 this.relationship = new Coding(); // cc 4250 return this.relationship; 4251 } 4252 4253 public boolean hasRelationship() { 4254 return this.relationship != null && !this.relationship.isEmpty(); 4255 } 4256 4257 /** 4258 * @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.) 4259 */ 4260 public ContractAssetComponent setRelationship(Coding value) { 4261 this.relationship = value; 4262 return this; 4263 } 4264 4265 /** 4266 * @return {@link #context} (Circumstance of the asset.) 4267 */ 4268 public List<AssetContextComponent> getContext() { 4269 if (this.context == null) 4270 this.context = new ArrayList<AssetContextComponent>(); 4271 return this.context; 4272 } 4273 4274 /** 4275 * @return Returns a reference to <code>this</code> for easy method chaining 4276 */ 4277 public ContractAssetComponent setContext(List<AssetContextComponent> theContext) { 4278 this.context = theContext; 4279 return this; 4280 } 4281 4282 public boolean hasContext() { 4283 if (this.context == null) 4284 return false; 4285 for (AssetContextComponent item : this.context) 4286 if (!item.isEmpty()) 4287 return true; 4288 return false; 4289 } 4290 4291 public AssetContextComponent addContext() { //3 4292 AssetContextComponent t = new AssetContextComponent(); 4293 if (this.context == null) 4294 this.context = new ArrayList<AssetContextComponent>(); 4295 this.context.add(t); 4296 return t; 4297 } 4298 4299 public ContractAssetComponent addContext(AssetContextComponent t) { //3 4300 if (t == null) 4301 return this; 4302 if (this.context == null) 4303 this.context = new ArrayList<AssetContextComponent>(); 4304 this.context.add(t); 4305 return this; 4306 } 4307 4308 /** 4309 * @return The first repetition of repeating field {@link #context}, creating it if it does not already exist 4310 */ 4311 public AssetContextComponent getContextFirstRep() { 4312 if (getContext().isEmpty()) { 4313 addContext(); 4314 } 4315 return getContext().get(0); 4316 } 4317 4318 /** 4319 * @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 4320 */ 4321 public StringType getConditionElement() { 4322 if (this.condition == null) 4323 if (Configuration.errorOnAutoCreate()) 4324 throw new Error("Attempt to auto-create ContractAssetComponent.condition"); 4325 else if (Configuration.doAutoCreate()) 4326 this.condition = new StringType(); // bb 4327 return this.condition; 4328 } 4329 4330 public boolean hasConditionElement() { 4331 return this.condition != null && !this.condition.isEmpty(); 4332 } 4333 4334 public boolean hasCondition() { 4335 return this.condition != null && !this.condition.isEmpty(); 4336 } 4337 4338 /** 4339 * @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 4340 */ 4341 public ContractAssetComponent setConditionElement(StringType value) { 4342 this.condition = value; 4343 return this; 4344 } 4345 4346 /** 4347 * @return Description of the quality and completeness of the asset that imay be a factor in its valuation. 4348 */ 4349 public String getCondition() { 4350 return this.condition == null ? null : this.condition.getValue(); 4351 } 4352 4353 /** 4354 * @param value Description of the quality and completeness of the asset that imay be a factor in its valuation. 4355 */ 4356 public ContractAssetComponent setCondition(String value) { 4357 if (Utilities.noString(value)) 4358 this.condition = null; 4359 else { 4360 if (this.condition == null) 4361 this.condition = new StringType(); 4362 this.condition.setValue(value); 4363 } 4364 return this; 4365 } 4366 4367 /** 4368 * @return {@link #periodType} (Type of Asset availability for use or ownership.) 4369 */ 4370 public List<CodeableConcept> getPeriodType() { 4371 if (this.periodType == null) 4372 this.periodType = new ArrayList<CodeableConcept>(); 4373 return this.periodType; 4374 } 4375 4376 /** 4377 * @return Returns a reference to <code>this</code> for easy method chaining 4378 */ 4379 public ContractAssetComponent setPeriodType(List<CodeableConcept> thePeriodType) { 4380 this.periodType = thePeriodType; 4381 return this; 4382 } 4383 4384 public boolean hasPeriodType() { 4385 if (this.periodType == null) 4386 return false; 4387 for (CodeableConcept item : this.periodType) 4388 if (!item.isEmpty()) 4389 return true; 4390 return false; 4391 } 4392 4393 public CodeableConcept addPeriodType() { //3 4394 CodeableConcept t = new CodeableConcept(); 4395 if (this.periodType == null) 4396 this.periodType = new ArrayList<CodeableConcept>(); 4397 this.periodType.add(t); 4398 return t; 4399 } 4400 4401 public ContractAssetComponent addPeriodType(CodeableConcept t) { //3 4402 if (t == null) 4403 return this; 4404 if (this.periodType == null) 4405 this.periodType = new ArrayList<CodeableConcept>(); 4406 this.periodType.add(t); 4407 return this; 4408 } 4409 4410 /** 4411 * @return The first repetition of repeating field {@link #periodType}, creating it if it does not already exist 4412 */ 4413 public CodeableConcept getPeriodTypeFirstRep() { 4414 if (getPeriodType().isEmpty()) { 4415 addPeriodType(); 4416 } 4417 return getPeriodType().get(0); 4418 } 4419 4420 /** 4421 * @return {@link #period} (Asset relevant contractual time period.) 4422 */ 4423 public List<Period> getPeriod() { 4424 if (this.period == null) 4425 this.period = new ArrayList<Period>(); 4426 return this.period; 4427 } 4428 4429 /** 4430 * @return Returns a reference to <code>this</code> for easy method chaining 4431 */ 4432 public ContractAssetComponent setPeriod(List<Period> thePeriod) { 4433 this.period = thePeriod; 4434 return this; 4435 } 4436 4437 public boolean hasPeriod() { 4438 if (this.period == null) 4439 return false; 4440 for (Period item : this.period) 4441 if (!item.isEmpty()) 4442 return true; 4443 return false; 4444 } 4445 4446 public Period addPeriod() { //3 4447 Period t = new Period(); 4448 if (this.period == null) 4449 this.period = new ArrayList<Period>(); 4450 this.period.add(t); 4451 return t; 4452 } 4453 4454 public ContractAssetComponent addPeriod(Period t) { //3 4455 if (t == null) 4456 return this; 4457 if (this.period == null) 4458 this.period = new ArrayList<Period>(); 4459 this.period.add(t); 4460 return this; 4461 } 4462 4463 /** 4464 * @return The first repetition of repeating field {@link #period}, creating it if it does not already exist 4465 */ 4466 public Period getPeriodFirstRep() { 4467 if (getPeriod().isEmpty()) { 4468 addPeriod(); 4469 } 4470 return getPeriod().get(0); 4471 } 4472 4473 /** 4474 * @return {@link #usePeriod} (Time period of asset use.) 4475 */ 4476 public List<Period> getUsePeriod() { 4477 if (this.usePeriod == null) 4478 this.usePeriod = new ArrayList<Period>(); 4479 return this.usePeriod; 4480 } 4481 4482 /** 4483 * @return Returns a reference to <code>this</code> for easy method chaining 4484 */ 4485 public ContractAssetComponent setUsePeriod(List<Period> theUsePeriod) { 4486 this.usePeriod = theUsePeriod; 4487 return this; 4488 } 4489 4490 public boolean hasUsePeriod() { 4491 if (this.usePeriod == null) 4492 return false; 4493 for (Period item : this.usePeriod) 4494 if (!item.isEmpty()) 4495 return true; 4496 return false; 4497 } 4498 4499 public Period addUsePeriod() { //3 4500 Period t = new Period(); 4501 if (this.usePeriod == null) 4502 this.usePeriod = new ArrayList<Period>(); 4503 this.usePeriod.add(t); 4504 return t; 4505 } 4506 4507 public ContractAssetComponent addUsePeriod(Period t) { //3 4508 if (t == null) 4509 return this; 4510 if (this.usePeriod == null) 4511 this.usePeriod = new ArrayList<Period>(); 4512 this.usePeriod.add(t); 4513 return this; 4514 } 4515 4516 /** 4517 * @return The first repetition of repeating field {@link #usePeriod}, creating it if it does not already exist 4518 */ 4519 public Period getUsePeriodFirstRep() { 4520 if (getUsePeriod().isEmpty()) { 4521 addUsePeriod(); 4522 } 4523 return getUsePeriod().get(0); 4524 } 4525 4526 /** 4527 * @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 4528 */ 4529 public StringType getTextElement() { 4530 if (this.text == null) 4531 if (Configuration.errorOnAutoCreate()) 4532 throw new Error("Attempt to auto-create ContractAssetComponent.text"); 4533 else if (Configuration.doAutoCreate()) 4534 this.text = new StringType(); // bb 4535 return this.text; 4536 } 4537 4538 public boolean hasTextElement() { 4539 return this.text != null && !this.text.isEmpty(); 4540 } 4541 4542 public boolean hasText() { 4543 return this.text != null && !this.text.isEmpty(); 4544 } 4545 4546 /** 4547 * @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 4548 */ 4549 public ContractAssetComponent setTextElement(StringType value) { 4550 this.text = value; 4551 return this; 4552 } 4553 4554 /** 4555 * @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. 4556 */ 4557 public String getText() { 4558 return this.text == null ? null : this.text.getValue(); 4559 } 4560 4561 /** 4562 * @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. 4563 */ 4564 public ContractAssetComponent setText(String value) { 4565 if (Utilities.noString(value)) 4566 this.text = null; 4567 else { 4568 if (this.text == null) 4569 this.text = new StringType(); 4570 this.text.setValue(value); 4571 } 4572 return this; 4573 } 4574 4575 /** 4576 * @return {@link #linkId} (Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.) 4577 */ 4578 public List<StringType> getLinkId() { 4579 if (this.linkId == null) 4580 this.linkId = new ArrayList<StringType>(); 4581 return this.linkId; 4582 } 4583 4584 /** 4585 * @return Returns a reference to <code>this</code> for easy method chaining 4586 */ 4587 public ContractAssetComponent setLinkId(List<StringType> theLinkId) { 4588 this.linkId = theLinkId; 4589 return this; 4590 } 4591 4592 public boolean hasLinkId() { 4593 if (this.linkId == null) 4594 return false; 4595 for (StringType item : this.linkId) 4596 if (!item.isEmpty()) 4597 return true; 4598 return false; 4599 } 4600 4601 /** 4602 * @return {@link #linkId} (Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.) 4603 */ 4604 public StringType addLinkIdElement() {//2 4605 StringType t = new StringType(); 4606 if (this.linkId == null) 4607 this.linkId = new ArrayList<StringType>(); 4608 this.linkId.add(t); 4609 return t; 4610 } 4611 4612 /** 4613 * @param value {@link #linkId} (Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.) 4614 */ 4615 public ContractAssetComponent addLinkId(String value) { //1 4616 StringType t = new StringType(); 4617 t.setValue(value); 4618 if (this.linkId == null) 4619 this.linkId = new ArrayList<StringType>(); 4620 this.linkId.add(t); 4621 return this; 4622 } 4623 4624 /** 4625 * @param value {@link #linkId} (Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.) 4626 */ 4627 public boolean hasLinkId(String value) { 4628 if (this.linkId == null) 4629 return false; 4630 for (StringType v : this.linkId) 4631 if (v.getValue().equals(value)) // string 4632 return true; 4633 return false; 4634 } 4635 4636 /** 4637 * @return {@link #answer} (Response to assets.) 4638 */ 4639 public List<AnswerComponent> getAnswer() { 4640 if (this.answer == null) 4641 this.answer = new ArrayList<AnswerComponent>(); 4642 return this.answer; 4643 } 4644 4645 /** 4646 * @return Returns a reference to <code>this</code> for easy method chaining 4647 */ 4648 public ContractAssetComponent setAnswer(List<AnswerComponent> theAnswer) { 4649 this.answer = theAnswer; 4650 return this; 4651 } 4652 4653 public boolean hasAnswer() { 4654 if (this.answer == null) 4655 return false; 4656 for (AnswerComponent item : this.answer) 4657 if (!item.isEmpty()) 4658 return true; 4659 return false; 4660 } 4661 4662 public AnswerComponent addAnswer() { //3 4663 AnswerComponent t = new AnswerComponent(); 4664 if (this.answer == null) 4665 this.answer = new ArrayList<AnswerComponent>(); 4666 this.answer.add(t); 4667 return t; 4668 } 4669 4670 public ContractAssetComponent addAnswer(AnswerComponent t) { //3 4671 if (t == null) 4672 return this; 4673 if (this.answer == null) 4674 this.answer = new ArrayList<AnswerComponent>(); 4675 this.answer.add(t); 4676 return this; 4677 } 4678 4679 /** 4680 * @return The first repetition of repeating field {@link #answer}, creating it if it does not already exist 4681 */ 4682 public AnswerComponent getAnswerFirstRep() { 4683 if (getAnswer().isEmpty()) { 4684 addAnswer(); 4685 } 4686 return getAnswer().get(0); 4687 } 4688 4689 /** 4690 * @return {@link #securityLabelNumber} (Security labels that protects the asset.) 4691 */ 4692 public List<UnsignedIntType> getSecurityLabelNumber() { 4693 if (this.securityLabelNumber == null) 4694 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 4695 return this.securityLabelNumber; 4696 } 4697 4698 /** 4699 * @return Returns a reference to <code>this</code> for easy method chaining 4700 */ 4701 public ContractAssetComponent setSecurityLabelNumber(List<UnsignedIntType> theSecurityLabelNumber) { 4702 this.securityLabelNumber = theSecurityLabelNumber; 4703 return this; 4704 } 4705 4706 public boolean hasSecurityLabelNumber() { 4707 if (this.securityLabelNumber == null) 4708 return false; 4709 for (UnsignedIntType item : this.securityLabelNumber) 4710 if (!item.isEmpty()) 4711 return true; 4712 return false; 4713 } 4714 4715 /** 4716 * @return {@link #securityLabelNumber} (Security labels that protects the asset.) 4717 */ 4718 public UnsignedIntType addSecurityLabelNumberElement() {//2 4719 UnsignedIntType t = new UnsignedIntType(); 4720 if (this.securityLabelNumber == null) 4721 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 4722 this.securityLabelNumber.add(t); 4723 return t; 4724 } 4725 4726 /** 4727 * @param value {@link #securityLabelNumber} (Security labels that protects the asset.) 4728 */ 4729 public ContractAssetComponent addSecurityLabelNumber(int value) { //1 4730 UnsignedIntType t = new UnsignedIntType(); 4731 t.setValue(value); 4732 if (this.securityLabelNumber == null) 4733 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 4734 this.securityLabelNumber.add(t); 4735 return this; 4736 } 4737 4738 /** 4739 * @param value {@link #securityLabelNumber} (Security labels that protects the asset.) 4740 */ 4741 public boolean hasSecurityLabelNumber(int value) { 4742 if (this.securityLabelNumber == null) 4743 return false; 4744 for (UnsignedIntType v : this.securityLabelNumber) 4745 if (v.getValue().equals(value)) // unsignedInt 4746 return true; 4747 return false; 4748 } 4749 4750 /** 4751 * @return {@link #valuedItem} (Contract Valued Item List.) 4752 */ 4753 public List<ValuedItemComponent> getValuedItem() { 4754 if (this.valuedItem == null) 4755 this.valuedItem = new ArrayList<ValuedItemComponent>(); 4756 return this.valuedItem; 4757 } 4758 4759 /** 4760 * @return Returns a reference to <code>this</code> for easy method chaining 4761 */ 4762 public ContractAssetComponent setValuedItem(List<ValuedItemComponent> theValuedItem) { 4763 this.valuedItem = theValuedItem; 4764 return this; 4765 } 4766 4767 public boolean hasValuedItem() { 4768 if (this.valuedItem == null) 4769 return false; 4770 for (ValuedItemComponent item : this.valuedItem) 4771 if (!item.isEmpty()) 4772 return true; 4773 return false; 4774 } 4775 4776 public ValuedItemComponent addValuedItem() { //3 4777 ValuedItemComponent t = new ValuedItemComponent(); 4778 if (this.valuedItem == null) 4779 this.valuedItem = new ArrayList<ValuedItemComponent>(); 4780 this.valuedItem.add(t); 4781 return t; 4782 } 4783 4784 public ContractAssetComponent addValuedItem(ValuedItemComponent t) { //3 4785 if (t == null) 4786 return this; 4787 if (this.valuedItem == null) 4788 this.valuedItem = new ArrayList<ValuedItemComponent>(); 4789 this.valuedItem.add(t); 4790 return this; 4791 } 4792 4793 /** 4794 * @return The first repetition of repeating field {@link #valuedItem}, creating it if it does not already exist 4795 */ 4796 public ValuedItemComponent getValuedItemFirstRep() { 4797 if (getValuedItem().isEmpty()) { 4798 addValuedItem(); 4799 } 4800 return getValuedItem().get(0); 4801 } 4802 4803 protected void listChildren(List<Property> children) { 4804 super.listChildren(children); 4805 children.add(new Property("scope", "CodeableConcept", "Differentiates the kind of the asset .", 0, 1, scope)); 4806 children.add(new Property("type", "CodeableConcept", "Target entity type about which the term may be concerned.", 0, java.lang.Integer.MAX_VALUE, type)); 4807 children.add(new Property("typeReference", "Reference(Any)", "Associated entities.", 0, java.lang.Integer.MAX_VALUE, typeReference)); 4808 children.add(new Property("subtype", "CodeableConcept", "May be a subtype or part of an offered asset.", 0, java.lang.Integer.MAX_VALUE, subtype)); 4809 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)); 4810 children.add(new Property("context", "", "Circumstance of the asset.", 0, java.lang.Integer.MAX_VALUE, context)); 4811 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)); 4812 children.add(new Property("periodType", "CodeableConcept", "Type of Asset availability for use or ownership.", 0, java.lang.Integer.MAX_VALUE, periodType)); 4813 children.add(new Property("period", "Period", "Asset relevant contractual time period.", 0, java.lang.Integer.MAX_VALUE, period)); 4814 children.add(new Property("usePeriod", "Period", "Time period of asset use.", 0, java.lang.Integer.MAX_VALUE, usePeriod)); 4815 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)); 4816 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)); 4817 children.add(new Property("answer", "@Contract.term.offer.answer", "Response to assets.", 0, java.lang.Integer.MAX_VALUE, answer)); 4818 children.add(new Property("securityLabelNumber", "unsignedInt", "Security labels that protects the asset.", 0, java.lang.Integer.MAX_VALUE, securityLabelNumber)); 4819 children.add(new Property("valuedItem", "", "Contract Valued Item List.", 0, java.lang.Integer.MAX_VALUE, valuedItem)); 4820 } 4821 4822 @Override 4823 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4824 switch (_hash) { 4825 case 109264468: /*scope*/ return new Property("scope", "CodeableConcept", "Differentiates the kind of the asset .", 0, 1, scope); 4826 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); 4827 case 2074825009: /*typeReference*/ return new Property("typeReference", "Reference(Any)", "Associated entities.", 0, java.lang.Integer.MAX_VALUE, typeReference); 4828 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); 4829 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); 4830 case 951530927: /*context*/ return new Property("context", "", "Circumstance of the asset.", 0, java.lang.Integer.MAX_VALUE, context); 4831 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); 4832 case 384348315: /*periodType*/ return new Property("periodType", "CodeableConcept", "Type of Asset availability for use or ownership.", 0, java.lang.Integer.MAX_VALUE, periodType); 4833 case -991726143: /*period*/ return new Property("period", "Period", "Asset relevant contractual time period.", 0, java.lang.Integer.MAX_VALUE, period); 4834 case -628382168: /*usePeriod*/ return new Property("usePeriod", "Period", "Time period of asset use.", 0, java.lang.Integer.MAX_VALUE, usePeriod); 4835 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); 4836 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); 4837 case -1412808770: /*answer*/ return new Property("answer", "@Contract.term.offer.answer", "Response to assets.", 0, java.lang.Integer.MAX_VALUE, answer); 4838 case -149460995: /*securityLabelNumber*/ return new Property("securityLabelNumber", "unsignedInt", "Security labels that protects the asset.", 0, java.lang.Integer.MAX_VALUE, securityLabelNumber); 4839 case 2046675654: /*valuedItem*/ return new Property("valuedItem", "", "Contract Valued Item List.", 0, java.lang.Integer.MAX_VALUE, valuedItem); 4840 default: return super.getNamedProperty(_hash, _name, _checkValid); 4841 } 4842 4843 } 4844 4845 @Override 4846 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4847 switch (hash) { 4848 case 109264468: /*scope*/ return this.scope == null ? new Base[0] : new Base[] {this.scope}; // CodeableConcept 4849 case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept 4850 case 2074825009: /*typeReference*/ return this.typeReference == null ? new Base[0] : this.typeReference.toArray(new Base[this.typeReference.size()]); // Reference 4851 case -1867567750: /*subtype*/ return this.subtype == null ? new Base[0] : this.subtype.toArray(new Base[this.subtype.size()]); // CodeableConcept 4852 case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // Coding 4853 case 951530927: /*context*/ return this.context == null ? new Base[0] : this.context.toArray(new Base[this.context.size()]); // AssetContextComponent 4854 case -861311717: /*condition*/ return this.condition == null ? new Base[0] : new Base[] {this.condition}; // StringType 4855 case 384348315: /*periodType*/ return this.periodType == null ? new Base[0] : this.periodType.toArray(new Base[this.periodType.size()]); // CodeableConcept 4856 case -991726143: /*period*/ return this.period == null ? new Base[0] : this.period.toArray(new Base[this.period.size()]); // Period 4857 case -628382168: /*usePeriod*/ return this.usePeriod == null ? new Base[0] : this.usePeriod.toArray(new Base[this.usePeriod.size()]); // Period 4858 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 4859 case -1102667083: /*linkId*/ return this.linkId == null ? new Base[0] : this.linkId.toArray(new Base[this.linkId.size()]); // StringType 4860 case -1412808770: /*answer*/ return this.answer == null ? new Base[0] : this.answer.toArray(new Base[this.answer.size()]); // AnswerComponent 4861 case -149460995: /*securityLabelNumber*/ return this.securityLabelNumber == null ? new Base[0] : this.securityLabelNumber.toArray(new Base[this.securityLabelNumber.size()]); // UnsignedIntType 4862 case 2046675654: /*valuedItem*/ return this.valuedItem == null ? new Base[0] : this.valuedItem.toArray(new Base[this.valuedItem.size()]); // ValuedItemComponent 4863 default: return super.getProperty(hash, name, checkValid); 4864 } 4865 4866 } 4867 4868 @Override 4869 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4870 switch (hash) { 4871 case 109264468: // scope 4872 this.scope = castToCodeableConcept(value); // CodeableConcept 4873 return value; 4874 case 3575610: // type 4875 this.getType().add(castToCodeableConcept(value)); // CodeableConcept 4876 return value; 4877 case 2074825009: // typeReference 4878 this.getTypeReference().add(castToReference(value)); // Reference 4879 return value; 4880 case -1867567750: // subtype 4881 this.getSubtype().add(castToCodeableConcept(value)); // CodeableConcept 4882 return value; 4883 case -261851592: // relationship 4884 this.relationship = castToCoding(value); // Coding 4885 return value; 4886 case 951530927: // context 4887 this.getContext().add((AssetContextComponent) value); // AssetContextComponent 4888 return value; 4889 case -861311717: // condition 4890 this.condition = castToString(value); // StringType 4891 return value; 4892 case 384348315: // periodType 4893 this.getPeriodType().add(castToCodeableConcept(value)); // CodeableConcept 4894 return value; 4895 case -991726143: // period 4896 this.getPeriod().add(castToPeriod(value)); // Period 4897 return value; 4898 case -628382168: // usePeriod 4899 this.getUsePeriod().add(castToPeriod(value)); // Period 4900 return value; 4901 case 3556653: // text 4902 this.text = castToString(value); // StringType 4903 return value; 4904 case -1102667083: // linkId 4905 this.getLinkId().add(castToString(value)); // StringType 4906 return value; 4907 case -1412808770: // answer 4908 this.getAnswer().add((AnswerComponent) value); // AnswerComponent 4909 return value; 4910 case -149460995: // securityLabelNumber 4911 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); // UnsignedIntType 4912 return value; 4913 case 2046675654: // valuedItem 4914 this.getValuedItem().add((ValuedItemComponent) value); // ValuedItemComponent 4915 return value; 4916 default: return super.setProperty(hash, name, value); 4917 } 4918 4919 } 4920 4921 @Override 4922 public Base setProperty(String name, Base value) throws FHIRException { 4923 if (name.equals("scope")) { 4924 this.scope = castToCodeableConcept(value); // CodeableConcept 4925 } else if (name.equals("type")) { 4926 this.getType().add(castToCodeableConcept(value)); 4927 } else if (name.equals("typeReference")) { 4928 this.getTypeReference().add(castToReference(value)); 4929 } else if (name.equals("subtype")) { 4930 this.getSubtype().add(castToCodeableConcept(value)); 4931 } else if (name.equals("relationship")) { 4932 this.relationship = castToCoding(value); // Coding 4933 } else if (name.equals("context")) { 4934 this.getContext().add((AssetContextComponent) value); 4935 } else if (name.equals("condition")) { 4936 this.condition = castToString(value); // StringType 4937 } else if (name.equals("periodType")) { 4938 this.getPeriodType().add(castToCodeableConcept(value)); 4939 } else if (name.equals("period")) { 4940 this.getPeriod().add(castToPeriod(value)); 4941 } else if (name.equals("usePeriod")) { 4942 this.getUsePeriod().add(castToPeriod(value)); 4943 } else if (name.equals("text")) { 4944 this.text = castToString(value); // StringType 4945 } else if (name.equals("linkId")) { 4946 this.getLinkId().add(castToString(value)); 4947 } else if (name.equals("answer")) { 4948 this.getAnswer().add((AnswerComponent) value); 4949 } else if (name.equals("securityLabelNumber")) { 4950 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); 4951 } else if (name.equals("valuedItem")) { 4952 this.getValuedItem().add((ValuedItemComponent) value); 4953 } else 4954 return super.setProperty(name, value); 4955 return value; 4956 } 4957 4958 @Override 4959 public Base makeProperty(int hash, String name) throws FHIRException { 4960 switch (hash) { 4961 case 109264468: return getScope(); 4962 case 3575610: return addType(); 4963 case 2074825009: return addTypeReference(); 4964 case -1867567750: return addSubtype(); 4965 case -261851592: return getRelationship(); 4966 case 951530927: return addContext(); 4967 case -861311717: return getConditionElement(); 4968 case 384348315: return addPeriodType(); 4969 case -991726143: return addPeriod(); 4970 case -628382168: return addUsePeriod(); 4971 case 3556653: return getTextElement(); 4972 case -1102667083: return addLinkIdElement(); 4973 case -1412808770: return addAnswer(); 4974 case -149460995: return addSecurityLabelNumberElement(); 4975 case 2046675654: return addValuedItem(); 4976 default: return super.makeProperty(hash, name); 4977 } 4978 4979 } 4980 4981 @Override 4982 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4983 switch (hash) { 4984 case 109264468: /*scope*/ return new String[] {"CodeableConcept"}; 4985 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 4986 case 2074825009: /*typeReference*/ return new String[] {"Reference"}; 4987 case -1867567750: /*subtype*/ return new String[] {"CodeableConcept"}; 4988 case -261851592: /*relationship*/ return new String[] {"Coding"}; 4989 case 951530927: /*context*/ return new String[] {}; 4990 case -861311717: /*condition*/ return new String[] {"string"}; 4991 case 384348315: /*periodType*/ return new String[] {"CodeableConcept"}; 4992 case -991726143: /*period*/ return new String[] {"Period"}; 4993 case -628382168: /*usePeriod*/ return new String[] {"Period"}; 4994 case 3556653: /*text*/ return new String[] {"string"}; 4995 case -1102667083: /*linkId*/ return new String[] {"string"}; 4996 case -1412808770: /*answer*/ return new String[] {"@Contract.term.offer.answer"}; 4997 case -149460995: /*securityLabelNumber*/ return new String[] {"unsignedInt"}; 4998 case 2046675654: /*valuedItem*/ return new String[] {}; 4999 default: return super.getTypesForProperty(hash, name); 5000 } 5001 5002 } 5003 5004 @Override 5005 public Base addChild(String name) throws FHIRException { 5006 if (name.equals("scope")) { 5007 this.scope = new CodeableConcept(); 5008 return this.scope; 5009 } 5010 else if (name.equals("type")) { 5011 return addType(); 5012 } 5013 else if (name.equals("typeReference")) { 5014 return addTypeReference(); 5015 } 5016 else if (name.equals("subtype")) { 5017 return addSubtype(); 5018 } 5019 else if (name.equals("relationship")) { 5020 this.relationship = new Coding(); 5021 return this.relationship; 5022 } 5023 else if (name.equals("context")) { 5024 return addContext(); 5025 } 5026 else if (name.equals("condition")) { 5027 throw new FHIRException("Cannot call addChild on a primitive type Contract.condition"); 5028 } 5029 else if (name.equals("periodType")) { 5030 return addPeriodType(); 5031 } 5032 else if (name.equals("period")) { 5033 return addPeriod(); 5034 } 5035 else if (name.equals("usePeriod")) { 5036 return addUsePeriod(); 5037 } 5038 else if (name.equals("text")) { 5039 throw new FHIRException("Cannot call addChild on a primitive type Contract.text"); 5040 } 5041 else if (name.equals("linkId")) { 5042 throw new FHIRException("Cannot call addChild on a primitive type Contract.linkId"); 5043 } 5044 else if (name.equals("answer")) { 5045 return addAnswer(); 5046 } 5047 else if (name.equals("securityLabelNumber")) { 5048 throw new FHIRException("Cannot call addChild on a primitive type Contract.securityLabelNumber"); 5049 } 5050 else if (name.equals("valuedItem")) { 5051 return addValuedItem(); 5052 } 5053 else 5054 return super.addChild(name); 5055 } 5056 5057 public ContractAssetComponent copy() { 5058 ContractAssetComponent dst = new ContractAssetComponent(); 5059 copyValues(dst); 5060 dst.scope = scope == null ? null : scope.copy(); 5061 if (type != null) { 5062 dst.type = new ArrayList<CodeableConcept>(); 5063 for (CodeableConcept i : type) 5064 dst.type.add(i.copy()); 5065 }; 5066 if (typeReference != null) { 5067 dst.typeReference = new ArrayList<Reference>(); 5068 for (Reference i : typeReference) 5069 dst.typeReference.add(i.copy()); 5070 }; 5071 if (subtype != null) { 5072 dst.subtype = new ArrayList<CodeableConcept>(); 5073 for (CodeableConcept i : subtype) 5074 dst.subtype.add(i.copy()); 5075 }; 5076 dst.relationship = relationship == null ? null : relationship.copy(); 5077 if (context != null) { 5078 dst.context = new ArrayList<AssetContextComponent>(); 5079 for (AssetContextComponent i : context) 5080 dst.context.add(i.copy()); 5081 }; 5082 dst.condition = condition == null ? null : condition.copy(); 5083 if (periodType != null) { 5084 dst.periodType = new ArrayList<CodeableConcept>(); 5085 for (CodeableConcept i : periodType) 5086 dst.periodType.add(i.copy()); 5087 }; 5088 if (period != null) { 5089 dst.period = new ArrayList<Period>(); 5090 for (Period i : period) 5091 dst.period.add(i.copy()); 5092 }; 5093 if (usePeriod != null) { 5094 dst.usePeriod = new ArrayList<Period>(); 5095 for (Period i : usePeriod) 5096 dst.usePeriod.add(i.copy()); 5097 }; 5098 dst.text = text == null ? null : text.copy(); 5099 if (linkId != null) { 5100 dst.linkId = new ArrayList<StringType>(); 5101 for (StringType i : linkId) 5102 dst.linkId.add(i.copy()); 5103 }; 5104 if (answer != null) { 5105 dst.answer = new ArrayList<AnswerComponent>(); 5106 for (AnswerComponent i : answer) 5107 dst.answer.add(i.copy()); 5108 }; 5109 if (securityLabelNumber != null) { 5110 dst.securityLabelNumber = new ArrayList<UnsignedIntType>(); 5111 for (UnsignedIntType i : securityLabelNumber) 5112 dst.securityLabelNumber.add(i.copy()); 5113 }; 5114 if (valuedItem != null) { 5115 dst.valuedItem = new ArrayList<ValuedItemComponent>(); 5116 for (ValuedItemComponent i : valuedItem) 5117 dst.valuedItem.add(i.copy()); 5118 }; 5119 return dst; 5120 } 5121 5122 @Override 5123 public boolean equalsDeep(Base other_) { 5124 if (!super.equalsDeep(other_)) 5125 return false; 5126 if (!(other_ instanceof ContractAssetComponent)) 5127 return false; 5128 ContractAssetComponent o = (ContractAssetComponent) other_; 5129 return compareDeep(scope, o.scope, true) && compareDeep(type, o.type, true) && compareDeep(typeReference, o.typeReference, true) 5130 && compareDeep(subtype, o.subtype, true) && compareDeep(relationship, o.relationship, true) && compareDeep(context, o.context, true) 5131 && compareDeep(condition, o.condition, true) && compareDeep(periodType, o.periodType, true) && compareDeep(period, o.period, true) 5132 && compareDeep(usePeriod, o.usePeriod, true) && compareDeep(text, o.text, true) && compareDeep(linkId, o.linkId, true) 5133 && compareDeep(answer, o.answer, true) && compareDeep(securityLabelNumber, o.securityLabelNumber, true) 5134 && compareDeep(valuedItem, o.valuedItem, true); 5135 } 5136 5137 @Override 5138 public boolean equalsShallow(Base other_) { 5139 if (!super.equalsShallow(other_)) 5140 return false; 5141 if (!(other_ instanceof ContractAssetComponent)) 5142 return false; 5143 ContractAssetComponent o = (ContractAssetComponent) other_; 5144 return compareValues(condition, o.condition, true) && compareValues(text, o.text, true) && compareValues(linkId, o.linkId, true) 5145 && compareValues(securityLabelNumber, o.securityLabelNumber, true); 5146 } 5147 5148 public boolean isEmpty() { 5149 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(scope, type, typeReference 5150 , subtype, relationship, context, condition, periodType, period, usePeriod, text 5151 , linkId, answer, securityLabelNumber, valuedItem); 5152 } 5153 5154 public String fhirType() { 5155 return "Contract.term.asset"; 5156 5157 } 5158 5159 } 5160 5161 @Block() 5162 public static class AssetContextComponent extends BackboneElement implements IBaseBackboneElement { 5163 /** 5164 * Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository), location held, e.g., building, jurisdiction. 5165 */ 5166 @Child(name = "reference", type = {Reference.class}, order=1, min=0, max=1, modifier=false, summary=false) 5167 @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." ) 5168 protected Reference reference; 5169 5170 /** 5171 * 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.) 5172 */ 5173 protected Resource referenceTarget; 5174 5175 /** 5176 * Coded representation of the context generally or of the Referenced entity, such as the asset holder type or location. 5177 */ 5178 @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5179 @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." ) 5180 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-assetcontext") 5181 protected List<CodeableConcept> code; 5182 5183 /** 5184 * Context description. 5185 */ 5186 @Child(name = "text", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 5187 @Description(shortDefinition="Context description", formalDefinition="Context description." ) 5188 protected StringType text; 5189 5190 private static final long serialVersionUID = -634115628L; 5191 5192 /** 5193 * Constructor 5194 */ 5195 public AssetContextComponent() { 5196 super(); 5197 } 5198 5199 /** 5200 * @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.) 5201 */ 5202 public Reference getReference() { 5203 if (this.reference == null) 5204 if (Configuration.errorOnAutoCreate()) 5205 throw new Error("Attempt to auto-create AssetContextComponent.reference"); 5206 else if (Configuration.doAutoCreate()) 5207 this.reference = new Reference(); // cc 5208 return this.reference; 5209 } 5210 5211 public boolean hasReference() { 5212 return this.reference != null && !this.reference.isEmpty(); 5213 } 5214 5215 /** 5216 * @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.) 5217 */ 5218 public AssetContextComponent setReference(Reference value) { 5219 this.reference = value; 5220 return this; 5221 } 5222 5223 /** 5224 * @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.) 5225 */ 5226 public Resource getReferenceTarget() { 5227 return this.referenceTarget; 5228 } 5229 5230 /** 5231 * @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.) 5232 */ 5233 public AssetContextComponent setReferenceTarget(Resource value) { 5234 this.referenceTarget = value; 5235 return this; 5236 } 5237 5238 /** 5239 * @return {@link #code} (Coded representation of the context generally or of the Referenced entity, such as the asset holder type or location.) 5240 */ 5241 public List<CodeableConcept> getCode() { 5242 if (this.code == null) 5243 this.code = new ArrayList<CodeableConcept>(); 5244 return this.code; 5245 } 5246 5247 /** 5248 * @return Returns a reference to <code>this</code> for easy method chaining 5249 */ 5250 public AssetContextComponent setCode(List<CodeableConcept> theCode) { 5251 this.code = theCode; 5252 return this; 5253 } 5254 5255 public boolean hasCode() { 5256 if (this.code == null) 5257 return false; 5258 for (CodeableConcept item : this.code) 5259 if (!item.isEmpty()) 5260 return true; 5261 return false; 5262 } 5263 5264 public CodeableConcept addCode() { //3 5265 CodeableConcept t = new CodeableConcept(); 5266 if (this.code == null) 5267 this.code = new ArrayList<CodeableConcept>(); 5268 this.code.add(t); 5269 return t; 5270 } 5271 5272 public AssetContextComponent addCode(CodeableConcept t) { //3 5273 if (t == null) 5274 return this; 5275 if (this.code == null) 5276 this.code = new ArrayList<CodeableConcept>(); 5277 this.code.add(t); 5278 return this; 5279 } 5280 5281 /** 5282 * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist 5283 */ 5284 public CodeableConcept getCodeFirstRep() { 5285 if (getCode().isEmpty()) { 5286 addCode(); 5287 } 5288 return getCode().get(0); 5289 } 5290 5291 /** 5292 * @return {@link #text} (Context description.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 5293 */ 5294 public StringType getTextElement() { 5295 if (this.text == null) 5296 if (Configuration.errorOnAutoCreate()) 5297 throw new Error("Attempt to auto-create AssetContextComponent.text"); 5298 else if (Configuration.doAutoCreate()) 5299 this.text = new StringType(); // bb 5300 return this.text; 5301 } 5302 5303 public boolean hasTextElement() { 5304 return this.text != null && !this.text.isEmpty(); 5305 } 5306 5307 public boolean hasText() { 5308 return this.text != null && !this.text.isEmpty(); 5309 } 5310 5311 /** 5312 * @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 5313 */ 5314 public AssetContextComponent setTextElement(StringType value) { 5315 this.text = value; 5316 return this; 5317 } 5318 5319 /** 5320 * @return Context description. 5321 */ 5322 public String getText() { 5323 return this.text == null ? null : this.text.getValue(); 5324 } 5325 5326 /** 5327 * @param value Context description. 5328 */ 5329 public AssetContextComponent setText(String value) { 5330 if (Utilities.noString(value)) 5331 this.text = null; 5332 else { 5333 if (this.text == null) 5334 this.text = new StringType(); 5335 this.text.setValue(value); 5336 } 5337 return this; 5338 } 5339 5340 protected void listChildren(List<Property> children) { 5341 super.listChildren(children); 5342 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)); 5343 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)); 5344 children.add(new Property("text", "string", "Context description.", 0, 1, text)); 5345 } 5346 5347 @Override 5348 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 5349 switch (_hash) { 5350 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); 5351 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); 5352 case 3556653: /*text*/ return new Property("text", "string", "Context description.", 0, 1, text); 5353 default: return super.getNamedProperty(_hash, _name, _checkValid); 5354 } 5355 5356 } 5357 5358 @Override 5359 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5360 switch (hash) { 5361 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference 5362 case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // CodeableConcept 5363 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 5364 default: return super.getProperty(hash, name, checkValid); 5365 } 5366 5367 } 5368 5369 @Override 5370 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5371 switch (hash) { 5372 case -925155509: // reference 5373 this.reference = castToReference(value); // Reference 5374 return value; 5375 case 3059181: // code 5376 this.getCode().add(castToCodeableConcept(value)); // CodeableConcept 5377 return value; 5378 case 3556653: // text 5379 this.text = castToString(value); // StringType 5380 return value; 5381 default: return super.setProperty(hash, name, value); 5382 } 5383 5384 } 5385 5386 @Override 5387 public Base setProperty(String name, Base value) throws FHIRException { 5388 if (name.equals("reference")) { 5389 this.reference = castToReference(value); // Reference 5390 } else if (name.equals("code")) { 5391 this.getCode().add(castToCodeableConcept(value)); 5392 } else if (name.equals("text")) { 5393 this.text = castToString(value); // StringType 5394 } else 5395 return super.setProperty(name, value); 5396 return value; 5397 } 5398 5399 @Override 5400 public Base makeProperty(int hash, String name) throws FHIRException { 5401 switch (hash) { 5402 case -925155509: return getReference(); 5403 case 3059181: return addCode(); 5404 case 3556653: return getTextElement(); 5405 default: return super.makeProperty(hash, name); 5406 } 5407 5408 } 5409 5410 @Override 5411 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5412 switch (hash) { 5413 case -925155509: /*reference*/ return new String[] {"Reference"}; 5414 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 5415 case 3556653: /*text*/ return new String[] {"string"}; 5416 default: return super.getTypesForProperty(hash, name); 5417 } 5418 5419 } 5420 5421 @Override 5422 public Base addChild(String name) throws FHIRException { 5423 if (name.equals("reference")) { 5424 this.reference = new Reference(); 5425 return this.reference; 5426 } 5427 else if (name.equals("code")) { 5428 return addCode(); 5429 } 5430 else if (name.equals("text")) { 5431 throw new FHIRException("Cannot call addChild on a primitive type Contract.text"); 5432 } 5433 else 5434 return super.addChild(name); 5435 } 5436 5437 public AssetContextComponent copy() { 5438 AssetContextComponent dst = new AssetContextComponent(); 5439 copyValues(dst); 5440 dst.reference = reference == null ? null : reference.copy(); 5441 if (code != null) { 5442 dst.code = new ArrayList<CodeableConcept>(); 5443 for (CodeableConcept i : code) 5444 dst.code.add(i.copy()); 5445 }; 5446 dst.text = text == null ? null : text.copy(); 5447 return dst; 5448 } 5449 5450 @Override 5451 public boolean equalsDeep(Base other_) { 5452 if (!super.equalsDeep(other_)) 5453 return false; 5454 if (!(other_ instanceof AssetContextComponent)) 5455 return false; 5456 AssetContextComponent o = (AssetContextComponent) other_; 5457 return compareDeep(reference, o.reference, true) && compareDeep(code, o.code, true) && compareDeep(text, o.text, true) 5458 ; 5459 } 5460 5461 @Override 5462 public boolean equalsShallow(Base other_) { 5463 if (!super.equalsShallow(other_)) 5464 return false; 5465 if (!(other_ instanceof AssetContextComponent)) 5466 return false; 5467 AssetContextComponent o = (AssetContextComponent) other_; 5468 return compareValues(text, o.text, true); 5469 } 5470 5471 public boolean isEmpty() { 5472 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(reference, code, text); 5473 } 5474 5475 public String fhirType() { 5476 return "Contract.term.asset.context"; 5477 5478 } 5479 5480 } 5481 5482 @Block() 5483 public static class ValuedItemComponent extends BackboneElement implements IBaseBackboneElement { 5484 /** 5485 * Specific type of Contract Valued Item that may be priced. 5486 */ 5487 @Child(name = "entity", type = {CodeableConcept.class, Reference.class}, order=1, min=0, max=1, modifier=false, summary=false) 5488 @Description(shortDefinition="Contract Valued Item Type", formalDefinition="Specific type of Contract Valued Item that may be priced." ) 5489 protected Type entity; 5490 5491 /** 5492 * Identifies a Contract Valued Item instance. 5493 */ 5494 @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=false) 5495 @Description(shortDefinition="Contract Valued Item Number", formalDefinition="Identifies a Contract Valued Item instance." ) 5496 protected Identifier identifier; 5497 5498 /** 5499 * Indicates the time during which this Contract ValuedItem information is effective. 5500 */ 5501 @Child(name = "effectiveTime", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 5502 @Description(shortDefinition="Contract Valued Item Effective Tiem", formalDefinition="Indicates the time during which this Contract ValuedItem information is effective." ) 5503 protected DateTimeType effectiveTime; 5504 5505 /** 5506 * Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances. 5507 */ 5508 @Child(name = "quantity", type = {Quantity.class}, order=4, min=0, max=1, modifier=false, summary=false) 5509 @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." ) 5510 protected Quantity quantity; 5511 5512 /** 5513 * A Contract Valued Item unit valuation measure. 5514 */ 5515 @Child(name = "unitPrice", type = {Money.class}, order=5, min=0, max=1, modifier=false, summary=false) 5516 @Description(shortDefinition="Contract Valued Item fee, charge, or cost", formalDefinition="A Contract Valued Item unit valuation measure." ) 5517 protected Money unitPrice; 5518 5519 /** 5520 * 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. 5521 */ 5522 @Child(name = "factor", type = {DecimalType.class}, order=6, min=0, max=1, modifier=false, summary=false) 5523 @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." ) 5524 protected DecimalType factor; 5525 5526 /** 5527 * 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. 5528 */ 5529 @Child(name = "points", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=false) 5530 @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." ) 5531 protected DecimalType points; 5532 5533 /** 5534 * 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. 5535 */ 5536 @Child(name = "net", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=false) 5537 @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." ) 5538 protected Money net; 5539 5540 /** 5541 * Terms of valuation. 5542 */ 5543 @Child(name = "payment", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) 5544 @Description(shortDefinition="Terms of valuation", formalDefinition="Terms of valuation." ) 5545 protected StringType payment; 5546 5547 /** 5548 * When payment is due. 5549 */ 5550 @Child(name = "paymentDate", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=false) 5551 @Description(shortDefinition="When payment is due", formalDefinition="When payment is due." ) 5552 protected DateTimeType paymentDate; 5553 5554 /** 5555 * Who will make payment. 5556 */ 5557 @Child(name = "responsible", type = {Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class}, order=11, min=0, max=1, modifier=false, summary=false) 5558 @Description(shortDefinition="Who will make payment", formalDefinition="Who will make payment." ) 5559 protected Reference responsible; 5560 5561 /** 5562 * The actual object that is the target of the reference (Who will make payment.) 5563 */ 5564 protected Resource responsibleTarget; 5565 5566 /** 5567 * Who will receive payment. 5568 */ 5569 @Child(name = "recipient", type = {Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class}, order=12, min=0, max=1, modifier=false, summary=false) 5570 @Description(shortDefinition="Who will receive payment", formalDefinition="Who will receive payment." ) 5571 protected Reference recipient; 5572 5573 /** 5574 * The actual object that is the target of the reference (Who will receive payment.) 5575 */ 5576 protected Resource recipientTarget; 5577 5578 /** 5579 * Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse. 5580 */ 5581 @Child(name = "linkId", type = {StringType.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5582 @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." ) 5583 protected List<StringType> linkId; 5584 5585 /** 5586 * A set of security labels that define which terms are controlled by this condition. 5587 */ 5588 @Child(name = "securityLabelNumber", type = {UnsignedIntType.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5589 @Description(shortDefinition="Security Labels that define affected terms", formalDefinition="A set of security labels that define which terms are controlled by this condition." ) 5590 protected List<UnsignedIntType> securityLabelNumber; 5591 5592 private static final long serialVersionUID = 1894951601L; 5593 5594 /** 5595 * Constructor 5596 */ 5597 public ValuedItemComponent() { 5598 super(); 5599 } 5600 5601 /** 5602 * @return {@link #entity} (Specific type of Contract Valued Item that may be priced.) 5603 */ 5604 public Type getEntity() { 5605 return this.entity; 5606 } 5607 5608 /** 5609 * @return {@link #entity} (Specific type of Contract Valued Item that may be priced.) 5610 */ 5611 public CodeableConcept getEntityCodeableConcept() throws FHIRException { 5612 if (this.entity == null) 5613 this.entity = new CodeableConcept(); 5614 if (!(this.entity instanceof CodeableConcept)) 5615 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.entity.getClass().getName()+" was encountered"); 5616 return (CodeableConcept) this.entity; 5617 } 5618 5619 public boolean hasEntityCodeableConcept() { 5620 return this != null && this.entity instanceof CodeableConcept; 5621 } 5622 5623 /** 5624 * @return {@link #entity} (Specific type of Contract Valued Item that may be priced.) 5625 */ 5626 public Reference getEntityReference() throws FHIRException { 5627 if (this.entity == null) 5628 this.entity = new Reference(); 5629 if (!(this.entity instanceof Reference)) 5630 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.entity.getClass().getName()+" was encountered"); 5631 return (Reference) this.entity; 5632 } 5633 5634 public boolean hasEntityReference() { 5635 return this != null && this.entity instanceof Reference; 5636 } 5637 5638 public boolean hasEntity() { 5639 return this.entity != null && !this.entity.isEmpty(); 5640 } 5641 5642 /** 5643 * @param value {@link #entity} (Specific type of Contract Valued Item that may be priced.) 5644 */ 5645 public ValuedItemComponent setEntity(Type value) { 5646 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 5647 throw new Error("Not the right type for Contract.term.asset.valuedItem.entity[x]: "+value.fhirType()); 5648 this.entity = value; 5649 return this; 5650 } 5651 5652 /** 5653 * @return {@link #identifier} (Identifies a Contract Valued Item instance.) 5654 */ 5655 public Identifier getIdentifier() { 5656 if (this.identifier == null) 5657 if (Configuration.errorOnAutoCreate()) 5658 throw new Error("Attempt to auto-create ValuedItemComponent.identifier"); 5659 else if (Configuration.doAutoCreate()) 5660 this.identifier = new Identifier(); // cc 5661 return this.identifier; 5662 } 5663 5664 public boolean hasIdentifier() { 5665 return this.identifier != null && !this.identifier.isEmpty(); 5666 } 5667 5668 /** 5669 * @param value {@link #identifier} (Identifies a Contract Valued Item instance.) 5670 */ 5671 public ValuedItemComponent setIdentifier(Identifier value) { 5672 this.identifier = value; 5673 return this; 5674 } 5675 5676 /** 5677 * @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 5678 */ 5679 public DateTimeType getEffectiveTimeElement() { 5680 if (this.effectiveTime == null) 5681 if (Configuration.errorOnAutoCreate()) 5682 throw new Error("Attempt to auto-create ValuedItemComponent.effectiveTime"); 5683 else if (Configuration.doAutoCreate()) 5684 this.effectiveTime = new DateTimeType(); // bb 5685 return this.effectiveTime; 5686 } 5687 5688 public boolean hasEffectiveTimeElement() { 5689 return this.effectiveTime != null && !this.effectiveTime.isEmpty(); 5690 } 5691 5692 public boolean hasEffectiveTime() { 5693 return this.effectiveTime != null && !this.effectiveTime.isEmpty(); 5694 } 5695 5696 /** 5697 * @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 5698 */ 5699 public ValuedItemComponent setEffectiveTimeElement(DateTimeType value) { 5700 this.effectiveTime = value; 5701 return this; 5702 } 5703 5704 /** 5705 * @return Indicates the time during which this Contract ValuedItem information is effective. 5706 */ 5707 public Date getEffectiveTime() { 5708 return this.effectiveTime == null ? null : this.effectiveTime.getValue(); 5709 } 5710 5711 /** 5712 * @param value Indicates the time during which this Contract ValuedItem information is effective. 5713 */ 5714 public ValuedItemComponent setEffectiveTime(Date value) { 5715 if (value == null) 5716 this.effectiveTime = null; 5717 else { 5718 if (this.effectiveTime == null) 5719 this.effectiveTime = new DateTimeType(); 5720 this.effectiveTime.setValue(value); 5721 } 5722 return this; 5723 } 5724 5725 /** 5726 * @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.) 5727 */ 5728 public Quantity getQuantity() { 5729 if (this.quantity == null) 5730 if (Configuration.errorOnAutoCreate()) 5731 throw new Error("Attempt to auto-create ValuedItemComponent.quantity"); 5732 else if (Configuration.doAutoCreate()) 5733 this.quantity = new Quantity(); // cc 5734 return this.quantity; 5735 } 5736 5737 public boolean hasQuantity() { 5738 return this.quantity != null && !this.quantity.isEmpty(); 5739 } 5740 5741 /** 5742 * @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.) 5743 */ 5744 public ValuedItemComponent setQuantity(Quantity value) { 5745 this.quantity = value; 5746 return this; 5747 } 5748 5749 /** 5750 * @return {@link #unitPrice} (A Contract Valued Item unit valuation measure.) 5751 */ 5752 public Money getUnitPrice() { 5753 if (this.unitPrice == null) 5754 if (Configuration.errorOnAutoCreate()) 5755 throw new Error("Attempt to auto-create ValuedItemComponent.unitPrice"); 5756 else if (Configuration.doAutoCreate()) 5757 this.unitPrice = new Money(); // cc 5758 return this.unitPrice; 5759 } 5760 5761 public boolean hasUnitPrice() { 5762 return this.unitPrice != null && !this.unitPrice.isEmpty(); 5763 } 5764 5765 /** 5766 * @param value {@link #unitPrice} (A Contract Valued Item unit valuation measure.) 5767 */ 5768 public ValuedItemComponent setUnitPrice(Money value) { 5769 this.unitPrice = value; 5770 return this; 5771 } 5772 5773 /** 5774 * @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 5775 */ 5776 public DecimalType getFactorElement() { 5777 if (this.factor == null) 5778 if (Configuration.errorOnAutoCreate()) 5779 throw new Error("Attempt to auto-create ValuedItemComponent.factor"); 5780 else if (Configuration.doAutoCreate()) 5781 this.factor = new DecimalType(); // bb 5782 return this.factor; 5783 } 5784 5785 public boolean hasFactorElement() { 5786 return this.factor != null && !this.factor.isEmpty(); 5787 } 5788 5789 public boolean hasFactor() { 5790 return this.factor != null && !this.factor.isEmpty(); 5791 } 5792 5793 /** 5794 * @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 5795 */ 5796 public ValuedItemComponent setFactorElement(DecimalType value) { 5797 this.factor = value; 5798 return this; 5799 } 5800 5801 /** 5802 * @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. 5803 */ 5804 public BigDecimal getFactor() { 5805 return this.factor == null ? null : this.factor.getValue(); 5806 } 5807 5808 /** 5809 * @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. 5810 */ 5811 public ValuedItemComponent setFactor(BigDecimal value) { 5812 if (value == null) 5813 this.factor = null; 5814 else { 5815 if (this.factor == null) 5816 this.factor = new DecimalType(); 5817 this.factor.setValue(value); 5818 } 5819 return this; 5820 } 5821 5822 /** 5823 * @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. 5824 */ 5825 public ValuedItemComponent setFactor(long value) { 5826 this.factor = new DecimalType(); 5827 this.factor.setValue(value); 5828 return this; 5829 } 5830 5831 /** 5832 * @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. 5833 */ 5834 public ValuedItemComponent setFactor(double value) { 5835 this.factor = new DecimalType(); 5836 this.factor.setValue(value); 5837 return this; 5838 } 5839 5840 /** 5841 * @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 5842 */ 5843 public DecimalType getPointsElement() { 5844 if (this.points == null) 5845 if (Configuration.errorOnAutoCreate()) 5846 throw new Error("Attempt to auto-create ValuedItemComponent.points"); 5847 else if (Configuration.doAutoCreate()) 5848 this.points = new DecimalType(); // bb 5849 return this.points; 5850 } 5851 5852 public boolean hasPointsElement() { 5853 return this.points != null && !this.points.isEmpty(); 5854 } 5855 5856 public boolean hasPoints() { 5857 return this.points != null && !this.points.isEmpty(); 5858 } 5859 5860 /** 5861 * @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 5862 */ 5863 public ValuedItemComponent setPointsElement(DecimalType value) { 5864 this.points = value; 5865 return this; 5866 } 5867 5868 /** 5869 * @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. 5870 */ 5871 public BigDecimal getPoints() { 5872 return this.points == null ? null : this.points.getValue(); 5873 } 5874 5875 /** 5876 * @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. 5877 */ 5878 public ValuedItemComponent setPoints(BigDecimal value) { 5879 if (value == null) 5880 this.points = null; 5881 else { 5882 if (this.points == null) 5883 this.points = new DecimalType(); 5884 this.points.setValue(value); 5885 } 5886 return this; 5887 } 5888 5889 /** 5890 * @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. 5891 */ 5892 public ValuedItemComponent setPoints(long value) { 5893 this.points = new DecimalType(); 5894 this.points.setValue(value); 5895 return this; 5896 } 5897 5898 /** 5899 * @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. 5900 */ 5901 public ValuedItemComponent setPoints(double value) { 5902 this.points = new DecimalType(); 5903 this.points.setValue(value); 5904 return this; 5905 } 5906 5907 /** 5908 * @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.) 5909 */ 5910 public Money getNet() { 5911 if (this.net == null) 5912 if (Configuration.errorOnAutoCreate()) 5913 throw new Error("Attempt to auto-create ValuedItemComponent.net"); 5914 else if (Configuration.doAutoCreate()) 5915 this.net = new Money(); // cc 5916 return this.net; 5917 } 5918 5919 public boolean hasNet() { 5920 return this.net != null && !this.net.isEmpty(); 5921 } 5922 5923 /** 5924 * @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.) 5925 */ 5926 public ValuedItemComponent setNet(Money value) { 5927 this.net = value; 5928 return this; 5929 } 5930 5931 /** 5932 * @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 5933 */ 5934 public StringType getPaymentElement() { 5935 if (this.payment == null) 5936 if (Configuration.errorOnAutoCreate()) 5937 throw new Error("Attempt to auto-create ValuedItemComponent.payment"); 5938 else if (Configuration.doAutoCreate()) 5939 this.payment = new StringType(); // bb 5940 return this.payment; 5941 } 5942 5943 public boolean hasPaymentElement() { 5944 return this.payment != null && !this.payment.isEmpty(); 5945 } 5946 5947 public boolean hasPayment() { 5948 return this.payment != null && !this.payment.isEmpty(); 5949 } 5950 5951 /** 5952 * @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 5953 */ 5954 public ValuedItemComponent setPaymentElement(StringType value) { 5955 this.payment = value; 5956 return this; 5957 } 5958 5959 /** 5960 * @return Terms of valuation. 5961 */ 5962 public String getPayment() { 5963 return this.payment == null ? null : this.payment.getValue(); 5964 } 5965 5966 /** 5967 * @param value Terms of valuation. 5968 */ 5969 public ValuedItemComponent setPayment(String value) { 5970 if (Utilities.noString(value)) 5971 this.payment = null; 5972 else { 5973 if (this.payment == null) 5974 this.payment = new StringType(); 5975 this.payment.setValue(value); 5976 } 5977 return this; 5978 } 5979 5980 /** 5981 * @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 5982 */ 5983 public DateTimeType getPaymentDateElement() { 5984 if (this.paymentDate == null) 5985 if (Configuration.errorOnAutoCreate()) 5986 throw new Error("Attempt to auto-create ValuedItemComponent.paymentDate"); 5987 else if (Configuration.doAutoCreate()) 5988 this.paymentDate = new DateTimeType(); // bb 5989 return this.paymentDate; 5990 } 5991 5992 public boolean hasPaymentDateElement() { 5993 return this.paymentDate != null && !this.paymentDate.isEmpty(); 5994 } 5995 5996 public boolean hasPaymentDate() { 5997 return this.paymentDate != null && !this.paymentDate.isEmpty(); 5998 } 5999 6000 /** 6001 * @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 6002 */ 6003 public ValuedItemComponent setPaymentDateElement(DateTimeType value) { 6004 this.paymentDate = value; 6005 return this; 6006 } 6007 6008 /** 6009 * @return When payment is due. 6010 */ 6011 public Date getPaymentDate() { 6012 return this.paymentDate == null ? null : this.paymentDate.getValue(); 6013 } 6014 6015 /** 6016 * @param value When payment is due. 6017 */ 6018 public ValuedItemComponent setPaymentDate(Date value) { 6019 if (value == null) 6020 this.paymentDate = null; 6021 else { 6022 if (this.paymentDate == null) 6023 this.paymentDate = new DateTimeType(); 6024 this.paymentDate.setValue(value); 6025 } 6026 return this; 6027 } 6028 6029 /** 6030 * @return {@link #responsible} (Who will make payment.) 6031 */ 6032 public Reference getResponsible() { 6033 if (this.responsible == null) 6034 if (Configuration.errorOnAutoCreate()) 6035 throw new Error("Attempt to auto-create ValuedItemComponent.responsible"); 6036 else if (Configuration.doAutoCreate()) 6037 this.responsible = new Reference(); // cc 6038 return this.responsible; 6039 } 6040 6041 public boolean hasResponsible() { 6042 return this.responsible != null && !this.responsible.isEmpty(); 6043 } 6044 6045 /** 6046 * @param value {@link #responsible} (Who will make payment.) 6047 */ 6048 public ValuedItemComponent setResponsible(Reference value) { 6049 this.responsible = value; 6050 return this; 6051 } 6052 6053 /** 6054 * @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.) 6055 */ 6056 public Resource getResponsibleTarget() { 6057 return this.responsibleTarget; 6058 } 6059 6060 /** 6061 * @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.) 6062 */ 6063 public ValuedItemComponent setResponsibleTarget(Resource value) { 6064 this.responsibleTarget = value; 6065 return this; 6066 } 6067 6068 /** 6069 * @return {@link #recipient} (Who will receive payment.) 6070 */ 6071 public Reference getRecipient() { 6072 if (this.recipient == null) 6073 if (Configuration.errorOnAutoCreate()) 6074 throw new Error("Attempt to auto-create ValuedItemComponent.recipient"); 6075 else if (Configuration.doAutoCreate()) 6076 this.recipient = new Reference(); // cc 6077 return this.recipient; 6078 } 6079 6080 public boolean hasRecipient() { 6081 return this.recipient != null && !this.recipient.isEmpty(); 6082 } 6083 6084 /** 6085 * @param value {@link #recipient} (Who will receive payment.) 6086 */ 6087 public ValuedItemComponent setRecipient(Reference value) { 6088 this.recipient = value; 6089 return this; 6090 } 6091 6092 /** 6093 * @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.) 6094 */ 6095 public Resource getRecipientTarget() { 6096 return this.recipientTarget; 6097 } 6098 6099 /** 6100 * @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.) 6101 */ 6102 public ValuedItemComponent setRecipientTarget(Resource value) { 6103 this.recipientTarget = value; 6104 return this; 6105 } 6106 6107 /** 6108 * @return {@link #linkId} (Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.) 6109 */ 6110 public List<StringType> getLinkId() { 6111 if (this.linkId == null) 6112 this.linkId = new ArrayList<StringType>(); 6113 return this.linkId; 6114 } 6115 6116 /** 6117 * @return Returns a reference to <code>this</code> for easy method chaining 6118 */ 6119 public ValuedItemComponent setLinkId(List<StringType> theLinkId) { 6120 this.linkId = theLinkId; 6121 return this; 6122 } 6123 6124 public boolean hasLinkId() { 6125 if (this.linkId == null) 6126 return false; 6127 for (StringType item : this.linkId) 6128 if (!item.isEmpty()) 6129 return true; 6130 return false; 6131 } 6132 6133 /** 6134 * @return {@link #linkId} (Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.) 6135 */ 6136 public StringType addLinkIdElement() {//2 6137 StringType t = new StringType(); 6138 if (this.linkId == null) 6139 this.linkId = new ArrayList<StringType>(); 6140 this.linkId.add(t); 6141 return t; 6142 } 6143 6144 /** 6145 * @param value {@link #linkId} (Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.) 6146 */ 6147 public ValuedItemComponent addLinkId(String value) { //1 6148 StringType t = new StringType(); 6149 t.setValue(value); 6150 if (this.linkId == null) 6151 this.linkId = new ArrayList<StringType>(); 6152 this.linkId.add(t); 6153 return this; 6154 } 6155 6156 /** 6157 * @param value {@link #linkId} (Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.) 6158 */ 6159 public boolean hasLinkId(String value) { 6160 if (this.linkId == null) 6161 return false; 6162 for (StringType v : this.linkId) 6163 if (v.getValue().equals(value)) // string 6164 return true; 6165 return false; 6166 } 6167 6168 /** 6169 * @return {@link #securityLabelNumber} (A set of security labels that define which terms are controlled by this condition.) 6170 */ 6171 public List<UnsignedIntType> getSecurityLabelNumber() { 6172 if (this.securityLabelNumber == null) 6173 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 6174 return this.securityLabelNumber; 6175 } 6176 6177 /** 6178 * @return Returns a reference to <code>this</code> for easy method chaining 6179 */ 6180 public ValuedItemComponent setSecurityLabelNumber(List<UnsignedIntType> theSecurityLabelNumber) { 6181 this.securityLabelNumber = theSecurityLabelNumber; 6182 return this; 6183 } 6184 6185 public boolean hasSecurityLabelNumber() { 6186 if (this.securityLabelNumber == null) 6187 return false; 6188 for (UnsignedIntType item : this.securityLabelNumber) 6189 if (!item.isEmpty()) 6190 return true; 6191 return false; 6192 } 6193 6194 /** 6195 * @return {@link #securityLabelNumber} (A set of security labels that define which terms are controlled by this condition.) 6196 */ 6197 public UnsignedIntType addSecurityLabelNumberElement() {//2 6198 UnsignedIntType t = new UnsignedIntType(); 6199 if (this.securityLabelNumber == null) 6200 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 6201 this.securityLabelNumber.add(t); 6202 return t; 6203 } 6204 6205 /** 6206 * @param value {@link #securityLabelNumber} (A set of security labels that define which terms are controlled by this condition.) 6207 */ 6208 public ValuedItemComponent addSecurityLabelNumber(int value) { //1 6209 UnsignedIntType t = new UnsignedIntType(); 6210 t.setValue(value); 6211 if (this.securityLabelNumber == null) 6212 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 6213 this.securityLabelNumber.add(t); 6214 return this; 6215 } 6216 6217 /** 6218 * @param value {@link #securityLabelNumber} (A set of security labels that define which terms are controlled by this condition.) 6219 */ 6220 public boolean hasSecurityLabelNumber(int value) { 6221 if (this.securityLabelNumber == null) 6222 return false; 6223 for (UnsignedIntType v : this.securityLabelNumber) 6224 if (v.getValue().equals(value)) // unsignedInt 6225 return true; 6226 return false; 6227 } 6228 6229 protected void listChildren(List<Property> children) { 6230 super.listChildren(children); 6231 children.add(new Property("entity[x]", "CodeableConcept|Reference(Any)", "Specific type of Contract Valued Item that may be priced.", 0, 1, entity)); 6232 children.add(new Property("identifier", "Identifier", "Identifies a Contract Valued Item instance.", 0, 1, identifier)); 6233 children.add(new Property("effectiveTime", "dateTime", "Indicates the time during which this Contract ValuedItem information is effective.", 0, 1, effectiveTime)); 6234 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)); 6235 children.add(new Property("unitPrice", "Money", "A Contract Valued Item unit valuation measure.", 0, 1, unitPrice)); 6236 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)); 6237 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)); 6238 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)); 6239 children.add(new Property("payment", "string", "Terms of valuation.", 0, 1, payment)); 6240 children.add(new Property("paymentDate", "dateTime", "When payment is due.", 0, 1, paymentDate)); 6241 children.add(new Property("responsible", "Reference(Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "Who will make payment.", 0, 1, responsible)); 6242 children.add(new Property("recipient", "Reference(Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "Who will receive payment.", 0, 1, recipient)); 6243 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)); 6244 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)); 6245 } 6246 6247 @Override 6248 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 6249 switch (_hash) { 6250 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); 6251 case -1298275357: /*entity*/ return new Property("entity[x]", "CodeableConcept|Reference(Any)", "Specific type of Contract Valued Item that may be priced.", 0, 1, entity); 6252 case 924197182: /*entityCodeableConcept*/ return new Property("entity[x]", "CodeableConcept|Reference(Any)", "Specific type of Contract Valued Item that may be priced.", 0, 1, entity); 6253 case -356635992: /*entityReference*/ return new Property("entity[x]", "CodeableConcept|Reference(Any)", "Specific type of Contract Valued Item that may be priced.", 0, 1, entity); 6254 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifies a Contract Valued Item instance.", 0, 1, identifier); 6255 case -929905388: /*effectiveTime*/ return new Property("effectiveTime", "dateTime", "Indicates the time during which this Contract ValuedItem information is effective.", 0, 1, effectiveTime); 6256 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); 6257 case -486196699: /*unitPrice*/ return new Property("unitPrice", "Money", "A Contract Valued Item unit valuation measure.", 0, 1, unitPrice); 6258 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); 6259 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); 6260 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); 6261 case -786681338: /*payment*/ return new Property("payment", "string", "Terms of valuation.", 0, 1, payment); 6262 case -1540873516: /*paymentDate*/ return new Property("paymentDate", "dateTime", "When payment is due.", 0, 1, paymentDate); 6263 case 1847674614: /*responsible*/ return new Property("responsible", "Reference(Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "Who will make payment.", 0, 1, responsible); 6264 case 820081177: /*recipient*/ return new Property("recipient", "Reference(Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "Who will receive payment.", 0, 1, recipient); 6265 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); 6266 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); 6267 default: return super.getNamedProperty(_hash, _name, _checkValid); 6268 } 6269 6270 } 6271 6272 @Override 6273 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6274 switch (hash) { 6275 case -1298275357: /*entity*/ return this.entity == null ? new Base[0] : new Base[] {this.entity}; // Type 6276 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 6277 case -929905388: /*effectiveTime*/ return this.effectiveTime == null ? new Base[0] : new Base[] {this.effectiveTime}; // DateTimeType 6278 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 6279 case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money 6280 case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType 6281 case -982754077: /*points*/ return this.points == null ? new Base[0] : new Base[] {this.points}; // DecimalType 6282 case 108957: /*net*/ return this.net == null ? new Base[0] : new Base[] {this.net}; // Money 6283 case -786681338: /*payment*/ return this.payment == null ? new Base[0] : new Base[] {this.payment}; // StringType 6284 case -1540873516: /*paymentDate*/ return this.paymentDate == null ? new Base[0] : new Base[] {this.paymentDate}; // DateTimeType 6285 case 1847674614: /*responsible*/ return this.responsible == null ? new Base[0] : new Base[] {this.responsible}; // Reference 6286 case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : new Base[] {this.recipient}; // Reference 6287 case -1102667083: /*linkId*/ return this.linkId == null ? new Base[0] : this.linkId.toArray(new Base[this.linkId.size()]); // StringType 6288 case -149460995: /*securityLabelNumber*/ return this.securityLabelNumber == null ? new Base[0] : this.securityLabelNumber.toArray(new Base[this.securityLabelNumber.size()]); // UnsignedIntType 6289 default: return super.getProperty(hash, name, checkValid); 6290 } 6291 6292 } 6293 6294 @Override 6295 public Base setProperty(int hash, String name, Base value) throws FHIRException { 6296 switch (hash) { 6297 case -1298275357: // entity 6298 this.entity = castToType(value); // Type 6299 return value; 6300 case -1618432855: // identifier 6301 this.identifier = castToIdentifier(value); // Identifier 6302 return value; 6303 case -929905388: // effectiveTime 6304 this.effectiveTime = castToDateTime(value); // DateTimeType 6305 return value; 6306 case -1285004149: // quantity 6307 this.quantity = castToQuantity(value); // Quantity 6308 return value; 6309 case -486196699: // unitPrice 6310 this.unitPrice = castToMoney(value); // Money 6311 return value; 6312 case -1282148017: // factor 6313 this.factor = castToDecimal(value); // DecimalType 6314 return value; 6315 case -982754077: // points 6316 this.points = castToDecimal(value); // DecimalType 6317 return value; 6318 case 108957: // net 6319 this.net = castToMoney(value); // Money 6320 return value; 6321 case -786681338: // payment 6322 this.payment = castToString(value); // StringType 6323 return value; 6324 case -1540873516: // paymentDate 6325 this.paymentDate = castToDateTime(value); // DateTimeType 6326 return value; 6327 case 1847674614: // responsible 6328 this.responsible = castToReference(value); // Reference 6329 return value; 6330 case 820081177: // recipient 6331 this.recipient = castToReference(value); // Reference 6332 return value; 6333 case -1102667083: // linkId 6334 this.getLinkId().add(castToString(value)); // StringType 6335 return value; 6336 case -149460995: // securityLabelNumber 6337 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); // UnsignedIntType 6338 return value; 6339 default: return super.setProperty(hash, name, value); 6340 } 6341 6342 } 6343 6344 @Override 6345 public Base setProperty(String name, Base value) throws FHIRException { 6346 if (name.equals("entity[x]")) { 6347 this.entity = castToType(value); // Type 6348 } else if (name.equals("identifier")) { 6349 this.identifier = castToIdentifier(value); // Identifier 6350 } else if (name.equals("effectiveTime")) { 6351 this.effectiveTime = castToDateTime(value); // DateTimeType 6352 } else if (name.equals("quantity")) { 6353 this.quantity = castToQuantity(value); // Quantity 6354 } else if (name.equals("unitPrice")) { 6355 this.unitPrice = castToMoney(value); // Money 6356 } else if (name.equals("factor")) { 6357 this.factor = castToDecimal(value); // DecimalType 6358 } else if (name.equals("points")) { 6359 this.points = castToDecimal(value); // DecimalType 6360 } else if (name.equals("net")) { 6361 this.net = castToMoney(value); // Money 6362 } else if (name.equals("payment")) { 6363 this.payment = castToString(value); // StringType 6364 } else if (name.equals("paymentDate")) { 6365 this.paymentDate = castToDateTime(value); // DateTimeType 6366 } else if (name.equals("responsible")) { 6367 this.responsible = castToReference(value); // Reference 6368 } else if (name.equals("recipient")) { 6369 this.recipient = castToReference(value); // Reference 6370 } else if (name.equals("linkId")) { 6371 this.getLinkId().add(castToString(value)); 6372 } else if (name.equals("securityLabelNumber")) { 6373 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); 6374 } else 6375 return super.setProperty(name, value); 6376 return value; 6377 } 6378 6379 @Override 6380 public Base makeProperty(int hash, String name) throws FHIRException { 6381 switch (hash) { 6382 case -740568643: return getEntity(); 6383 case -1298275357: return getEntity(); 6384 case -1618432855: return getIdentifier(); 6385 case -929905388: return getEffectiveTimeElement(); 6386 case -1285004149: return getQuantity(); 6387 case -486196699: return getUnitPrice(); 6388 case -1282148017: return getFactorElement(); 6389 case -982754077: return getPointsElement(); 6390 case 108957: return getNet(); 6391 case -786681338: return getPaymentElement(); 6392 case -1540873516: return getPaymentDateElement(); 6393 case 1847674614: return getResponsible(); 6394 case 820081177: return getRecipient(); 6395 case -1102667083: return addLinkIdElement(); 6396 case -149460995: return addSecurityLabelNumberElement(); 6397 default: return super.makeProperty(hash, name); 6398 } 6399 6400 } 6401 6402 @Override 6403 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6404 switch (hash) { 6405 case -1298275357: /*entity*/ return new String[] {"CodeableConcept", "Reference"}; 6406 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 6407 case -929905388: /*effectiveTime*/ return new String[] {"dateTime"}; 6408 case -1285004149: /*quantity*/ return new String[] {"SimpleQuantity"}; 6409 case -486196699: /*unitPrice*/ return new String[] {"Money"}; 6410 case -1282148017: /*factor*/ return new String[] {"decimal"}; 6411 case -982754077: /*points*/ return new String[] {"decimal"}; 6412 case 108957: /*net*/ return new String[] {"Money"}; 6413 case -786681338: /*payment*/ return new String[] {"string"}; 6414 case -1540873516: /*paymentDate*/ return new String[] {"dateTime"}; 6415 case 1847674614: /*responsible*/ return new String[] {"Reference"}; 6416 case 820081177: /*recipient*/ return new String[] {"Reference"}; 6417 case -1102667083: /*linkId*/ return new String[] {"string"}; 6418 case -149460995: /*securityLabelNumber*/ return new String[] {"unsignedInt"}; 6419 default: return super.getTypesForProperty(hash, name); 6420 } 6421 6422 } 6423 6424 @Override 6425 public Base addChild(String name) throws FHIRException { 6426 if (name.equals("entityCodeableConcept")) { 6427 this.entity = new CodeableConcept(); 6428 return this.entity; 6429 } 6430 else if (name.equals("entityReference")) { 6431 this.entity = new Reference(); 6432 return this.entity; 6433 } 6434 else if (name.equals("identifier")) { 6435 this.identifier = new Identifier(); 6436 return this.identifier; 6437 } 6438 else if (name.equals("effectiveTime")) { 6439 throw new FHIRException("Cannot call addChild on a primitive type Contract.effectiveTime"); 6440 } 6441 else if (name.equals("quantity")) { 6442 this.quantity = new Quantity(); 6443 return this.quantity; 6444 } 6445 else if (name.equals("unitPrice")) { 6446 this.unitPrice = new Money(); 6447 return this.unitPrice; 6448 } 6449 else if (name.equals("factor")) { 6450 throw new FHIRException("Cannot call addChild on a primitive type Contract.factor"); 6451 } 6452 else if (name.equals("points")) { 6453 throw new FHIRException("Cannot call addChild on a primitive type Contract.points"); 6454 } 6455 else if (name.equals("net")) { 6456 this.net = new Money(); 6457 return this.net; 6458 } 6459 else if (name.equals("payment")) { 6460 throw new FHIRException("Cannot call addChild on a primitive type Contract.payment"); 6461 } 6462 else if (name.equals("paymentDate")) { 6463 throw new FHIRException("Cannot call addChild on a primitive type Contract.paymentDate"); 6464 } 6465 else if (name.equals("responsible")) { 6466 this.responsible = new Reference(); 6467 return this.responsible; 6468 } 6469 else if (name.equals("recipient")) { 6470 this.recipient = new Reference(); 6471 return this.recipient; 6472 } 6473 else if (name.equals("linkId")) { 6474 throw new FHIRException("Cannot call addChild on a primitive type Contract.linkId"); 6475 } 6476 else if (name.equals("securityLabelNumber")) { 6477 throw new FHIRException("Cannot call addChild on a primitive type Contract.securityLabelNumber"); 6478 } 6479 else 6480 return super.addChild(name); 6481 } 6482 6483 public ValuedItemComponent copy() { 6484 ValuedItemComponent dst = new ValuedItemComponent(); 6485 copyValues(dst); 6486 dst.entity = entity == null ? null : entity.copy(); 6487 dst.identifier = identifier == null ? null : identifier.copy(); 6488 dst.effectiveTime = effectiveTime == null ? null : effectiveTime.copy(); 6489 dst.quantity = quantity == null ? null : quantity.copy(); 6490 dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); 6491 dst.factor = factor == null ? null : factor.copy(); 6492 dst.points = points == null ? null : points.copy(); 6493 dst.net = net == null ? null : net.copy(); 6494 dst.payment = payment == null ? null : payment.copy(); 6495 dst.paymentDate = paymentDate == null ? null : paymentDate.copy(); 6496 dst.responsible = responsible == null ? null : responsible.copy(); 6497 dst.recipient = recipient == null ? null : recipient.copy(); 6498 if (linkId != null) { 6499 dst.linkId = new ArrayList<StringType>(); 6500 for (StringType i : linkId) 6501 dst.linkId.add(i.copy()); 6502 }; 6503 if (securityLabelNumber != null) { 6504 dst.securityLabelNumber = new ArrayList<UnsignedIntType>(); 6505 for (UnsignedIntType i : securityLabelNumber) 6506 dst.securityLabelNumber.add(i.copy()); 6507 }; 6508 return dst; 6509 } 6510 6511 @Override 6512 public boolean equalsDeep(Base other_) { 6513 if (!super.equalsDeep(other_)) 6514 return false; 6515 if (!(other_ instanceof ValuedItemComponent)) 6516 return false; 6517 ValuedItemComponent o = (ValuedItemComponent) other_; 6518 return compareDeep(entity, o.entity, true) && compareDeep(identifier, o.identifier, true) && compareDeep(effectiveTime, o.effectiveTime, true) 6519 && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) 6520 && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(payment, o.payment, true) 6521 && compareDeep(paymentDate, o.paymentDate, true) && compareDeep(responsible, o.responsible, true) 6522 && compareDeep(recipient, o.recipient, true) && compareDeep(linkId, o.linkId, true) && compareDeep(securityLabelNumber, o.securityLabelNumber, true) 6523 ; 6524 } 6525 6526 @Override 6527 public boolean equalsShallow(Base other_) { 6528 if (!super.equalsShallow(other_)) 6529 return false; 6530 if (!(other_ instanceof ValuedItemComponent)) 6531 return false; 6532 ValuedItemComponent o = (ValuedItemComponent) other_; 6533 return compareValues(effectiveTime, o.effectiveTime, true) && compareValues(factor, o.factor, true) 6534 && compareValues(points, o.points, true) && compareValues(payment, o.payment, true) && compareValues(paymentDate, o.paymentDate, true) 6535 && compareValues(linkId, o.linkId, true) && compareValues(securityLabelNumber, o.securityLabelNumber, true) 6536 ; 6537 } 6538 6539 public boolean isEmpty() { 6540 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(entity, identifier, effectiveTime 6541 , quantity, unitPrice, factor, points, net, payment, paymentDate, responsible 6542 , recipient, linkId, securityLabelNumber); 6543 } 6544 6545 public String fhirType() { 6546 return "Contract.term.asset.valuedItem"; 6547 6548 } 6549 6550 } 6551 6552 @Block() 6553 public static class ActionComponent extends BackboneElement implements IBaseBackboneElement { 6554 /** 6555 * True if the term prohibits the action. 6556 */ 6557 @Child(name = "doNotPerform", type = {BooleanType.class}, order=1, min=0, max=1, modifier=true, summary=false) 6558 @Description(shortDefinition="True if the term prohibits the action", formalDefinition="True if the term prohibits the action." ) 6559 protected BooleanType doNotPerform; 6560 6561 /** 6562 * Activity or service obligation to be done or not done, performed or not performed, effectuated or not by this Contract term. 6563 */ 6564 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false) 6565 @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." ) 6566 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-action") 6567 protected CodeableConcept type; 6568 6569 /** 6570 * Entity of the action. 6571 */ 6572 @Child(name = "subject", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6573 @Description(shortDefinition="Entity of the action", formalDefinition="Entity of the action." ) 6574 protected List<ActionSubjectComponent> subject; 6575 6576 /** 6577 * Reason or purpose for the action stipulated by this Contract Provision. 6578 */ 6579 @Child(name = "intent", type = {CodeableConcept.class}, order=4, min=1, max=1, modifier=false, summary=false) 6580 @Description(shortDefinition="Purpose for the Contract Term Action", formalDefinition="Reason or purpose for the action stipulated by this Contract Provision." ) 6581 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-PurposeOfUse") 6582 protected CodeableConcept intent; 6583 6584 /** 6585 * Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse. 6586 */ 6587 @Child(name = "linkId", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6588 @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." ) 6589 protected List<StringType> linkId; 6590 6591 /** 6592 * Current state of the term action. 6593 */ 6594 @Child(name = "status", type = {CodeableConcept.class}, order=6, min=1, max=1, modifier=false, summary=false) 6595 @Description(shortDefinition="State of the action", formalDefinition="Current state of the term action." ) 6596 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-actionstatus") 6597 protected CodeableConcept status; 6598 6599 /** 6600 * Encounter or Episode with primary association to specified term activity. 6601 */ 6602 @Child(name = "context", type = {Encounter.class, EpisodeOfCare.class}, order=7, min=0, max=1, modifier=false, summary=false) 6603 @Description(shortDefinition="Episode associated with action", formalDefinition="Encounter or Episode with primary association to specified term activity." ) 6604 protected Reference context; 6605 6606 /** 6607 * The actual object that is the target of the reference (Encounter or Episode with primary association to specified term activity.) 6608 */ 6609 protected Resource contextTarget; 6610 6611 /** 6612 * Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse. 6613 */ 6614 @Child(name = "contextLinkId", type = {StringType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6615 @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." ) 6616 protected List<StringType> contextLinkId; 6617 6618 /** 6619 * When action happens. 6620 */ 6621 @Child(name = "occurrence", type = {DateTimeType.class, Period.class, Timing.class}, order=9, min=0, max=1, modifier=false, summary=false) 6622 @Description(shortDefinition="When action happens", formalDefinition="When action happens." ) 6623 protected Type occurrence; 6624 6625 /** 6626 * Who or what initiated the action and has responsibility for its activation. 6627 */ 6628 @Child(name = "requester", type = {Patient.class, RelatedPerson.class, Practitioner.class, PractitionerRole.class, Device.class, Group.class, Organization.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6629 @Description(shortDefinition="Who asked for action", formalDefinition="Who or what initiated the action and has responsibility for its activation." ) 6630 protected List<Reference> requester; 6631 /** 6632 * The actual objects that are the target of the reference (Who or what initiated the action and has responsibility for its activation.) 6633 */ 6634 protected List<Resource> requesterTarget; 6635 6636 6637 /** 6638 * Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse. 6639 */ 6640 @Child(name = "requesterLinkId", type = {StringType.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6641 @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." ) 6642 protected List<StringType> requesterLinkId; 6643 6644 /** 6645 * The type of individual that is desired or required to perform or not perform the action. 6646 */ 6647 @Child(name = "performerType", type = {CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6648 @Description(shortDefinition="Kind of service performer", formalDefinition="The type of individual that is desired or required to perform or not perform the action." ) 6649 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/provenance-agent-type") 6650 protected List<CodeableConcept> performerType; 6651 6652 /** 6653 * The type of role or competency of an individual desired or required to perform or not perform the action. 6654 */ 6655 @Child(name = "performerRole", type = {CodeableConcept.class}, order=13, min=0, max=1, modifier=false, summary=false) 6656 @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." ) 6657 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/provenance-agent-role") 6658 protected CodeableConcept performerRole; 6659 6660 /** 6661 * Indicates who or what is being asked to perform (or not perform) the ction. 6662 */ 6663 @Child(name = "performer", type = {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) 6664 @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." ) 6665 protected Reference performer; 6666 6667 /** 6668 * The actual object that is the target of the reference (Indicates who or what is being asked to perform (or not perform) the ction.) 6669 */ 6670 protected Resource performerTarget; 6671 6672 /** 6673 * Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse. 6674 */ 6675 @Child(name = "performerLinkId", type = {StringType.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6676 @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." ) 6677 protected List<StringType> performerLinkId; 6678 6679 /** 6680 * Rationale for the action to be performed or not performed. Describes why the action is permitted or prohibited. 6681 */ 6682 @Child(name = "reasonCode", type = {CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6683 @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." ) 6684 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-PurposeOfUse") 6685 protected List<CodeableConcept> reasonCode; 6686 6687 /** 6688 * Indicates another resource whose existence justifies permitting or not permitting this action. 6689 */ 6690 @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) 6691 @Description(shortDefinition="Why is action (not) needed?", formalDefinition="Indicates another resource whose existence justifies permitting or not permitting this action." ) 6692 protected List<Reference> reasonReference; 6693 /** 6694 * The actual objects that are the target of the reference (Indicates another resource whose existence justifies permitting or not permitting this action.) 6695 */ 6696 protected List<Resource> reasonReferenceTarget; 6697 6698 6699 /** 6700 * Describes why the action is to be performed or not performed in textual form. 6701 */ 6702 @Child(name = "reason", type = {StringType.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6703 @Description(shortDefinition="Why action is to be performed", formalDefinition="Describes why the action is to be performed or not performed in textual form." ) 6704 protected List<StringType> reason; 6705 6706 /** 6707 * Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse. 6708 */ 6709 @Child(name = "reasonLinkId", type = {StringType.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6710 @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." ) 6711 protected List<StringType> reasonLinkId; 6712 6713 /** 6714 * Comments made about the term action made by the requester, performer, subject or other participants. 6715 */ 6716 @Child(name = "note", type = {Annotation.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6717 @Description(shortDefinition="Comments about the action", formalDefinition="Comments made about the term action made by the requester, performer, subject or other participants." ) 6718 protected List<Annotation> note; 6719 6720 /** 6721 * Security labels that protects the action. 6722 */ 6723 @Child(name = "securityLabelNumber", type = {UnsignedIntType.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6724 @Description(shortDefinition="Action restriction numbers", formalDefinition="Security labels that protects the action." ) 6725 protected List<UnsignedIntType> securityLabelNumber; 6726 6727 private static final long serialVersionUID = -178728180L; 6728 6729 /** 6730 * Constructor 6731 */ 6732 public ActionComponent() { 6733 super(); 6734 } 6735 6736 /** 6737 * Constructor 6738 */ 6739 public ActionComponent(CodeableConcept type, CodeableConcept intent, CodeableConcept status) { 6740 super(); 6741 this.type = type; 6742 this.intent = intent; 6743 this.status = status; 6744 } 6745 6746 /** 6747 * @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 6748 */ 6749 public BooleanType getDoNotPerformElement() { 6750 if (this.doNotPerform == null) 6751 if (Configuration.errorOnAutoCreate()) 6752 throw new Error("Attempt to auto-create ActionComponent.doNotPerform"); 6753 else if (Configuration.doAutoCreate()) 6754 this.doNotPerform = new BooleanType(); // bb 6755 return this.doNotPerform; 6756 } 6757 6758 public boolean hasDoNotPerformElement() { 6759 return this.doNotPerform != null && !this.doNotPerform.isEmpty(); 6760 } 6761 6762 public boolean hasDoNotPerform() { 6763 return this.doNotPerform != null && !this.doNotPerform.isEmpty(); 6764 } 6765 6766 /** 6767 * @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 6768 */ 6769 public ActionComponent setDoNotPerformElement(BooleanType value) { 6770 this.doNotPerform = value; 6771 return this; 6772 } 6773 6774 /** 6775 * @return True if the term prohibits the action. 6776 */ 6777 public boolean getDoNotPerform() { 6778 return this.doNotPerform == null || this.doNotPerform.isEmpty() ? false : this.doNotPerform.getValue(); 6779 } 6780 6781 /** 6782 * @param value True if the term prohibits the action. 6783 */ 6784 public ActionComponent setDoNotPerform(boolean value) { 6785 if (this.doNotPerform == null) 6786 this.doNotPerform = new BooleanType(); 6787 this.doNotPerform.setValue(value); 6788 return this; 6789 } 6790 6791 /** 6792 * @return {@link #type} (Activity or service obligation to be done or not done, performed or not performed, effectuated or not by this Contract term.) 6793 */ 6794 public CodeableConcept getType() { 6795 if (this.type == null) 6796 if (Configuration.errorOnAutoCreate()) 6797 throw new Error("Attempt to auto-create ActionComponent.type"); 6798 else if (Configuration.doAutoCreate()) 6799 this.type = new CodeableConcept(); // cc 6800 return this.type; 6801 } 6802 6803 public boolean hasType() { 6804 return this.type != null && !this.type.isEmpty(); 6805 } 6806 6807 /** 6808 * @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.) 6809 */ 6810 public ActionComponent setType(CodeableConcept value) { 6811 this.type = value; 6812 return this; 6813 } 6814 6815 /** 6816 * @return {@link #subject} (Entity of the action.) 6817 */ 6818 public List<ActionSubjectComponent> getSubject() { 6819 if (this.subject == null) 6820 this.subject = new ArrayList<ActionSubjectComponent>(); 6821 return this.subject; 6822 } 6823 6824 /** 6825 * @return Returns a reference to <code>this</code> for easy method chaining 6826 */ 6827 public ActionComponent setSubject(List<ActionSubjectComponent> theSubject) { 6828 this.subject = theSubject; 6829 return this; 6830 } 6831 6832 public boolean hasSubject() { 6833 if (this.subject == null) 6834 return false; 6835 for (ActionSubjectComponent item : this.subject) 6836 if (!item.isEmpty()) 6837 return true; 6838 return false; 6839 } 6840 6841 public ActionSubjectComponent addSubject() { //3 6842 ActionSubjectComponent t = new ActionSubjectComponent(); 6843 if (this.subject == null) 6844 this.subject = new ArrayList<ActionSubjectComponent>(); 6845 this.subject.add(t); 6846 return t; 6847 } 6848 6849 public ActionComponent addSubject(ActionSubjectComponent t) { //3 6850 if (t == null) 6851 return this; 6852 if (this.subject == null) 6853 this.subject = new ArrayList<ActionSubjectComponent>(); 6854 this.subject.add(t); 6855 return this; 6856 } 6857 6858 /** 6859 * @return The first repetition of repeating field {@link #subject}, creating it if it does not already exist 6860 */ 6861 public ActionSubjectComponent getSubjectFirstRep() { 6862 if (getSubject().isEmpty()) { 6863 addSubject(); 6864 } 6865 return getSubject().get(0); 6866 } 6867 6868 /** 6869 * @return {@link #intent} (Reason or purpose for the action stipulated by this Contract Provision.) 6870 */ 6871 public CodeableConcept getIntent() { 6872 if (this.intent == null) 6873 if (Configuration.errorOnAutoCreate()) 6874 throw new Error("Attempt to auto-create ActionComponent.intent"); 6875 else if (Configuration.doAutoCreate()) 6876 this.intent = new CodeableConcept(); // cc 6877 return this.intent; 6878 } 6879 6880 public boolean hasIntent() { 6881 return this.intent != null && !this.intent.isEmpty(); 6882 } 6883 6884 /** 6885 * @param value {@link #intent} (Reason or purpose for the action stipulated by this Contract Provision.) 6886 */ 6887 public ActionComponent setIntent(CodeableConcept value) { 6888 this.intent = value; 6889 return this; 6890 } 6891 6892 /** 6893 * @return {@link #linkId} (Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.) 6894 */ 6895 public List<StringType> getLinkId() { 6896 if (this.linkId == null) 6897 this.linkId = new ArrayList<StringType>(); 6898 return this.linkId; 6899 } 6900 6901 /** 6902 * @return Returns a reference to <code>this</code> for easy method chaining 6903 */ 6904 public ActionComponent setLinkId(List<StringType> theLinkId) { 6905 this.linkId = theLinkId; 6906 return this; 6907 } 6908 6909 public boolean hasLinkId() { 6910 if (this.linkId == null) 6911 return false; 6912 for (StringType item : this.linkId) 6913 if (!item.isEmpty()) 6914 return true; 6915 return false; 6916 } 6917 6918 /** 6919 * @return {@link #linkId} (Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.) 6920 */ 6921 public StringType addLinkIdElement() {//2 6922 StringType t = new StringType(); 6923 if (this.linkId == null) 6924 this.linkId = new ArrayList<StringType>(); 6925 this.linkId.add(t); 6926 return t; 6927 } 6928 6929 /** 6930 * @param value {@link #linkId} (Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.) 6931 */ 6932 public ActionComponent addLinkId(String value) { //1 6933 StringType t = new StringType(); 6934 t.setValue(value); 6935 if (this.linkId == null) 6936 this.linkId = new ArrayList<StringType>(); 6937 this.linkId.add(t); 6938 return this; 6939 } 6940 6941 /** 6942 * @param value {@link #linkId} (Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.) 6943 */ 6944 public boolean hasLinkId(String value) { 6945 if (this.linkId == null) 6946 return false; 6947 for (StringType v : this.linkId) 6948 if (v.getValue().equals(value)) // string 6949 return true; 6950 return false; 6951 } 6952 6953 /** 6954 * @return {@link #status} (Current state of the term action.) 6955 */ 6956 public CodeableConcept getStatus() { 6957 if (this.status == null) 6958 if (Configuration.errorOnAutoCreate()) 6959 throw new Error("Attempt to auto-create ActionComponent.status"); 6960 else if (Configuration.doAutoCreate()) 6961 this.status = new CodeableConcept(); // cc 6962 return this.status; 6963 } 6964 6965 public boolean hasStatus() { 6966 return this.status != null && !this.status.isEmpty(); 6967 } 6968 6969 /** 6970 * @param value {@link #status} (Current state of the term action.) 6971 */ 6972 public ActionComponent setStatus(CodeableConcept value) { 6973 this.status = value; 6974 return this; 6975 } 6976 6977 /** 6978 * @return {@link #context} (Encounter or Episode with primary association to specified term activity.) 6979 */ 6980 public Reference getContext() { 6981 if (this.context == null) 6982 if (Configuration.errorOnAutoCreate()) 6983 throw new Error("Attempt to auto-create ActionComponent.context"); 6984 else if (Configuration.doAutoCreate()) 6985 this.context = new Reference(); // cc 6986 return this.context; 6987 } 6988 6989 public boolean hasContext() { 6990 return this.context != null && !this.context.isEmpty(); 6991 } 6992 6993 /** 6994 * @param value {@link #context} (Encounter or Episode with primary association to specified term activity.) 6995 */ 6996 public ActionComponent setContext(Reference value) { 6997 this.context = value; 6998 return this; 6999 } 7000 7001 /** 7002 * @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.) 7003 */ 7004 public Resource getContextTarget() { 7005 return this.contextTarget; 7006 } 7007 7008 /** 7009 * @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.) 7010 */ 7011 public ActionComponent setContextTarget(Resource value) { 7012 this.contextTarget = value; 7013 return this; 7014 } 7015 7016 /** 7017 * @return {@link #contextLinkId} (Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.) 7018 */ 7019 public List<StringType> getContextLinkId() { 7020 if (this.contextLinkId == null) 7021 this.contextLinkId = new ArrayList<StringType>(); 7022 return this.contextLinkId; 7023 } 7024 7025 /** 7026 * @return Returns a reference to <code>this</code> for easy method chaining 7027 */ 7028 public ActionComponent setContextLinkId(List<StringType> theContextLinkId) { 7029 this.contextLinkId = theContextLinkId; 7030 return this; 7031 } 7032 7033 public boolean hasContextLinkId() { 7034 if (this.contextLinkId == null) 7035 return false; 7036 for (StringType item : this.contextLinkId) 7037 if (!item.isEmpty()) 7038 return true; 7039 return false; 7040 } 7041 7042 /** 7043 * @return {@link #contextLinkId} (Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.) 7044 */ 7045 public StringType addContextLinkIdElement() {//2 7046 StringType t = new StringType(); 7047 if (this.contextLinkId == null) 7048 this.contextLinkId = new ArrayList<StringType>(); 7049 this.contextLinkId.add(t); 7050 return t; 7051 } 7052 7053 /** 7054 * @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.) 7055 */ 7056 public ActionComponent addContextLinkId(String value) { //1 7057 StringType t = new StringType(); 7058 t.setValue(value); 7059 if (this.contextLinkId == null) 7060 this.contextLinkId = new ArrayList<StringType>(); 7061 this.contextLinkId.add(t); 7062 return this; 7063 } 7064 7065 /** 7066 * @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.) 7067 */ 7068 public boolean hasContextLinkId(String value) { 7069 if (this.contextLinkId == null) 7070 return false; 7071 for (StringType v : this.contextLinkId) 7072 if (v.getValue().equals(value)) // string 7073 return true; 7074 return false; 7075 } 7076 7077 /** 7078 * @return {@link #occurrence} (When action happens.) 7079 */ 7080 public Type getOccurrence() { 7081 return this.occurrence; 7082 } 7083 7084 /** 7085 * @return {@link #occurrence} (When action happens.) 7086 */ 7087 public DateTimeType getOccurrenceDateTimeType() throws FHIRException { 7088 if (this.occurrence == null) 7089 this.occurrence = new DateTimeType(); 7090 if (!(this.occurrence instanceof DateTimeType)) 7091 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 7092 return (DateTimeType) this.occurrence; 7093 } 7094 7095 public boolean hasOccurrenceDateTimeType() { 7096 return this != null && this.occurrence instanceof DateTimeType; 7097 } 7098 7099 /** 7100 * @return {@link #occurrence} (When action happens.) 7101 */ 7102 public Period getOccurrencePeriod() throws FHIRException { 7103 if (this.occurrence == null) 7104 this.occurrence = new Period(); 7105 if (!(this.occurrence instanceof Period)) 7106 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 7107 return (Period) this.occurrence; 7108 } 7109 7110 public boolean hasOccurrencePeriod() { 7111 return this != null && this.occurrence instanceof Period; 7112 } 7113 7114 /** 7115 * @return {@link #occurrence} (When action happens.) 7116 */ 7117 public Timing getOccurrenceTiming() throws FHIRException { 7118 if (this.occurrence == null) 7119 this.occurrence = new Timing(); 7120 if (!(this.occurrence instanceof Timing)) 7121 throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 7122 return (Timing) this.occurrence; 7123 } 7124 7125 public boolean hasOccurrenceTiming() { 7126 return this != null && this.occurrence instanceof Timing; 7127 } 7128 7129 public boolean hasOccurrence() { 7130 return this.occurrence != null && !this.occurrence.isEmpty(); 7131 } 7132 7133 /** 7134 * @param value {@link #occurrence} (When action happens.) 7135 */ 7136 public ActionComponent setOccurrence(Type value) { 7137 if (value != null && !(value instanceof DateTimeType || value instanceof Period || value instanceof Timing)) 7138 throw new Error("Not the right type for Contract.term.action.occurrence[x]: "+value.fhirType()); 7139 this.occurrence = value; 7140 return this; 7141 } 7142 7143 /** 7144 * @return {@link #requester} (Who or what initiated the action and has responsibility for its activation.) 7145 */ 7146 public List<Reference> getRequester() { 7147 if (this.requester == null) 7148 this.requester = new ArrayList<Reference>(); 7149 return this.requester; 7150 } 7151 7152 /** 7153 * @return Returns a reference to <code>this</code> for easy method chaining 7154 */ 7155 public ActionComponent setRequester(List<Reference> theRequester) { 7156 this.requester = theRequester; 7157 return this; 7158 } 7159 7160 public boolean hasRequester() { 7161 if (this.requester == null) 7162 return false; 7163 for (Reference item : this.requester) 7164 if (!item.isEmpty()) 7165 return true; 7166 return false; 7167 } 7168 7169 public Reference addRequester() { //3 7170 Reference t = new Reference(); 7171 if (this.requester == null) 7172 this.requester = new ArrayList<Reference>(); 7173 this.requester.add(t); 7174 return t; 7175 } 7176 7177 public ActionComponent addRequester(Reference t) { //3 7178 if (t == null) 7179 return this; 7180 if (this.requester == null) 7181 this.requester = new ArrayList<Reference>(); 7182 this.requester.add(t); 7183 return this; 7184 } 7185 7186 /** 7187 * @return The first repetition of repeating field {@link #requester}, creating it if it does not already exist 7188 */ 7189 public Reference getRequesterFirstRep() { 7190 if (getRequester().isEmpty()) { 7191 addRequester(); 7192 } 7193 return getRequester().get(0); 7194 } 7195 7196 /** 7197 * @deprecated Use Reference#setResource(IBaseResource) instead 7198 */ 7199 @Deprecated 7200 public List<Resource> getRequesterTarget() { 7201 if (this.requesterTarget == null) 7202 this.requesterTarget = new ArrayList<Resource>(); 7203 return this.requesterTarget; 7204 } 7205 7206 /** 7207 * @return {@link #requesterLinkId} (Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.) 7208 */ 7209 public List<StringType> getRequesterLinkId() { 7210 if (this.requesterLinkId == null) 7211 this.requesterLinkId = new ArrayList<StringType>(); 7212 return this.requesterLinkId; 7213 } 7214 7215 /** 7216 * @return Returns a reference to <code>this</code> for easy method chaining 7217 */ 7218 public ActionComponent setRequesterLinkId(List<StringType> theRequesterLinkId) { 7219 this.requesterLinkId = theRequesterLinkId; 7220 return this; 7221 } 7222 7223 public boolean hasRequesterLinkId() { 7224 if (this.requesterLinkId == null) 7225 return false; 7226 for (StringType item : this.requesterLinkId) 7227 if (!item.isEmpty()) 7228 return true; 7229 return false; 7230 } 7231 7232 /** 7233 * @return {@link #requesterLinkId} (Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.) 7234 */ 7235 public StringType addRequesterLinkIdElement() {//2 7236 StringType t = new StringType(); 7237 if (this.requesterLinkId == null) 7238 this.requesterLinkId = new ArrayList<StringType>(); 7239 this.requesterLinkId.add(t); 7240 return t; 7241 } 7242 7243 /** 7244 * @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.) 7245 */ 7246 public ActionComponent addRequesterLinkId(String value) { //1 7247 StringType t = new StringType(); 7248 t.setValue(value); 7249 if (this.requesterLinkId == null) 7250 this.requesterLinkId = new ArrayList<StringType>(); 7251 this.requesterLinkId.add(t); 7252 return this; 7253 } 7254 7255 /** 7256 * @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.) 7257 */ 7258 public boolean hasRequesterLinkId(String value) { 7259 if (this.requesterLinkId == null) 7260 return false; 7261 for (StringType v : this.requesterLinkId) 7262 if (v.getValue().equals(value)) // string 7263 return true; 7264 return false; 7265 } 7266 7267 /** 7268 * @return {@link #performerType} (The type of individual that is desired or required to perform or not perform the action.) 7269 */ 7270 public List<CodeableConcept> getPerformerType() { 7271 if (this.performerType == null) 7272 this.performerType = new ArrayList<CodeableConcept>(); 7273 return this.performerType; 7274 } 7275 7276 /** 7277 * @return Returns a reference to <code>this</code> for easy method chaining 7278 */ 7279 public ActionComponent setPerformerType(List<CodeableConcept> thePerformerType) { 7280 this.performerType = thePerformerType; 7281 return this; 7282 } 7283 7284 public boolean hasPerformerType() { 7285 if (this.performerType == null) 7286 return false; 7287 for (CodeableConcept item : this.performerType) 7288 if (!item.isEmpty()) 7289 return true; 7290 return false; 7291 } 7292 7293 public CodeableConcept addPerformerType() { //3 7294 CodeableConcept t = new CodeableConcept(); 7295 if (this.performerType == null) 7296 this.performerType = new ArrayList<CodeableConcept>(); 7297 this.performerType.add(t); 7298 return t; 7299 } 7300 7301 public ActionComponent addPerformerType(CodeableConcept t) { //3 7302 if (t == null) 7303 return this; 7304 if (this.performerType == null) 7305 this.performerType = new ArrayList<CodeableConcept>(); 7306 this.performerType.add(t); 7307 return this; 7308 } 7309 7310 /** 7311 * @return The first repetition of repeating field {@link #performerType}, creating it if it does not already exist 7312 */ 7313 public CodeableConcept getPerformerTypeFirstRep() { 7314 if (getPerformerType().isEmpty()) { 7315 addPerformerType(); 7316 } 7317 return getPerformerType().get(0); 7318 } 7319 7320 /** 7321 * @return {@link #performerRole} (The type of role or competency of an individual desired or required to perform or not perform the action.) 7322 */ 7323 public CodeableConcept getPerformerRole() { 7324 if (this.performerRole == null) 7325 if (Configuration.errorOnAutoCreate()) 7326 throw new Error("Attempt to auto-create ActionComponent.performerRole"); 7327 else if (Configuration.doAutoCreate()) 7328 this.performerRole = new CodeableConcept(); // cc 7329 return this.performerRole; 7330 } 7331 7332 public boolean hasPerformerRole() { 7333 return this.performerRole != null && !this.performerRole.isEmpty(); 7334 } 7335 7336 /** 7337 * @param value {@link #performerRole} (The type of role or competency of an individual desired or required to perform or not perform the action.) 7338 */ 7339 public ActionComponent setPerformerRole(CodeableConcept value) { 7340 this.performerRole = value; 7341 return this; 7342 } 7343 7344 /** 7345 * @return {@link #performer} (Indicates who or what is being asked to perform (or not perform) the ction.) 7346 */ 7347 public Reference getPerformer() { 7348 if (this.performer == null) 7349 if (Configuration.errorOnAutoCreate()) 7350 throw new Error("Attempt to auto-create ActionComponent.performer"); 7351 else if (Configuration.doAutoCreate()) 7352 this.performer = new Reference(); // cc 7353 return this.performer; 7354 } 7355 7356 public boolean hasPerformer() { 7357 return this.performer != null && !this.performer.isEmpty(); 7358 } 7359 7360 /** 7361 * @param value {@link #performer} (Indicates who or what is being asked to perform (or not perform) the ction.) 7362 */ 7363 public ActionComponent setPerformer(Reference value) { 7364 this.performer = value; 7365 return this; 7366 } 7367 7368 /** 7369 * @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.) 7370 */ 7371 public Resource getPerformerTarget() { 7372 return this.performerTarget; 7373 } 7374 7375 /** 7376 * @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.) 7377 */ 7378 public ActionComponent setPerformerTarget(Resource value) { 7379 this.performerTarget = value; 7380 return this; 7381 } 7382 7383 /** 7384 * @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.) 7385 */ 7386 public List<StringType> getPerformerLinkId() { 7387 if (this.performerLinkId == null) 7388 this.performerLinkId = new ArrayList<StringType>(); 7389 return this.performerLinkId; 7390 } 7391 7392 /** 7393 * @return Returns a reference to <code>this</code> for easy method chaining 7394 */ 7395 public ActionComponent setPerformerLinkId(List<StringType> thePerformerLinkId) { 7396 this.performerLinkId = thePerformerLinkId; 7397 return this; 7398 } 7399 7400 public boolean hasPerformerLinkId() { 7401 if (this.performerLinkId == null) 7402 return false; 7403 for (StringType item : this.performerLinkId) 7404 if (!item.isEmpty()) 7405 return true; 7406 return false; 7407 } 7408 7409 /** 7410 * @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.) 7411 */ 7412 public StringType addPerformerLinkIdElement() {//2 7413 StringType t = new StringType(); 7414 if (this.performerLinkId == null) 7415 this.performerLinkId = new ArrayList<StringType>(); 7416 this.performerLinkId.add(t); 7417 return t; 7418 } 7419 7420 /** 7421 * @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.) 7422 */ 7423 public ActionComponent addPerformerLinkId(String value) { //1 7424 StringType t = new StringType(); 7425 t.setValue(value); 7426 if (this.performerLinkId == null) 7427 this.performerLinkId = new ArrayList<StringType>(); 7428 this.performerLinkId.add(t); 7429 return this; 7430 } 7431 7432 /** 7433 * @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.) 7434 */ 7435 public boolean hasPerformerLinkId(String value) { 7436 if (this.performerLinkId == null) 7437 return false; 7438 for (StringType v : this.performerLinkId) 7439 if (v.getValue().equals(value)) // string 7440 return true; 7441 return false; 7442 } 7443 7444 /** 7445 * @return {@link #reasonCode} (Rationale for the action to be performed or not performed. Describes why the action is permitted or prohibited.) 7446 */ 7447 public List<CodeableConcept> getReasonCode() { 7448 if (this.reasonCode == null) 7449 this.reasonCode = new ArrayList<CodeableConcept>(); 7450 return this.reasonCode; 7451 } 7452 7453 /** 7454 * @return Returns a reference to <code>this</code> for easy method chaining 7455 */ 7456 public ActionComponent setReasonCode(List<CodeableConcept> theReasonCode) { 7457 this.reasonCode = theReasonCode; 7458 return this; 7459 } 7460 7461 public boolean hasReasonCode() { 7462 if (this.reasonCode == null) 7463 return false; 7464 for (CodeableConcept item : this.reasonCode) 7465 if (!item.isEmpty()) 7466 return true; 7467 return false; 7468 } 7469 7470 public CodeableConcept addReasonCode() { //3 7471 CodeableConcept t = new CodeableConcept(); 7472 if (this.reasonCode == null) 7473 this.reasonCode = new ArrayList<CodeableConcept>(); 7474 this.reasonCode.add(t); 7475 return t; 7476 } 7477 7478 public ActionComponent addReasonCode(CodeableConcept t) { //3 7479 if (t == null) 7480 return this; 7481 if (this.reasonCode == null) 7482 this.reasonCode = new ArrayList<CodeableConcept>(); 7483 this.reasonCode.add(t); 7484 return this; 7485 } 7486 7487 /** 7488 * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist 7489 */ 7490 public CodeableConcept getReasonCodeFirstRep() { 7491 if (getReasonCode().isEmpty()) { 7492 addReasonCode(); 7493 } 7494 return getReasonCode().get(0); 7495 } 7496 7497 /** 7498 * @return {@link #reasonReference} (Indicates another resource whose existence justifies permitting or not permitting this action.) 7499 */ 7500 public List<Reference> getReasonReference() { 7501 if (this.reasonReference == null) 7502 this.reasonReference = new ArrayList<Reference>(); 7503 return this.reasonReference; 7504 } 7505 7506 /** 7507 * @return Returns a reference to <code>this</code> for easy method chaining 7508 */ 7509 public ActionComponent setReasonReference(List<Reference> theReasonReference) { 7510 this.reasonReference = theReasonReference; 7511 return this; 7512 } 7513 7514 public boolean hasReasonReference() { 7515 if (this.reasonReference == null) 7516 return false; 7517 for (Reference item : this.reasonReference) 7518 if (!item.isEmpty()) 7519 return true; 7520 return false; 7521 } 7522 7523 public Reference addReasonReference() { //3 7524 Reference t = new Reference(); 7525 if (this.reasonReference == null) 7526 this.reasonReference = new ArrayList<Reference>(); 7527 this.reasonReference.add(t); 7528 return t; 7529 } 7530 7531 public ActionComponent addReasonReference(Reference t) { //3 7532 if (t == null) 7533 return this; 7534 if (this.reasonReference == null) 7535 this.reasonReference = new ArrayList<Reference>(); 7536 this.reasonReference.add(t); 7537 return this; 7538 } 7539 7540 /** 7541 * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist 7542 */ 7543 public Reference getReasonReferenceFirstRep() { 7544 if (getReasonReference().isEmpty()) { 7545 addReasonReference(); 7546 } 7547 return getReasonReference().get(0); 7548 } 7549 7550 /** 7551 * @deprecated Use Reference#setResource(IBaseResource) instead 7552 */ 7553 @Deprecated 7554 public List<Resource> getReasonReferenceTarget() { 7555 if (this.reasonReferenceTarget == null) 7556 this.reasonReferenceTarget = new ArrayList<Resource>(); 7557 return this.reasonReferenceTarget; 7558 } 7559 7560 /** 7561 * @return {@link #reason} (Describes why the action is to be performed or not performed in textual form.) 7562 */ 7563 public List<StringType> getReason() { 7564 if (this.reason == null) 7565 this.reason = new ArrayList<StringType>(); 7566 return this.reason; 7567 } 7568 7569 /** 7570 * @return Returns a reference to <code>this</code> for easy method chaining 7571 */ 7572 public ActionComponent setReason(List<StringType> theReason) { 7573 this.reason = theReason; 7574 return this; 7575 } 7576 7577 public boolean hasReason() { 7578 if (this.reason == null) 7579 return false; 7580 for (StringType item : this.reason) 7581 if (!item.isEmpty()) 7582 return true; 7583 return false; 7584 } 7585 7586 /** 7587 * @return {@link #reason} (Describes why the action is to be performed or not performed in textual form.) 7588 */ 7589 public StringType addReasonElement() {//2 7590 StringType t = new StringType(); 7591 if (this.reason == null) 7592 this.reason = new ArrayList<StringType>(); 7593 this.reason.add(t); 7594 return t; 7595 } 7596 7597 /** 7598 * @param value {@link #reason} (Describes why the action is to be performed or not performed in textual form.) 7599 */ 7600 public ActionComponent addReason(String value) { //1 7601 StringType t = new StringType(); 7602 t.setValue(value); 7603 if (this.reason == null) 7604 this.reason = new ArrayList<StringType>(); 7605 this.reason.add(t); 7606 return this; 7607 } 7608 7609 /** 7610 * @param value {@link #reason} (Describes why the action is to be performed or not performed in textual form.) 7611 */ 7612 public boolean hasReason(String value) { 7613 if (this.reason == null) 7614 return false; 7615 for (StringType v : this.reason) 7616 if (v.getValue().equals(value)) // string 7617 return true; 7618 return false; 7619 } 7620 7621 /** 7622 * @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.) 7623 */ 7624 public List<StringType> getReasonLinkId() { 7625 if (this.reasonLinkId == null) 7626 this.reasonLinkId = new ArrayList<StringType>(); 7627 return this.reasonLinkId; 7628 } 7629 7630 /** 7631 * @return Returns a reference to <code>this</code> for easy method chaining 7632 */ 7633 public ActionComponent setReasonLinkId(List<StringType> theReasonLinkId) { 7634 this.reasonLinkId = theReasonLinkId; 7635 return this; 7636 } 7637 7638 public boolean hasReasonLinkId() { 7639 if (this.reasonLinkId == null) 7640 return false; 7641 for (StringType item : this.reasonLinkId) 7642 if (!item.isEmpty()) 7643 return true; 7644 return false; 7645 } 7646 7647 /** 7648 * @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.) 7649 */ 7650 public StringType addReasonLinkIdElement() {//2 7651 StringType t = new StringType(); 7652 if (this.reasonLinkId == null) 7653 this.reasonLinkId = new ArrayList<StringType>(); 7654 this.reasonLinkId.add(t); 7655 return t; 7656 } 7657 7658 /** 7659 * @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.) 7660 */ 7661 public ActionComponent addReasonLinkId(String value) { //1 7662 StringType t = new StringType(); 7663 t.setValue(value); 7664 if (this.reasonLinkId == null) 7665 this.reasonLinkId = new ArrayList<StringType>(); 7666 this.reasonLinkId.add(t); 7667 return this; 7668 } 7669 7670 /** 7671 * @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.) 7672 */ 7673 public boolean hasReasonLinkId(String value) { 7674 if (this.reasonLinkId == null) 7675 return false; 7676 for (StringType v : this.reasonLinkId) 7677 if (v.getValue().equals(value)) // string 7678 return true; 7679 return false; 7680 } 7681 7682 /** 7683 * @return {@link #note} (Comments made about the term action made by the requester, performer, subject or other participants.) 7684 */ 7685 public List<Annotation> getNote() { 7686 if (this.note == null) 7687 this.note = new ArrayList<Annotation>(); 7688 return this.note; 7689 } 7690 7691 /** 7692 * @return Returns a reference to <code>this</code> for easy method chaining 7693 */ 7694 public ActionComponent setNote(List<Annotation> theNote) { 7695 this.note = theNote; 7696 return this; 7697 } 7698 7699 public boolean hasNote() { 7700 if (this.note == null) 7701 return false; 7702 for (Annotation item : this.note) 7703 if (!item.isEmpty()) 7704 return true; 7705 return false; 7706 } 7707 7708 public Annotation addNote() { //3 7709 Annotation t = new Annotation(); 7710 if (this.note == null) 7711 this.note = new ArrayList<Annotation>(); 7712 this.note.add(t); 7713 return t; 7714 } 7715 7716 public ActionComponent addNote(Annotation t) { //3 7717 if (t == null) 7718 return this; 7719 if (this.note == null) 7720 this.note = new ArrayList<Annotation>(); 7721 this.note.add(t); 7722 return this; 7723 } 7724 7725 /** 7726 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist 7727 */ 7728 public Annotation getNoteFirstRep() { 7729 if (getNote().isEmpty()) { 7730 addNote(); 7731 } 7732 return getNote().get(0); 7733 } 7734 7735 /** 7736 * @return {@link #securityLabelNumber} (Security labels that protects the action.) 7737 */ 7738 public List<UnsignedIntType> getSecurityLabelNumber() { 7739 if (this.securityLabelNumber == null) 7740 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 7741 return this.securityLabelNumber; 7742 } 7743 7744 /** 7745 * @return Returns a reference to <code>this</code> for easy method chaining 7746 */ 7747 public ActionComponent setSecurityLabelNumber(List<UnsignedIntType> theSecurityLabelNumber) { 7748 this.securityLabelNumber = theSecurityLabelNumber; 7749 return this; 7750 } 7751 7752 public boolean hasSecurityLabelNumber() { 7753 if (this.securityLabelNumber == null) 7754 return false; 7755 for (UnsignedIntType item : this.securityLabelNumber) 7756 if (!item.isEmpty()) 7757 return true; 7758 return false; 7759 } 7760 7761 /** 7762 * @return {@link #securityLabelNumber} (Security labels that protects the action.) 7763 */ 7764 public UnsignedIntType addSecurityLabelNumberElement() {//2 7765 UnsignedIntType t = new UnsignedIntType(); 7766 if (this.securityLabelNumber == null) 7767 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 7768 this.securityLabelNumber.add(t); 7769 return t; 7770 } 7771 7772 /** 7773 * @param value {@link #securityLabelNumber} (Security labels that protects the action.) 7774 */ 7775 public ActionComponent addSecurityLabelNumber(int value) { //1 7776 UnsignedIntType t = new UnsignedIntType(); 7777 t.setValue(value); 7778 if (this.securityLabelNumber == null) 7779 this.securityLabelNumber = new ArrayList<UnsignedIntType>(); 7780 this.securityLabelNumber.add(t); 7781 return this; 7782 } 7783 7784 /** 7785 * @param value {@link #securityLabelNumber} (Security labels that protects the action.) 7786 */ 7787 public boolean hasSecurityLabelNumber(int value) { 7788 if (this.securityLabelNumber == null) 7789 return false; 7790 for (UnsignedIntType v : this.securityLabelNumber) 7791 if (v.getValue().equals(value)) // unsignedInt 7792 return true; 7793 return false; 7794 } 7795 7796 protected void listChildren(List<Property> children) { 7797 super.listChildren(children); 7798 children.add(new Property("doNotPerform", "boolean", "True if the term prohibits the action.", 0, 1, doNotPerform)); 7799 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)); 7800 children.add(new Property("subject", "", "Entity of the action.", 0, java.lang.Integer.MAX_VALUE, subject)); 7801 children.add(new Property("intent", "CodeableConcept", "Reason or purpose for the action stipulated by this Contract Provision.", 0, 1, intent)); 7802 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)); 7803 children.add(new Property("status", "CodeableConcept", "Current state of the term action.", 0, 1, status)); 7804 children.add(new Property("context", "Reference(Encounter|EpisodeOfCare)", "Encounter or Episode with primary association to specified term activity.", 0, 1, context)); 7805 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)); 7806 children.add(new Property("occurrence[x]", "dateTime|Period|Timing", "When action happens.", 0, 1, occurrence)); 7807 children.add(new Property("requester", "Reference(Patient|RelatedPerson|Practitioner|PractitionerRole|Device|Group|Organization)", "Who or what initiated the action and has responsibility for its activation.", 0, java.lang.Integer.MAX_VALUE, requester)); 7808 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)); 7809 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)); 7810 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)); 7811 children.add(new Property("performer", "Reference(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)); 7812 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)); 7813 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)); 7814 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)); 7815 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)); 7816 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)); 7817 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)); 7818 children.add(new Property("securityLabelNumber", "unsignedInt", "Security labels that protects the action.", 0, java.lang.Integer.MAX_VALUE, securityLabelNumber)); 7819 } 7820 7821 @Override 7822 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 7823 switch (_hash) { 7824 case -1788508167: /*doNotPerform*/ return new Property("doNotPerform", "boolean", "True if the term prohibits the action.", 0, 1, doNotPerform); 7825 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); 7826 case -1867885268: /*subject*/ return new Property("subject", "", "Entity of the action.", 0, java.lang.Integer.MAX_VALUE, subject); 7827 case -1183762788: /*intent*/ return new Property("intent", "CodeableConcept", "Reason or purpose for the action stipulated by this Contract Provision.", 0, 1, intent); 7828 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); 7829 case -892481550: /*status*/ return new Property("status", "CodeableConcept", "Current state of the term action.", 0, 1, status); 7830 case 951530927: /*context*/ return new Property("context", "Reference(Encounter|EpisodeOfCare)", "Encounter or Episode with primary association to specified term activity.", 0, 1, context); 7831 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); 7832 case -2022646513: /*occurrence[x]*/ return new Property("occurrence[x]", "dateTime|Period|Timing", "When action happens.", 0, 1, occurrence); 7833 case 1687874001: /*occurrence*/ return new Property("occurrence[x]", "dateTime|Period|Timing", "When action happens.", 0, 1, occurrence); 7834 case -298443636: /*occurrenceDateTime*/ return new Property("occurrence[x]", "dateTime|Period|Timing", "When action happens.", 0, 1, occurrence); 7835 case 1397156594: /*occurrencePeriod*/ return new Property("occurrence[x]", "dateTime|Period|Timing", "When action happens.", 0, 1, occurrence); 7836 case 1515218299: /*occurrenceTiming*/ return new Property("occurrence[x]", "dateTime|Period|Timing", "When action happens.", 0, 1, occurrence); 7837 case 693933948: /*requester*/ return new Property("requester", "Reference(Patient|RelatedPerson|Practitioner|PractitionerRole|Device|Group|Organization)", "Who or what initiated the action and has responsibility for its activation.", 0, java.lang.Integer.MAX_VALUE, requester); 7838 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); 7839 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); 7840 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); 7841 case 481140686: /*performer*/ return new Property("performer", "Reference(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); 7842 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); 7843 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); 7844 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); 7845 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); 7846 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); 7847 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); 7848 case -149460995: /*securityLabelNumber*/ return new Property("securityLabelNumber", "unsignedInt", "Security labels that protects the action.", 0, java.lang.Integer.MAX_VALUE, securityLabelNumber); 7849 default: return super.getNamedProperty(_hash, _name, _checkValid); 7850 } 7851 7852 } 7853 7854 @Override 7855 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7856 switch (hash) { 7857 case -1788508167: /*doNotPerform*/ return this.doNotPerform == null ? new Base[0] : new Base[] {this.doNotPerform}; // BooleanType 7858 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 7859 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : this.subject.toArray(new Base[this.subject.size()]); // ActionSubjectComponent 7860 case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // CodeableConcept 7861 case -1102667083: /*linkId*/ return this.linkId == null ? new Base[0] : this.linkId.toArray(new Base[this.linkId.size()]); // StringType 7862 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // CodeableConcept 7863 case 951530927: /*context*/ return this.context == null ? new Base[0] : new Base[] {this.context}; // Reference 7864 case -288783036: /*contextLinkId*/ return this.contextLinkId == null ? new Base[0] : this.contextLinkId.toArray(new Base[this.contextLinkId.size()]); // StringType 7865 case 1687874001: /*occurrence*/ return this.occurrence == null ? new Base[0] : new Base[] {this.occurrence}; // Type 7866 case 693933948: /*requester*/ return this.requester == null ? new Base[0] : this.requester.toArray(new Base[this.requester.size()]); // Reference 7867 case -1468032687: /*requesterLinkId*/ return this.requesterLinkId == null ? new Base[0] : this.requesterLinkId.toArray(new Base[this.requesterLinkId.size()]); // StringType 7868 case -901444568: /*performerType*/ return this.performerType == null ? new Base[0] : this.performerType.toArray(new Base[this.performerType.size()]); // CodeableConcept 7869 case -901513884: /*performerRole*/ return this.performerRole == null ? new Base[0] : new Base[] {this.performerRole}; // CodeableConcept 7870 case 481140686: /*performer*/ return this.performer == null ? new Base[0] : new Base[] {this.performer}; // Reference 7871 case 1051302947: /*performerLinkId*/ return this.performerLinkId == null ? new Base[0] : this.performerLinkId.toArray(new Base[this.performerLinkId.size()]); // StringType 7872 case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept 7873 case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference 7874 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // StringType 7875 case -1557963239: /*reasonLinkId*/ return this.reasonLinkId == null ? new Base[0] : this.reasonLinkId.toArray(new Base[this.reasonLinkId.size()]); // StringType 7876 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 7877 case -149460995: /*securityLabelNumber*/ return this.securityLabelNumber == null ? new Base[0] : this.securityLabelNumber.toArray(new Base[this.securityLabelNumber.size()]); // UnsignedIntType 7878 default: return super.getProperty(hash, name, checkValid); 7879 } 7880 7881 } 7882 7883 @Override 7884 public Base setProperty(int hash, String name, Base value) throws FHIRException { 7885 switch (hash) { 7886 case -1788508167: // doNotPerform 7887 this.doNotPerform = castToBoolean(value); // BooleanType 7888 return value; 7889 case 3575610: // type 7890 this.type = castToCodeableConcept(value); // CodeableConcept 7891 return value; 7892 case -1867885268: // subject 7893 this.getSubject().add((ActionSubjectComponent) value); // ActionSubjectComponent 7894 return value; 7895 case -1183762788: // intent 7896 this.intent = castToCodeableConcept(value); // CodeableConcept 7897 return value; 7898 case -1102667083: // linkId 7899 this.getLinkId().add(castToString(value)); // StringType 7900 return value; 7901 case -892481550: // status 7902 this.status = castToCodeableConcept(value); // CodeableConcept 7903 return value; 7904 case 951530927: // context 7905 this.context = castToReference(value); // Reference 7906 return value; 7907 case -288783036: // contextLinkId 7908 this.getContextLinkId().add(castToString(value)); // StringType 7909 return value; 7910 case 1687874001: // occurrence 7911 this.occurrence = castToType(value); // Type 7912 return value; 7913 case 693933948: // requester 7914 this.getRequester().add(castToReference(value)); // Reference 7915 return value; 7916 case -1468032687: // requesterLinkId 7917 this.getRequesterLinkId().add(castToString(value)); // StringType 7918 return value; 7919 case -901444568: // performerType 7920 this.getPerformerType().add(castToCodeableConcept(value)); // CodeableConcept 7921 return value; 7922 case -901513884: // performerRole 7923 this.performerRole = castToCodeableConcept(value); // CodeableConcept 7924 return value; 7925 case 481140686: // performer 7926 this.performer = castToReference(value); // Reference 7927 return value; 7928 case 1051302947: // performerLinkId 7929 this.getPerformerLinkId().add(castToString(value)); // StringType 7930 return value; 7931 case 722137681: // reasonCode 7932 this.getReasonCode().add(castToCodeableConcept(value)); // CodeableConcept 7933 return value; 7934 case -1146218137: // reasonReference 7935 this.getReasonReference().add(castToReference(value)); // Reference 7936 return value; 7937 case -934964668: // reason 7938 this.getReason().add(castToString(value)); // StringType 7939 return value; 7940 case -1557963239: // reasonLinkId 7941 this.getReasonLinkId().add(castToString(value)); // StringType 7942 return value; 7943 case 3387378: // note 7944 this.getNote().add(castToAnnotation(value)); // Annotation 7945 return value; 7946 case -149460995: // securityLabelNumber 7947 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); // UnsignedIntType 7948 return value; 7949 default: return super.setProperty(hash, name, value); 7950 } 7951 7952 } 7953 7954 @Override 7955 public Base setProperty(String name, Base value) throws FHIRException { 7956 if (name.equals("doNotPerform")) { 7957 this.doNotPerform = castToBoolean(value); // BooleanType 7958 } else if (name.equals("type")) { 7959 this.type = castToCodeableConcept(value); // CodeableConcept 7960 } else if (name.equals("subject")) { 7961 this.getSubject().add((ActionSubjectComponent) value); 7962 } else if (name.equals("intent")) { 7963 this.intent = castToCodeableConcept(value); // CodeableConcept 7964 } else if (name.equals("linkId")) { 7965 this.getLinkId().add(castToString(value)); 7966 } else if (name.equals("status")) { 7967 this.status = castToCodeableConcept(value); // CodeableConcept 7968 } else if (name.equals("context")) { 7969 this.context = castToReference(value); // Reference 7970 } else if (name.equals("contextLinkId")) { 7971 this.getContextLinkId().add(castToString(value)); 7972 } else if (name.equals("occurrence[x]")) { 7973 this.occurrence = castToType(value); // Type 7974 } else if (name.equals("requester")) { 7975 this.getRequester().add(castToReference(value)); 7976 } else if (name.equals("requesterLinkId")) { 7977 this.getRequesterLinkId().add(castToString(value)); 7978 } else if (name.equals("performerType")) { 7979 this.getPerformerType().add(castToCodeableConcept(value)); 7980 } else if (name.equals("performerRole")) { 7981 this.performerRole = castToCodeableConcept(value); // CodeableConcept 7982 } else if (name.equals("performer")) { 7983 this.performer = castToReference(value); // Reference 7984 } else if (name.equals("performerLinkId")) { 7985 this.getPerformerLinkId().add(castToString(value)); 7986 } else if (name.equals("reasonCode")) { 7987 this.getReasonCode().add(castToCodeableConcept(value)); 7988 } else if (name.equals("reasonReference")) { 7989 this.getReasonReference().add(castToReference(value)); 7990 } else if (name.equals("reason")) { 7991 this.getReason().add(castToString(value)); 7992 } else if (name.equals("reasonLinkId")) { 7993 this.getReasonLinkId().add(castToString(value)); 7994 } else if (name.equals("note")) { 7995 this.getNote().add(castToAnnotation(value)); 7996 } else if (name.equals("securityLabelNumber")) { 7997 this.getSecurityLabelNumber().add(castToUnsignedInt(value)); 7998 } else 7999 return super.setProperty(name, value); 8000 return value; 8001 } 8002 8003 @Override 8004 public Base makeProperty(int hash, String name) throws FHIRException { 8005 switch (hash) { 8006 case -1788508167: return getDoNotPerformElement(); 8007 case 3575610: return getType(); 8008 case -1867885268: return addSubject(); 8009 case -1183762788: return getIntent(); 8010 case -1102667083: return addLinkIdElement(); 8011 case -892481550: return getStatus(); 8012 case 951530927: return getContext(); 8013 case -288783036: return addContextLinkIdElement(); 8014 case -2022646513: return getOccurrence(); 8015 case 1687874001: return getOccurrence(); 8016 case 693933948: return addRequester(); 8017 case -1468032687: return addRequesterLinkIdElement(); 8018 case -901444568: return addPerformerType(); 8019 case -901513884: return getPerformerRole(); 8020 case 481140686: return getPerformer(); 8021 case 1051302947: return addPerformerLinkIdElement(); 8022 case 722137681: return addReasonCode(); 8023 case -1146218137: return addReasonReference(); 8024 case -934964668: return addReasonElement(); 8025 case -1557963239: return addReasonLinkIdElement(); 8026 case 3387378: return addNote(); 8027 case -149460995: return addSecurityLabelNumberElement(); 8028 default: return super.makeProperty(hash, name); 8029 } 8030 8031 } 8032 8033 @Override 8034 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8035 switch (hash) { 8036 case -1788508167: /*doNotPerform*/ return new String[] {"boolean"}; 8037 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 8038 case -1867885268: /*subject*/ return new String[] {}; 8039 case -1183762788: /*intent*/ return new String[] {"CodeableConcept"}; 8040 case -1102667083: /*linkId*/ return new String[] {"string"}; 8041 case -892481550: /*status*/ return new String[] {"CodeableConcept"}; 8042 case 951530927: /*context*/ return new String[] {"Reference"}; 8043 case -288783036: /*contextLinkId*/ return new String[] {"string"}; 8044 case 1687874001: /*occurrence*/ return new String[] {"dateTime", "Period", "Timing"}; 8045 case 693933948: /*requester*/ return new String[] {"Reference"}; 8046 case -1468032687: /*requesterLinkId*/ return new String[] {"string"}; 8047 case -901444568: /*performerType*/ return new String[] {"CodeableConcept"}; 8048 case -901513884: /*performerRole*/ return new String[] {"CodeableConcept"}; 8049 case 481140686: /*performer*/ return new String[] {"Reference"}; 8050 case 1051302947: /*performerLinkId*/ return new String[] {"string"}; 8051 case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"}; 8052 case -1146218137: /*reasonReference*/ return new String[] {"Reference"}; 8053 case -934964668: /*reason*/ return new String[] {"string"}; 8054 case -1557963239: /*reasonLinkId*/ return new String[] {"string"}; 8055 case 3387378: /*note*/ return new String[] {"Annotation"}; 8056 case -149460995: /*securityLabelNumber*/ return new String[] {"unsignedInt"}; 8057 default: return super.getTypesForProperty(hash, name); 8058 } 8059 8060 } 8061 8062 @Override 8063 public Base addChild(String name) throws FHIRException { 8064 if (name.equals("doNotPerform")) { 8065 throw new FHIRException("Cannot call addChild on a primitive type Contract.doNotPerform"); 8066 } 8067 else if (name.equals("type")) { 8068 this.type = new CodeableConcept(); 8069 return this.type; 8070 } 8071 else if (name.equals("subject")) { 8072 return addSubject(); 8073 } 8074 else if (name.equals("intent")) { 8075 this.intent = new CodeableConcept(); 8076 return this.intent; 8077 } 8078 else if (name.equals("linkId")) { 8079 throw new FHIRException("Cannot call addChild on a primitive type Contract.linkId"); 8080 } 8081 else if (name.equals("status")) { 8082 this.status = new CodeableConcept(); 8083 return this.status; 8084 } 8085 else if (name.equals("context")) { 8086 this.context = new Reference(); 8087 return this.context; 8088 } 8089 else if (name.equals("contextLinkId")) { 8090 throw new FHIRException("Cannot call addChild on a primitive type Contract.contextLinkId"); 8091 } 8092 else if (name.equals("occurrenceDateTime")) { 8093 this.occurrence = new DateTimeType(); 8094 return this.occurrence; 8095 } 8096 else if (name.equals("occurrencePeriod")) { 8097 this.occurrence = new Period(); 8098 return this.occurrence; 8099 } 8100 else if (name.equals("occurrenceTiming")) { 8101 this.occurrence = new Timing(); 8102 return this.occurrence; 8103 } 8104 else if (name.equals("requester")) { 8105 return addRequester(); 8106 } 8107 else if (name.equals("requesterLinkId")) { 8108 throw new FHIRException("Cannot call addChild on a primitive type Contract.requesterLinkId"); 8109 } 8110 else if (name.equals("performerType")) { 8111 return addPerformerType(); 8112 } 8113 else if (name.equals("performerRole")) { 8114 this.performerRole = new CodeableConcept(); 8115 return this.performerRole; 8116 } 8117 else if (name.equals("performer")) { 8118 this.performer = new Reference(); 8119 return this.performer; 8120 } 8121 else if (name.equals("performerLinkId")) { 8122 throw new FHIRException("Cannot call addChild on a primitive type Contract.performerLinkId"); 8123 } 8124 else if (name.equals("reasonCode")) { 8125 return addReasonCode(); 8126 } 8127 else if (name.equals("reasonReference")) { 8128 return addReasonReference(); 8129 } 8130 else if (name.equals("reason")) { 8131 throw new FHIRException("Cannot call addChild on a primitive type Contract.reason"); 8132 } 8133 else if (name.equals("reasonLinkId")) { 8134 throw new FHIRException("Cannot call addChild on a primitive type Contract.reasonLinkId"); 8135 } 8136 else if (name.equals("note")) { 8137 return addNote(); 8138 } 8139 else if (name.equals("securityLabelNumber")) { 8140 throw new FHIRException("Cannot call addChild on a primitive type Contract.securityLabelNumber"); 8141 } 8142 else 8143 return super.addChild(name); 8144 } 8145 8146 public ActionComponent copy() { 8147 ActionComponent dst = new ActionComponent(); 8148 copyValues(dst); 8149 dst.doNotPerform = doNotPerform == null ? null : doNotPerform.copy(); 8150 dst.type = type == null ? null : type.copy(); 8151 if (subject != null) { 8152 dst.subject = new ArrayList<ActionSubjectComponent>(); 8153 for (ActionSubjectComponent i : subject) 8154 dst.subject.add(i.copy()); 8155 }; 8156 dst.intent = intent == null ? null : intent.copy(); 8157 if (linkId != null) { 8158 dst.linkId = new ArrayList<StringType>(); 8159 for (StringType i : linkId) 8160 dst.linkId.add(i.copy()); 8161 }; 8162 dst.status = status == null ? null : status.copy(); 8163 dst.context = context == null ? null : context.copy(); 8164 if (contextLinkId != null) { 8165 dst.contextLinkId = new ArrayList<StringType>(); 8166 for (StringType i : contextLinkId) 8167 dst.contextLinkId.add(i.copy()); 8168 }; 8169 dst.occurrence = occurrence == null ? null : occurrence.copy(); 8170 if (requester != null) { 8171 dst.requester = new ArrayList<Reference>(); 8172 for (Reference i : requester) 8173 dst.requester.add(i.copy()); 8174 }; 8175 if (requesterLinkId != null) { 8176 dst.requesterLinkId = new ArrayList<StringType>(); 8177 for (StringType i : requesterLinkId) 8178 dst.requesterLinkId.add(i.copy()); 8179 }; 8180 if (performerType != null) { 8181 dst.performerType = new ArrayList<CodeableConcept>(); 8182 for (CodeableConcept i : performerType) 8183 dst.performerType.add(i.copy()); 8184 }; 8185 dst.performerRole = performerRole == null ? null : performerRole.copy(); 8186 dst.performer = performer == null ? null : performer.copy(); 8187 if (performerLinkId != null) { 8188 dst.performerLinkId = new ArrayList<StringType>(); 8189 for (StringType i : performerLinkId) 8190 dst.performerLinkId.add(i.copy()); 8191 }; 8192 if (reasonCode != null) { 8193 dst.reasonCode = new ArrayList<CodeableConcept>(); 8194 for (CodeableConcept i : reasonCode) 8195 dst.reasonCode.add(i.copy()); 8196 }; 8197 if (reasonReference != null) { 8198 dst.reasonReference = new ArrayList<Reference>(); 8199 for (Reference i : reasonReference) 8200 dst.reasonReference.add(i.copy()); 8201 }; 8202 if (reason != null) { 8203 dst.reason = new ArrayList<StringType>(); 8204 for (StringType i : reason) 8205 dst.reason.add(i.copy()); 8206 }; 8207 if (reasonLinkId != null) { 8208 dst.reasonLinkId = new ArrayList<StringType>(); 8209 for (StringType i : reasonLinkId) 8210 dst.reasonLinkId.add(i.copy()); 8211 }; 8212 if (note != null) { 8213 dst.note = new ArrayList<Annotation>(); 8214 for (Annotation i : note) 8215 dst.note.add(i.copy()); 8216 }; 8217 if (securityLabelNumber != null) { 8218 dst.securityLabelNumber = new ArrayList<UnsignedIntType>(); 8219 for (UnsignedIntType i : securityLabelNumber) 8220 dst.securityLabelNumber.add(i.copy()); 8221 }; 8222 return dst; 8223 } 8224 8225 @Override 8226 public boolean equalsDeep(Base other_) { 8227 if (!super.equalsDeep(other_)) 8228 return false; 8229 if (!(other_ instanceof ActionComponent)) 8230 return false; 8231 ActionComponent o = (ActionComponent) other_; 8232 return compareDeep(doNotPerform, o.doNotPerform, true) && compareDeep(type, o.type, true) && compareDeep(subject, o.subject, true) 8233 && compareDeep(intent, o.intent, true) && compareDeep(linkId, o.linkId, true) && compareDeep(status, o.status, true) 8234 && compareDeep(context, o.context, true) && compareDeep(contextLinkId, o.contextLinkId, true) && compareDeep(occurrence, o.occurrence, true) 8235 && compareDeep(requester, o.requester, true) && compareDeep(requesterLinkId, o.requesterLinkId, true) 8236 && compareDeep(performerType, o.performerType, true) && compareDeep(performerRole, o.performerRole, true) 8237 && compareDeep(performer, o.performer, true) && compareDeep(performerLinkId, o.performerLinkId, true) 8238 && compareDeep(reasonCode, o.reasonCode, true) && compareDeep(reasonReference, o.reasonReference, true) 8239 && compareDeep(reason, o.reason, true) && compareDeep(reasonLinkId, o.reasonLinkId, true) && compareDeep(note, o.note, true) 8240 && compareDeep(securityLabelNumber, o.securityLabelNumber, true); 8241 } 8242 8243 @Override 8244 public boolean equalsShallow(Base other_) { 8245 if (!super.equalsShallow(other_)) 8246 return false; 8247 if (!(other_ instanceof ActionComponent)) 8248 return false; 8249 ActionComponent o = (ActionComponent) other_; 8250 return compareValues(doNotPerform, o.doNotPerform, true) && compareValues(linkId, o.linkId, true) && compareValues(contextLinkId, o.contextLinkId, true) 8251 && compareValues(requesterLinkId, o.requesterLinkId, true) && compareValues(performerLinkId, o.performerLinkId, true) 8252 && compareValues(reason, o.reason, true) && compareValues(reasonLinkId, o.reasonLinkId, true) && compareValues(securityLabelNumber, o.securityLabelNumber, true) 8253 ; 8254 } 8255 8256 public boolean isEmpty() { 8257 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(doNotPerform, type, subject 8258 , intent, linkId, status, context, contextLinkId, occurrence, requester, requesterLinkId 8259 , performerType, performerRole, performer, performerLinkId, reasonCode, reasonReference 8260 , reason, reasonLinkId, note, securityLabelNumber); 8261 } 8262 8263 public String fhirType() { 8264 return "Contract.term.action"; 8265 8266 } 8267 8268 } 8269 8270 @Block() 8271 public static class ActionSubjectComponent extends BackboneElement implements IBaseBackboneElement { 8272 /** 8273 * The entity the action is performed or not performed on or for. 8274 */ 8275 @Child(name = "reference", type = {Patient.class, RelatedPerson.class, Practitioner.class, PractitionerRole.class, Device.class, Group.class, Organization.class}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8276 @Description(shortDefinition="Entity of the action", formalDefinition="The entity the action is performed or not performed on or for." ) 8277 protected List<Reference> reference; 8278 /** 8279 * The actual objects that are the target of the reference (The entity the action is performed or not performed on or for.) 8280 */ 8281 protected List<Resource> referenceTarget; 8282 8283 8284 /** 8285 * Role type of agent assigned roles in this Contract. 8286 */ 8287 @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 8288 @Description(shortDefinition="Role type of the agent", formalDefinition="Role type of agent assigned roles in this Contract." ) 8289 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-actorrole") 8290 protected CodeableConcept role; 8291 8292 private static final long serialVersionUID = 128949255L; 8293 8294 /** 8295 * Constructor 8296 */ 8297 public ActionSubjectComponent() { 8298 super(); 8299 } 8300 8301 /** 8302 * @return {@link #reference} (The entity the action is performed or not performed on or for.) 8303 */ 8304 public List<Reference> getReference() { 8305 if (this.reference == null) 8306 this.reference = new ArrayList<Reference>(); 8307 return this.reference; 8308 } 8309 8310 /** 8311 * @return Returns a reference to <code>this</code> for easy method chaining 8312 */ 8313 public ActionSubjectComponent setReference(List<Reference> theReference) { 8314 this.reference = theReference; 8315 return this; 8316 } 8317 8318 public boolean hasReference() { 8319 if (this.reference == null) 8320 return false; 8321 for (Reference item : this.reference) 8322 if (!item.isEmpty()) 8323 return true; 8324 return false; 8325 } 8326 8327 public Reference addReference() { //3 8328 Reference t = new Reference(); 8329 if (this.reference == null) 8330 this.reference = new ArrayList<Reference>(); 8331 this.reference.add(t); 8332 return t; 8333 } 8334 8335 public ActionSubjectComponent addReference(Reference t) { //3 8336 if (t == null) 8337 return this; 8338 if (this.reference == null) 8339 this.reference = new ArrayList<Reference>(); 8340 this.reference.add(t); 8341 return this; 8342 } 8343 8344 /** 8345 * @return The first repetition of repeating field {@link #reference}, creating it if it does not already exist 8346 */ 8347 public Reference getReferenceFirstRep() { 8348 if (getReference().isEmpty()) { 8349 addReference(); 8350 } 8351 return getReference().get(0); 8352 } 8353 8354 /** 8355 * @deprecated Use Reference#setResource(IBaseResource) instead 8356 */ 8357 @Deprecated 8358 public List<Resource> getReferenceTarget() { 8359 if (this.referenceTarget == null) 8360 this.referenceTarget = new ArrayList<Resource>(); 8361 return this.referenceTarget; 8362 } 8363 8364 /** 8365 * @return {@link #role} (Role type of agent assigned roles in this Contract.) 8366 */ 8367 public CodeableConcept getRole() { 8368 if (this.role == null) 8369 if (Configuration.errorOnAutoCreate()) 8370 throw new Error("Attempt to auto-create ActionSubjectComponent.role"); 8371 else if (Configuration.doAutoCreate()) 8372 this.role = new CodeableConcept(); // cc 8373 return this.role; 8374 } 8375 8376 public boolean hasRole() { 8377 return this.role != null && !this.role.isEmpty(); 8378 } 8379 8380 /** 8381 * @param value {@link #role} (Role type of agent assigned roles in this Contract.) 8382 */ 8383 public ActionSubjectComponent setRole(CodeableConcept value) { 8384 this.role = value; 8385 return this; 8386 } 8387 8388 protected void listChildren(List<Property> children) { 8389 super.listChildren(children); 8390 children.add(new Property("reference", "Reference(Patient|RelatedPerson|Practitioner|PractitionerRole|Device|Group|Organization)", "The entity the action is performed or not performed on or for.", 0, java.lang.Integer.MAX_VALUE, reference)); 8391 children.add(new Property("role", "CodeableConcept", "Role type of agent assigned roles in this Contract.", 0, 1, role)); 8392 } 8393 8394 @Override 8395 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 8396 switch (_hash) { 8397 case -925155509: /*reference*/ return new Property("reference", "Reference(Patient|RelatedPerson|Practitioner|PractitionerRole|Device|Group|Organization)", "The entity the action is performed or not performed on or for.", 0, java.lang.Integer.MAX_VALUE, reference); 8398 case 3506294: /*role*/ return new Property("role", "CodeableConcept", "Role type of agent assigned roles in this Contract.", 0, 1, role); 8399 default: return super.getNamedProperty(_hash, _name, _checkValid); 8400 } 8401 8402 } 8403 8404 @Override 8405 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8406 switch (hash) { 8407 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : this.reference.toArray(new Base[this.reference.size()]); // Reference 8408 case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept 8409 default: return super.getProperty(hash, name, checkValid); 8410 } 8411 8412 } 8413 8414 @Override 8415 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8416 switch (hash) { 8417 case -925155509: // reference 8418 this.getReference().add(castToReference(value)); // Reference 8419 return value; 8420 case 3506294: // role 8421 this.role = castToCodeableConcept(value); // CodeableConcept 8422 return value; 8423 default: return super.setProperty(hash, name, value); 8424 } 8425 8426 } 8427 8428 @Override 8429 public Base setProperty(String name, Base value) throws FHIRException { 8430 if (name.equals("reference")) { 8431 this.getReference().add(castToReference(value)); 8432 } else if (name.equals("role")) { 8433 this.role = castToCodeableConcept(value); // CodeableConcept 8434 } else 8435 return super.setProperty(name, value); 8436 return value; 8437 } 8438 8439 @Override 8440 public Base makeProperty(int hash, String name) throws FHIRException { 8441 switch (hash) { 8442 case -925155509: return addReference(); 8443 case 3506294: return getRole(); 8444 default: return super.makeProperty(hash, name); 8445 } 8446 8447 } 8448 8449 @Override 8450 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8451 switch (hash) { 8452 case -925155509: /*reference*/ return new String[] {"Reference"}; 8453 case 3506294: /*role*/ return new String[] {"CodeableConcept"}; 8454 default: return super.getTypesForProperty(hash, name); 8455 } 8456 8457 } 8458 8459 @Override 8460 public Base addChild(String name) throws FHIRException { 8461 if (name.equals("reference")) { 8462 return addReference(); 8463 } 8464 else if (name.equals("role")) { 8465 this.role = new CodeableConcept(); 8466 return this.role; 8467 } 8468 else 8469 return super.addChild(name); 8470 } 8471 8472 public ActionSubjectComponent copy() { 8473 ActionSubjectComponent dst = new ActionSubjectComponent(); 8474 copyValues(dst); 8475 if (reference != null) { 8476 dst.reference = new ArrayList<Reference>(); 8477 for (Reference i : reference) 8478 dst.reference.add(i.copy()); 8479 }; 8480 dst.role = role == null ? null : role.copy(); 8481 return dst; 8482 } 8483 8484 @Override 8485 public boolean equalsDeep(Base other_) { 8486 if (!super.equalsDeep(other_)) 8487 return false; 8488 if (!(other_ instanceof ActionSubjectComponent)) 8489 return false; 8490 ActionSubjectComponent o = (ActionSubjectComponent) other_; 8491 return compareDeep(reference, o.reference, true) && compareDeep(role, o.role, true); 8492 } 8493 8494 @Override 8495 public boolean equalsShallow(Base other_) { 8496 if (!super.equalsShallow(other_)) 8497 return false; 8498 if (!(other_ instanceof ActionSubjectComponent)) 8499 return false; 8500 ActionSubjectComponent o = (ActionSubjectComponent) other_; 8501 return true; 8502 } 8503 8504 public boolean isEmpty() { 8505 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(reference, role); 8506 } 8507 8508 public String fhirType() { 8509 return "Contract.term.action.subject"; 8510 8511 } 8512 8513 } 8514 8515 @Block() 8516 public static class SignatoryComponent extends BackboneElement implements IBaseBackboneElement { 8517 /** 8518 * Role of this Contract signer, e.g. notary, grantee. 8519 */ 8520 @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) 8521 @Description(shortDefinition="Contract Signatory Role", formalDefinition="Role of this Contract signer, e.g. notary, grantee." ) 8522 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-signer-type") 8523 protected Coding type; 8524 8525 /** 8526 * Party which is a signator to this Contract. 8527 */ 8528 @Child(name = "party", type = {Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class}, order=2, min=1, max=1, modifier=false, summary=false) 8529 @Description(shortDefinition="Contract Signatory Party", formalDefinition="Party which is a signator to this Contract." ) 8530 protected Reference party; 8531 8532 /** 8533 * The actual object that is the target of the reference (Party which is a signator to this Contract.) 8534 */ 8535 protected Resource partyTarget; 8536 8537 /** 8538 * Legally binding Contract DSIG signature contents in Base64. 8539 */ 8540 @Child(name = "signature", type = {Signature.class}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8541 @Description(shortDefinition="Contract Documentation Signature", formalDefinition="Legally binding Contract DSIG signature contents in Base64." ) 8542 protected List<Signature> signature; 8543 8544 private static final long serialVersionUID = 1948139228L; 8545 8546 /** 8547 * Constructor 8548 */ 8549 public SignatoryComponent() { 8550 super(); 8551 } 8552 8553 /** 8554 * Constructor 8555 */ 8556 public SignatoryComponent(Coding type, Reference party) { 8557 super(); 8558 this.type = type; 8559 this.party = party; 8560 } 8561 8562 /** 8563 * @return {@link #type} (Role of this Contract signer, e.g. notary, grantee.) 8564 */ 8565 public Coding getType() { 8566 if (this.type == null) 8567 if (Configuration.errorOnAutoCreate()) 8568 throw new Error("Attempt to auto-create SignatoryComponent.type"); 8569 else if (Configuration.doAutoCreate()) 8570 this.type = new Coding(); // cc 8571 return this.type; 8572 } 8573 8574 public boolean hasType() { 8575 return this.type != null && !this.type.isEmpty(); 8576 } 8577 8578 /** 8579 * @param value {@link #type} (Role of this Contract signer, e.g. notary, grantee.) 8580 */ 8581 public SignatoryComponent setType(Coding value) { 8582 this.type = value; 8583 return this; 8584 } 8585 8586 /** 8587 * @return {@link #party} (Party which is a signator to this Contract.) 8588 */ 8589 public Reference getParty() { 8590 if (this.party == null) 8591 if (Configuration.errorOnAutoCreate()) 8592 throw new Error("Attempt to auto-create SignatoryComponent.party"); 8593 else if (Configuration.doAutoCreate()) 8594 this.party = new Reference(); // cc 8595 return this.party; 8596 } 8597 8598 public boolean hasParty() { 8599 return this.party != null && !this.party.isEmpty(); 8600 } 8601 8602 /** 8603 * @param value {@link #party} (Party which is a signator to this Contract.) 8604 */ 8605 public SignatoryComponent setParty(Reference value) { 8606 this.party = value; 8607 return this; 8608 } 8609 8610 /** 8611 * @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.) 8612 */ 8613 public Resource getPartyTarget() { 8614 return this.partyTarget; 8615 } 8616 8617 /** 8618 * @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.) 8619 */ 8620 public SignatoryComponent setPartyTarget(Resource value) { 8621 this.partyTarget = value; 8622 return this; 8623 } 8624 8625 /** 8626 * @return {@link #signature} (Legally binding Contract DSIG signature contents in Base64.) 8627 */ 8628 public List<Signature> getSignature() { 8629 if (this.signature == null) 8630 this.signature = new ArrayList<Signature>(); 8631 return this.signature; 8632 } 8633 8634 /** 8635 * @return Returns a reference to <code>this</code> for easy method chaining 8636 */ 8637 public SignatoryComponent setSignature(List<Signature> theSignature) { 8638 this.signature = theSignature; 8639 return this; 8640 } 8641 8642 public boolean hasSignature() { 8643 if (this.signature == null) 8644 return false; 8645 for (Signature item : this.signature) 8646 if (!item.isEmpty()) 8647 return true; 8648 return false; 8649 } 8650 8651 public Signature addSignature() { //3 8652 Signature t = new Signature(); 8653 if (this.signature == null) 8654 this.signature = new ArrayList<Signature>(); 8655 this.signature.add(t); 8656 return t; 8657 } 8658 8659 public SignatoryComponent addSignature(Signature t) { //3 8660 if (t == null) 8661 return this; 8662 if (this.signature == null) 8663 this.signature = new ArrayList<Signature>(); 8664 this.signature.add(t); 8665 return this; 8666 } 8667 8668 /** 8669 * @return The first repetition of repeating field {@link #signature}, creating it if it does not already exist 8670 */ 8671 public Signature getSignatureFirstRep() { 8672 if (getSignature().isEmpty()) { 8673 addSignature(); 8674 } 8675 return getSignature().get(0); 8676 } 8677 8678 protected void listChildren(List<Property> children) { 8679 super.listChildren(children); 8680 children.add(new Property("type", "Coding", "Role of this Contract signer, e.g. notary, grantee.", 0, 1, type)); 8681 children.add(new Property("party", "Reference(Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "Party which is a signator to this Contract.", 0, 1, party)); 8682 children.add(new Property("signature", "Signature", "Legally binding Contract DSIG signature contents in Base64.", 0, java.lang.Integer.MAX_VALUE, signature)); 8683 } 8684 8685 @Override 8686 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 8687 switch (_hash) { 8688 case 3575610: /*type*/ return new Property("type", "Coding", "Role of this Contract signer, e.g. notary, grantee.", 0, 1, type); 8689 case 106437350: /*party*/ return new Property("party", "Reference(Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "Party which is a signator to this Contract.", 0, 1, party); 8690 case 1073584312: /*signature*/ return new Property("signature", "Signature", "Legally binding Contract DSIG signature contents in Base64.", 0, java.lang.Integer.MAX_VALUE, signature); 8691 default: return super.getNamedProperty(_hash, _name, _checkValid); 8692 } 8693 8694 } 8695 8696 @Override 8697 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8698 switch (hash) { 8699 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 8700 case 106437350: /*party*/ return this.party == null ? new Base[0] : new Base[] {this.party}; // Reference 8701 case 1073584312: /*signature*/ return this.signature == null ? new Base[0] : this.signature.toArray(new Base[this.signature.size()]); // Signature 8702 default: return super.getProperty(hash, name, checkValid); 8703 } 8704 8705 } 8706 8707 @Override 8708 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8709 switch (hash) { 8710 case 3575610: // type 8711 this.type = castToCoding(value); // Coding 8712 return value; 8713 case 106437350: // party 8714 this.party = castToReference(value); // Reference 8715 return value; 8716 case 1073584312: // signature 8717 this.getSignature().add(castToSignature(value)); // Signature 8718 return value; 8719 default: return super.setProperty(hash, name, value); 8720 } 8721 8722 } 8723 8724 @Override 8725 public Base setProperty(String name, Base value) throws FHIRException { 8726 if (name.equals("type")) { 8727 this.type = castToCoding(value); // Coding 8728 } else if (name.equals("party")) { 8729 this.party = castToReference(value); // Reference 8730 } else if (name.equals("signature")) { 8731 this.getSignature().add(castToSignature(value)); 8732 } else 8733 return super.setProperty(name, value); 8734 return value; 8735 } 8736 8737 @Override 8738 public Base makeProperty(int hash, String name) throws FHIRException { 8739 switch (hash) { 8740 case 3575610: return getType(); 8741 case 106437350: return getParty(); 8742 case 1073584312: return addSignature(); 8743 default: return super.makeProperty(hash, name); 8744 } 8745 8746 } 8747 8748 @Override 8749 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8750 switch (hash) { 8751 case 3575610: /*type*/ return new String[] {"Coding"}; 8752 case 106437350: /*party*/ return new String[] {"Reference"}; 8753 case 1073584312: /*signature*/ return new String[] {"Signature"}; 8754 default: return super.getTypesForProperty(hash, name); 8755 } 8756 8757 } 8758 8759 @Override 8760 public Base addChild(String name) throws FHIRException { 8761 if (name.equals("type")) { 8762 this.type = new Coding(); 8763 return this.type; 8764 } 8765 else if (name.equals("party")) { 8766 this.party = new Reference(); 8767 return this.party; 8768 } 8769 else if (name.equals("signature")) { 8770 return addSignature(); 8771 } 8772 else 8773 return super.addChild(name); 8774 } 8775 8776 public SignatoryComponent copy() { 8777 SignatoryComponent dst = new SignatoryComponent(); 8778 copyValues(dst); 8779 dst.type = type == null ? null : type.copy(); 8780 dst.party = party == null ? null : party.copy(); 8781 if (signature != null) { 8782 dst.signature = new ArrayList<Signature>(); 8783 for (Signature i : signature) 8784 dst.signature.add(i.copy()); 8785 }; 8786 return dst; 8787 } 8788 8789 @Override 8790 public boolean equalsDeep(Base other_) { 8791 if (!super.equalsDeep(other_)) 8792 return false; 8793 if (!(other_ instanceof SignatoryComponent)) 8794 return false; 8795 SignatoryComponent o = (SignatoryComponent) other_; 8796 return compareDeep(type, o.type, true) && compareDeep(party, o.party, true) && compareDeep(signature, o.signature, true) 8797 ; 8798 } 8799 8800 @Override 8801 public boolean equalsShallow(Base other_) { 8802 if (!super.equalsShallow(other_)) 8803 return false; 8804 if (!(other_ instanceof SignatoryComponent)) 8805 return false; 8806 SignatoryComponent o = (SignatoryComponent) other_; 8807 return true; 8808 } 8809 8810 public boolean isEmpty() { 8811 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, party, signature); 8812 } 8813 8814 public String fhirType() { 8815 return "Contract.signer"; 8816 8817 } 8818 8819 } 8820 8821 @Block() 8822 public static class FriendlyLanguageComponent extends BackboneElement implements IBaseBackboneElement { 8823 /** 8824 * Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability. 8825 */ 8826 @Child(name = "content", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class}, order=1, min=1, max=1, modifier=false, summary=false) 8827 @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." ) 8828 protected Type content; 8829 8830 private static final long serialVersionUID = -1763459053L; 8831 8832 /** 8833 * Constructor 8834 */ 8835 public FriendlyLanguageComponent() { 8836 super(); 8837 } 8838 8839 /** 8840 * Constructor 8841 */ 8842 public FriendlyLanguageComponent(Type content) { 8843 super(); 8844 this.content = content; 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 Type getContent() { 8851 return this.content; 8852 } 8853 8854 /** 8855 * @return {@link #content} (Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.) 8856 */ 8857 public Attachment getContentAttachment() throws FHIRException { 8858 if (this.content == null) 8859 this.content = new Attachment(); 8860 if (!(this.content instanceof Attachment)) 8861 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); 8862 return (Attachment) this.content; 8863 } 8864 8865 public boolean hasContentAttachment() { 8866 return this != null && this.content instanceof Attachment; 8867 } 8868 8869 /** 8870 * @return {@link #content} (Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.) 8871 */ 8872 public Reference getContentReference() throws FHIRException { 8873 if (this.content == null) 8874 this.content = new Reference(); 8875 if (!(this.content instanceof Reference)) 8876 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); 8877 return (Reference) this.content; 8878 } 8879 8880 public boolean hasContentReference() { 8881 return this != null && this.content instanceof Reference; 8882 } 8883 8884 public boolean hasContent() { 8885 return this.content != null && !this.content.isEmpty(); 8886 } 8887 8888 /** 8889 * @param value {@link #content} (Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.) 8890 */ 8891 public FriendlyLanguageComponent setContent(Type value) { 8892 if (value != null && !(value instanceof Attachment || value instanceof Reference)) 8893 throw new Error("Not the right type for Contract.friendly.content[x]: "+value.fhirType()); 8894 this.content = value; 8895 return this; 8896 } 8897 8898 protected void listChildren(List<Property> children) { 8899 super.listChildren(children); 8900 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)); 8901 } 8902 8903 @Override 8904 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 8905 switch (_hash) { 8906 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); 8907 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); 8908 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); 8909 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); 8910 default: return super.getNamedProperty(_hash, _name, _checkValid); 8911 } 8912 8913 } 8914 8915 @Override 8916 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8917 switch (hash) { 8918 case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // Type 8919 default: return super.getProperty(hash, name, checkValid); 8920 } 8921 8922 } 8923 8924 @Override 8925 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8926 switch (hash) { 8927 case 951530617: // content 8928 this.content = castToType(value); // Type 8929 return value; 8930 default: return super.setProperty(hash, name, value); 8931 } 8932 8933 } 8934 8935 @Override 8936 public Base setProperty(String name, Base value) throws FHIRException { 8937 if (name.equals("content[x]")) { 8938 this.content = castToType(value); // Type 8939 } else 8940 return super.setProperty(name, value); 8941 return value; 8942 } 8943 8944 @Override 8945 public Base makeProperty(int hash, String name) throws FHIRException { 8946 switch (hash) { 8947 case 264548711: return getContent(); 8948 case 951530617: return getContent(); 8949 default: return super.makeProperty(hash, name); 8950 } 8951 8952 } 8953 8954 @Override 8955 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8956 switch (hash) { 8957 case 951530617: /*content*/ return new String[] {"Attachment", "Reference"}; 8958 default: return super.getTypesForProperty(hash, name); 8959 } 8960 8961 } 8962 8963 @Override 8964 public Base addChild(String name) throws FHIRException { 8965 if (name.equals("contentAttachment")) { 8966 this.content = new Attachment(); 8967 return this.content; 8968 } 8969 else if (name.equals("contentReference")) { 8970 this.content = new Reference(); 8971 return this.content; 8972 } 8973 else 8974 return super.addChild(name); 8975 } 8976 8977 public FriendlyLanguageComponent copy() { 8978 FriendlyLanguageComponent dst = new FriendlyLanguageComponent(); 8979 copyValues(dst); 8980 dst.content = content == null ? null : content.copy(); 8981 return dst; 8982 } 8983 8984 @Override 8985 public boolean equalsDeep(Base other_) { 8986 if (!super.equalsDeep(other_)) 8987 return false; 8988 if (!(other_ instanceof FriendlyLanguageComponent)) 8989 return false; 8990 FriendlyLanguageComponent o = (FriendlyLanguageComponent) other_; 8991 return compareDeep(content, o.content, true); 8992 } 8993 8994 @Override 8995 public boolean equalsShallow(Base other_) { 8996 if (!super.equalsShallow(other_)) 8997 return false; 8998 if (!(other_ instanceof FriendlyLanguageComponent)) 8999 return false; 9000 FriendlyLanguageComponent o = (FriendlyLanguageComponent) other_; 9001 return true; 9002 } 9003 9004 public boolean isEmpty() { 9005 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(content); 9006 } 9007 9008 public String fhirType() { 9009 return "Contract.friendly"; 9010 9011 } 9012 9013 } 9014 9015 @Block() 9016 public static class LegalLanguageComponent extends BackboneElement implements IBaseBackboneElement { 9017 /** 9018 * Contract legal text in human renderable form. 9019 */ 9020 @Child(name = "content", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class}, order=1, min=1, max=1, modifier=false, summary=false) 9021 @Description(shortDefinition="Contract Legal Text", formalDefinition="Contract legal text in human renderable form." ) 9022 protected Type content; 9023 9024 private static final long serialVersionUID = -1763459053L; 9025 9026 /** 9027 * Constructor 9028 */ 9029 public LegalLanguageComponent() { 9030 super(); 9031 } 9032 9033 /** 9034 * Constructor 9035 */ 9036 public LegalLanguageComponent(Type content) { 9037 super(); 9038 this.content = content; 9039 } 9040 9041 /** 9042 * @return {@link #content} (Contract legal text in human renderable form.) 9043 */ 9044 public Type getContent() { 9045 return this.content; 9046 } 9047 9048 /** 9049 * @return {@link #content} (Contract legal text in human renderable form.) 9050 */ 9051 public Attachment getContentAttachment() throws FHIRException { 9052 if (this.content == null) 9053 this.content = new Attachment(); 9054 if (!(this.content instanceof Attachment)) 9055 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); 9056 return (Attachment) this.content; 9057 } 9058 9059 public boolean hasContentAttachment() { 9060 return this != null && this.content instanceof Attachment; 9061 } 9062 9063 /** 9064 * @return {@link #content} (Contract legal text in human renderable form.) 9065 */ 9066 public Reference getContentReference() throws FHIRException { 9067 if (this.content == null) 9068 this.content = new Reference(); 9069 if (!(this.content instanceof Reference)) 9070 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); 9071 return (Reference) this.content; 9072 } 9073 9074 public boolean hasContentReference() { 9075 return this != null && this.content instanceof Reference; 9076 } 9077 9078 public boolean hasContent() { 9079 return this.content != null && !this.content.isEmpty(); 9080 } 9081 9082 /** 9083 * @param value {@link #content} (Contract legal text in human renderable form.) 9084 */ 9085 public LegalLanguageComponent setContent(Type value) { 9086 if (value != null && !(value instanceof Attachment || value instanceof Reference)) 9087 throw new Error("Not the right type for Contract.legal.content[x]: "+value.fhirType()); 9088 this.content = value; 9089 return this; 9090 } 9091 9092 protected void listChildren(List<Property> children) { 9093 super.listChildren(children); 9094 children.add(new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Contract legal text in human renderable form.", 0, 1, content)); 9095 } 9096 9097 @Override 9098 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 9099 switch (_hash) { 9100 case 264548711: /*content[x]*/ return new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Contract legal text in human renderable form.", 0, 1, content); 9101 case 951530617: /*content*/ return new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Contract legal text in human renderable form.", 0, 1, content); 9102 case -702028164: /*contentAttachment*/ return new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Contract legal text in human renderable form.", 0, 1, content); 9103 case 1193747154: /*contentReference*/ return new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Contract legal text in human renderable form.", 0, 1, content); 9104 default: return super.getNamedProperty(_hash, _name, _checkValid); 9105 } 9106 9107 } 9108 9109 @Override 9110 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9111 switch (hash) { 9112 case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // Type 9113 default: return super.getProperty(hash, name, checkValid); 9114 } 9115 9116 } 9117 9118 @Override 9119 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9120 switch (hash) { 9121 case 951530617: // content 9122 this.content = castToType(value); // Type 9123 return value; 9124 default: return super.setProperty(hash, name, value); 9125 } 9126 9127 } 9128 9129 @Override 9130 public Base setProperty(String name, Base value) throws FHIRException { 9131 if (name.equals("content[x]")) { 9132 this.content = castToType(value); // Type 9133 } else 9134 return super.setProperty(name, value); 9135 return value; 9136 } 9137 9138 @Override 9139 public Base makeProperty(int hash, String name) throws FHIRException { 9140 switch (hash) { 9141 case 264548711: return getContent(); 9142 case 951530617: return getContent(); 9143 default: return super.makeProperty(hash, name); 9144 } 9145 9146 } 9147 9148 @Override 9149 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9150 switch (hash) { 9151 case 951530617: /*content*/ return new String[] {"Attachment", "Reference"}; 9152 default: return super.getTypesForProperty(hash, name); 9153 } 9154 9155 } 9156 9157 @Override 9158 public Base addChild(String name) throws FHIRException { 9159 if (name.equals("contentAttachment")) { 9160 this.content = new Attachment(); 9161 return this.content; 9162 } 9163 else if (name.equals("contentReference")) { 9164 this.content = new Reference(); 9165 return this.content; 9166 } 9167 else 9168 return super.addChild(name); 9169 } 9170 9171 public LegalLanguageComponent copy() { 9172 LegalLanguageComponent dst = new LegalLanguageComponent(); 9173 copyValues(dst); 9174 dst.content = content == null ? null : content.copy(); 9175 return dst; 9176 } 9177 9178 @Override 9179 public boolean equalsDeep(Base other_) { 9180 if (!super.equalsDeep(other_)) 9181 return false; 9182 if (!(other_ instanceof LegalLanguageComponent)) 9183 return false; 9184 LegalLanguageComponent o = (LegalLanguageComponent) other_; 9185 return compareDeep(content, o.content, true); 9186 } 9187 9188 @Override 9189 public boolean equalsShallow(Base other_) { 9190 if (!super.equalsShallow(other_)) 9191 return false; 9192 if (!(other_ instanceof LegalLanguageComponent)) 9193 return false; 9194 LegalLanguageComponent o = (LegalLanguageComponent) other_; 9195 return true; 9196 } 9197 9198 public boolean isEmpty() { 9199 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(content); 9200 } 9201 9202 public String fhirType() { 9203 return "Contract.legal"; 9204 9205 } 9206 9207 } 9208 9209 @Block() 9210 public static class ComputableLanguageComponent extends BackboneElement implements IBaseBackboneElement { 9211 /** 9212 * Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal). 9213 */ 9214 @Child(name = "content", type = {Attachment.class, DocumentReference.class}, order=1, min=1, max=1, modifier=false, summary=false) 9215 @Description(shortDefinition="Computable Contract Rules", formalDefinition="Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal)." ) 9216 protected Type content; 9217 9218 private static final long serialVersionUID = -1763459053L; 9219 9220 /** 9221 * Constructor 9222 */ 9223 public ComputableLanguageComponent() { 9224 super(); 9225 } 9226 9227 /** 9228 * Constructor 9229 */ 9230 public ComputableLanguageComponent(Type content) { 9231 super(); 9232 this.content = content; 9233 } 9234 9235 /** 9236 * @return {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) 9237 */ 9238 public Type getContent() { 9239 return this.content; 9240 } 9241 9242 /** 9243 * @return {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) 9244 */ 9245 public Attachment getContentAttachment() throws FHIRException { 9246 if (this.content == null) 9247 this.content = new Attachment(); 9248 if (!(this.content instanceof Attachment)) 9249 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); 9250 return (Attachment) this.content; 9251 } 9252 9253 public boolean hasContentAttachment() { 9254 return this != null && this.content instanceof Attachment; 9255 } 9256 9257 /** 9258 * @return {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) 9259 */ 9260 public Reference getContentReference() throws FHIRException { 9261 if (this.content == null) 9262 this.content = new Reference(); 9263 if (!(this.content instanceof Reference)) 9264 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); 9265 return (Reference) this.content; 9266 } 9267 9268 public boolean hasContentReference() { 9269 return this != null && this.content instanceof Reference; 9270 } 9271 9272 public boolean hasContent() { 9273 return this.content != null && !this.content.isEmpty(); 9274 } 9275 9276 /** 9277 * @param value {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) 9278 */ 9279 public ComputableLanguageComponent setContent(Type value) { 9280 if (value != null && !(value instanceof Attachment || value instanceof Reference)) 9281 throw new Error("Not the right type for Contract.rule.content[x]: "+value.fhirType()); 9282 this.content = value; 9283 return this; 9284 } 9285 9286 protected void listChildren(List<Property> children) { 9287 super.listChildren(children); 9288 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)); 9289 } 9290 9291 @Override 9292 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 9293 switch (_hash) { 9294 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); 9295 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); 9296 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); 9297 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); 9298 default: return super.getNamedProperty(_hash, _name, _checkValid); 9299 } 9300 9301 } 9302 9303 @Override 9304 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9305 switch (hash) { 9306 case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // Type 9307 default: return super.getProperty(hash, name, checkValid); 9308 } 9309 9310 } 9311 9312 @Override 9313 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9314 switch (hash) { 9315 case 951530617: // content 9316 this.content = castToType(value); // Type 9317 return value; 9318 default: return super.setProperty(hash, name, value); 9319 } 9320 9321 } 9322 9323 @Override 9324 public Base setProperty(String name, Base value) throws FHIRException { 9325 if (name.equals("content[x]")) { 9326 this.content = castToType(value); // Type 9327 } else 9328 return super.setProperty(name, value); 9329 return value; 9330 } 9331 9332 @Override 9333 public Base makeProperty(int hash, String name) throws FHIRException { 9334 switch (hash) { 9335 case 264548711: return getContent(); 9336 case 951530617: return getContent(); 9337 default: return super.makeProperty(hash, name); 9338 } 9339 9340 } 9341 9342 @Override 9343 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9344 switch (hash) { 9345 case 951530617: /*content*/ return new String[] {"Attachment", "Reference"}; 9346 default: return super.getTypesForProperty(hash, name); 9347 } 9348 9349 } 9350 9351 @Override 9352 public Base addChild(String name) throws FHIRException { 9353 if (name.equals("contentAttachment")) { 9354 this.content = new Attachment(); 9355 return this.content; 9356 } 9357 else if (name.equals("contentReference")) { 9358 this.content = new Reference(); 9359 return this.content; 9360 } 9361 else 9362 return super.addChild(name); 9363 } 9364 9365 public ComputableLanguageComponent copy() { 9366 ComputableLanguageComponent dst = new ComputableLanguageComponent(); 9367 copyValues(dst); 9368 dst.content = content == null ? null : content.copy(); 9369 return dst; 9370 } 9371 9372 @Override 9373 public boolean equalsDeep(Base other_) { 9374 if (!super.equalsDeep(other_)) 9375 return false; 9376 if (!(other_ instanceof ComputableLanguageComponent)) 9377 return false; 9378 ComputableLanguageComponent o = (ComputableLanguageComponent) other_; 9379 return compareDeep(content, o.content, true); 9380 } 9381 9382 @Override 9383 public boolean equalsShallow(Base other_) { 9384 if (!super.equalsShallow(other_)) 9385 return false; 9386 if (!(other_ instanceof ComputableLanguageComponent)) 9387 return false; 9388 ComputableLanguageComponent o = (ComputableLanguageComponent) other_; 9389 return true; 9390 } 9391 9392 public boolean isEmpty() { 9393 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(content); 9394 } 9395 9396 public String fhirType() { 9397 return "Contract.rule"; 9398 9399 } 9400 9401 } 9402 9403 /** 9404 * Unique identifier for this Contract or a derivative that references a Source Contract. 9405 */ 9406 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 9407 @Description(shortDefinition="Contract number", formalDefinition="Unique identifier for this Contract or a derivative that references a Source Contract." ) 9408 protected List<Identifier> identifier; 9409 9410 /** 9411 * Canonical identifier for this contract, represented as a URI (globally unique). 9412 */ 9413 @Child(name = "url", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false) 9414 @Description(shortDefinition="Basal definition", formalDefinition="Canonical identifier for this contract, represented as a URI (globally unique)." ) 9415 protected UriType url; 9416 9417 /** 9418 * An edition identifier used for business purposes to label business significant variants. 9419 */ 9420 @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 9421 @Description(shortDefinition="Business edition", formalDefinition="An edition identifier used for business purposes to label business significant variants." ) 9422 protected StringType version; 9423 9424 /** 9425 * The status of the resource instance. 9426 */ 9427 @Child(name = "status", type = {CodeType.class}, order=3, min=0, max=1, modifier=true, summary=true) 9428 @Description(shortDefinition="draft | active | suspended | cancelled | completed | entered-in-error | unknown", formalDefinition="The status of the resource instance." ) 9429 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-status") 9430 protected Enumeration<ContractStatus> status; 9431 9432 /** 9433 * 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. 9434 */ 9435 @Child(name = "legalState", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 9436 @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." ) 9437 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-legalstate") 9438 protected CodeableConcept legalState; 9439 9440 /** 9441 * The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract. 9442 */ 9443 @Child(name = "instantiatesCanonical", type = {Contract.class}, order=5, min=0, max=1, modifier=false, summary=false) 9444 @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." ) 9445 protected Reference instantiatesCanonical; 9446 9447 /** 9448 * 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.) 9449 */ 9450 protected Contract instantiatesCanonicalTarget; 9451 9452 /** 9453 * The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract. 9454 */ 9455 @Child(name = "instantiatesUri", type = {UriType.class}, order=6, min=0, max=1, modifier=false, summary=false) 9456 @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." ) 9457 protected UriType instantiatesUri; 9458 9459 /** 9460 * The minimal content derived from the basal information source at a specific stage in its lifecycle. 9461 */ 9462 @Child(name = "contentDerivative", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false) 9463 @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." ) 9464 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-content-derivative") 9465 protected CodeableConcept contentDerivative; 9466 9467 /** 9468 * When this Contract was issued. 9469 */ 9470 @Child(name = "issued", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) 9471 @Description(shortDefinition="When this Contract was issued", formalDefinition="When this Contract was issued." ) 9472 protected DateTimeType issued; 9473 9474 /** 9475 * Relevant time or time-period when this Contract is applicable. 9476 */ 9477 @Child(name = "applies", type = {Period.class}, order=9, min=0, max=1, modifier=false, summary=true) 9478 @Description(shortDefinition="Effective time", formalDefinition="Relevant time or time-period when this Contract is applicable." ) 9479 protected Period applies; 9480 9481 /** 9482 * Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract. 9483 */ 9484 @Child(name = "expirationType", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=false) 9485 @Description(shortDefinition="Contract cessation cause", formalDefinition="Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract." ) 9486 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-expiration-type") 9487 protected CodeableConcept expirationType; 9488 9489 /** 9490 * The target entity impacted by or of interest to parties to the agreement. 9491 */ 9492 @Child(name = "subject", type = {Reference.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 9493 @Description(shortDefinition="Contract Target Entity", formalDefinition="The target entity impacted by or of interest to parties to the agreement." ) 9494 protected List<Reference> subject; 9495 /** 9496 * The actual objects that are the target of the reference (The target entity impacted by or of interest to parties to the agreement.) 9497 */ 9498 protected List<Resource> subjectTarget; 9499 9500 9501 /** 9502 * 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. 9503 */ 9504 @Child(name = "authority", type = {Organization.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9505 @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." ) 9506 protected List<Reference> authority; 9507 /** 9508 * 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.) 9509 */ 9510 protected List<Organization> authorityTarget; 9511 9512 9513 /** 9514 * 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. 9515 */ 9516 @Child(name = "domain", type = {Location.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9517 @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." ) 9518 protected List<Reference> domain; 9519 /** 9520 * 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.) 9521 */ 9522 protected List<Location> domainTarget; 9523 9524 9525 /** 9526 * Sites in which the contract is complied with, exercised, or in force. 9527 */ 9528 @Child(name = "site", type = {Location.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9529 @Description(shortDefinition="Specific Location", formalDefinition="Sites in which the contract is complied with, exercised, or in force." ) 9530 protected List<Reference> site; 9531 /** 9532 * The actual objects that are the target of the reference (Sites in which the contract is complied with, exercised, or in force.) 9533 */ 9534 protected List<Location> siteTarget; 9535 9536 9537 /** 9538 * 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. 9539 */ 9540 @Child(name = "name", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=true) 9541 @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." ) 9542 protected StringType name; 9543 9544 /** 9545 * A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content. 9546 */ 9547 @Child(name = "title", type = {StringType.class}, order=16, min=0, max=1, modifier=false, summary=true) 9548 @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." ) 9549 protected StringType title; 9550 9551 /** 9552 * 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. 9553 */ 9554 @Child(name = "subtitle", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false) 9555 @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." ) 9556 protected StringType subtitle; 9557 9558 /** 9559 * 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. 9560 */ 9561 @Child(name = "alias", type = {StringType.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9562 @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." ) 9563 protected List<StringType> alias; 9564 9565 /** 9566 * The individual or organization that authored the Contract definition, derivative, or instance in any legal state. 9567 */ 9568 @Child(name = "author", type = {Patient.class, Practitioner.class, PractitionerRole.class, Organization.class}, order=19, min=0, max=1, modifier=false, summary=false) 9569 @Description(shortDefinition="Source of Contract", formalDefinition="The individual or organization that authored the Contract definition, derivative, or instance in any legal state." ) 9570 protected Reference author; 9571 9572 /** 9573 * 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.) 9574 */ 9575 protected Resource authorTarget; 9576 9577 /** 9578 * A selector of legal concerns for this Contract definition, derivative, or instance in any legal state. 9579 */ 9580 @Child(name = "scope", type = {CodeableConcept.class}, order=20, min=0, max=1, modifier=false, summary=false) 9581 @Description(shortDefinition="Range of Legal Concerns", formalDefinition="A selector of legal concerns for this Contract definition, derivative, or instance in any legal state." ) 9582 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-scope") 9583 protected CodeableConcept scope; 9584 9585 /** 9586 * Narrows the range of legal concerns to focus on the achievement of specific contractual objectives. 9587 */ 9588 @Child(name = "topic", type = {CodeableConcept.class, Reference.class}, order=21, min=0, max=1, modifier=false, summary=false) 9589 @Description(shortDefinition="Focus of contract interest", formalDefinition="Narrows the range of legal concerns to focus on the achievement of specific contractual objectives." ) 9590 protected Type topic; 9591 9592 /** 9593 * 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. 9594 */ 9595 @Child(name = "type", type = {CodeableConcept.class}, order=22, min=0, max=1, modifier=false, summary=true) 9596 @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." ) 9597 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-type") 9598 protected CodeableConcept type; 9599 9600 /** 9601 * 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. 9602 */ 9603 @Child(name = "subType", type = {CodeableConcept.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 9604 @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." ) 9605 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contract-subtype") 9606 protected List<CodeableConcept> subType; 9607 9608 /** 9609 * 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. 9610 */ 9611 @Child(name = "contentDefinition", type = {}, order=24, min=0, max=1, modifier=false, summary=false) 9612 @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." ) 9613 protected ContentDefinitionComponent contentDefinition; 9614 9615 /** 9616 * One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups. 9617 */ 9618 @Child(name = "term", type = {}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9619 @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." ) 9620 protected List<TermComponent> term; 9621 9622 /** 9623 * Information that may be needed by/relevant to the performer in their execution of this term action. 9624 */ 9625 @Child(name = "supportingInfo", type = {Reference.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9626 @Description(shortDefinition="Extra Information", formalDefinition="Information that may be needed by/relevant to the performer in their execution of this term action." ) 9627 protected List<Reference> supportingInfo; 9628 /** 9629 * 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.) 9630 */ 9631 protected List<Resource> supportingInfoTarget; 9632 9633 9634 /** 9635 * 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. 9636 */ 9637 @Child(name = "relevantHistory", type = {Provenance.class}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9638 @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." ) 9639 protected List<Reference> relevantHistory; 9640 /** 9641 * 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.) 9642 */ 9643 protected List<Provenance> relevantHistoryTarget; 9644 9645 9646 /** 9647 * 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. 9648 */ 9649 @Child(name = "signer", type = {}, order=28, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9650 @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." ) 9651 protected List<SignatoryComponent> signer; 9652 9653 /** 9654 * 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. 9655 */ 9656 @Child(name = "friendly", type = {}, order=29, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9657 @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." ) 9658 protected List<FriendlyLanguageComponent> friendly; 9659 9660 /** 9661 * List of Legal expressions or representations of this Contract. 9662 */ 9663 @Child(name = "legal", type = {}, order=30, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9664 @Description(shortDefinition="Contract Legal Language", formalDefinition="List of Legal expressions or representations of this Contract." ) 9665 protected List<LegalLanguageComponent> legal; 9666 9667 /** 9668 * List of Computable Policy Rule Language Representations of this Contract. 9669 */ 9670 @Child(name = "rule", type = {}, order=31, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9671 @Description(shortDefinition="Computable Contract Language", formalDefinition="List of Computable Policy Rule Language Representations of this Contract." ) 9672 protected List<ComputableLanguageComponent> rule; 9673 9674 /** 9675 * 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. 9676 */ 9677 @Child(name = "legallyBinding", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class, Contract.class}, order=32, min=0, max=1, modifier=false, summary=false) 9678 @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." ) 9679 protected Type legallyBinding; 9680 9681 private static final long serialVersionUID = -1388892487L; 9682 9683 /** 9684 * Constructor 9685 */ 9686 public Contract() { 9687 super(); 9688 } 9689 9690 /** 9691 * @return {@link #identifier} (Unique identifier for this Contract or a derivative that references a Source Contract.) 9692 */ 9693 public List<Identifier> getIdentifier() { 9694 if (this.identifier == null) 9695 this.identifier = new ArrayList<Identifier>(); 9696 return this.identifier; 9697 } 9698 9699 /** 9700 * @return Returns a reference to <code>this</code> for easy method chaining 9701 */ 9702 public Contract setIdentifier(List<Identifier> theIdentifier) { 9703 this.identifier = theIdentifier; 9704 return this; 9705 } 9706 9707 public boolean hasIdentifier() { 9708 if (this.identifier == null) 9709 return false; 9710 for (Identifier item : this.identifier) 9711 if (!item.isEmpty()) 9712 return true; 9713 return false; 9714 } 9715 9716 public Identifier addIdentifier() { //3 9717 Identifier t = new Identifier(); 9718 if (this.identifier == null) 9719 this.identifier = new ArrayList<Identifier>(); 9720 this.identifier.add(t); 9721 return t; 9722 } 9723 9724 public Contract addIdentifier(Identifier t) { //3 9725 if (t == null) 9726 return this; 9727 if (this.identifier == null) 9728 this.identifier = new ArrayList<Identifier>(); 9729 this.identifier.add(t); 9730 return this; 9731 } 9732 9733 /** 9734 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 9735 */ 9736 public Identifier getIdentifierFirstRep() { 9737 if (getIdentifier().isEmpty()) { 9738 addIdentifier(); 9739 } 9740 return getIdentifier().get(0); 9741 } 9742 9743 /** 9744 * @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 9745 */ 9746 public UriType getUrlElement() { 9747 if (this.url == null) 9748 if (Configuration.errorOnAutoCreate()) 9749 throw new Error("Attempt to auto-create Contract.url"); 9750 else if (Configuration.doAutoCreate()) 9751 this.url = new UriType(); // bb 9752 return this.url; 9753 } 9754 9755 public boolean hasUrlElement() { 9756 return this.url != null && !this.url.isEmpty(); 9757 } 9758 9759 public boolean hasUrl() { 9760 return this.url != null && !this.url.isEmpty(); 9761 } 9762 9763 /** 9764 * @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 9765 */ 9766 public Contract setUrlElement(UriType value) { 9767 this.url = value; 9768 return this; 9769 } 9770 9771 /** 9772 * @return Canonical identifier for this contract, represented as a URI (globally unique). 9773 */ 9774 public String getUrl() { 9775 return this.url == null ? null : this.url.getValue(); 9776 } 9777 9778 /** 9779 * @param value Canonical identifier for this contract, represented as a URI (globally unique). 9780 */ 9781 public Contract setUrl(String value) { 9782 if (Utilities.noString(value)) 9783 this.url = null; 9784 else { 9785 if (this.url == null) 9786 this.url = new UriType(); 9787 this.url.setValue(value); 9788 } 9789 return this; 9790 } 9791 9792 /** 9793 * @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 9794 */ 9795 public StringType getVersionElement() { 9796 if (this.version == null) 9797 if (Configuration.errorOnAutoCreate()) 9798 throw new Error("Attempt to auto-create Contract.version"); 9799 else if (Configuration.doAutoCreate()) 9800 this.version = new StringType(); // bb 9801 return this.version; 9802 } 9803 9804 public boolean hasVersionElement() { 9805 return this.version != null && !this.version.isEmpty(); 9806 } 9807 9808 public boolean hasVersion() { 9809 return this.version != null && !this.version.isEmpty(); 9810 } 9811 9812 /** 9813 * @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 9814 */ 9815 public Contract setVersionElement(StringType value) { 9816 this.version = value; 9817 return this; 9818 } 9819 9820 /** 9821 * @return An edition identifier used for business purposes to label business significant variants. 9822 */ 9823 public String getVersion() { 9824 return this.version == null ? null : this.version.getValue(); 9825 } 9826 9827 /** 9828 * @param value An edition identifier used for business purposes to label business significant variants. 9829 */ 9830 public Contract setVersion(String value) { 9831 if (Utilities.noString(value)) 9832 this.version = null; 9833 else { 9834 if (this.version == null) 9835 this.version = new StringType(); 9836 this.version.setValue(value); 9837 } 9838 return this; 9839 } 9840 9841 /** 9842 * @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 9843 */ 9844 public Enumeration<ContractStatus> getStatusElement() { 9845 if (this.status == null) 9846 if (Configuration.errorOnAutoCreate()) 9847 throw new Error("Attempt to auto-create Contract.status"); 9848 else if (Configuration.doAutoCreate()) 9849 this.status = new Enumeration<ContractStatus>(new ContractStatusEnumFactory()); // bb 9850 return this.status; 9851 } 9852 9853 public boolean hasStatusElement() { 9854 return this.status != null && !this.status.isEmpty(); 9855 } 9856 9857 public boolean hasStatus() { 9858 return this.status != null && !this.status.isEmpty(); 9859 } 9860 9861 /** 9862 * @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 9863 */ 9864 public Contract setStatusElement(Enumeration<ContractStatus> value) { 9865 this.status = value; 9866 return this; 9867 } 9868 9869 /** 9870 * @return The status of the resource instance. 9871 */ 9872 public ContractStatus getStatus() { 9873 return this.status == null ? null : this.status.getValue(); 9874 } 9875 9876 /** 9877 * @param value The status of the resource instance. 9878 */ 9879 public Contract setStatus(ContractStatus value) { 9880 if (value == null) 9881 this.status = null; 9882 else { 9883 if (this.status == null) 9884 this.status = new Enumeration<ContractStatus>(new ContractStatusEnumFactory()); 9885 this.status.setValue(value); 9886 } 9887 return this; 9888 } 9889 9890 /** 9891 * @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.) 9892 */ 9893 public CodeableConcept getLegalState() { 9894 if (this.legalState == null) 9895 if (Configuration.errorOnAutoCreate()) 9896 throw new Error("Attempt to auto-create Contract.legalState"); 9897 else if (Configuration.doAutoCreate()) 9898 this.legalState = new CodeableConcept(); // cc 9899 return this.legalState; 9900 } 9901 9902 public boolean hasLegalState() { 9903 return this.legalState != null && !this.legalState.isEmpty(); 9904 } 9905 9906 /** 9907 * @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.) 9908 */ 9909 public Contract setLegalState(CodeableConcept value) { 9910 this.legalState = value; 9911 return this; 9912 } 9913 9914 /** 9915 * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.) 9916 */ 9917 public Reference getInstantiatesCanonical() { 9918 if (this.instantiatesCanonical == null) 9919 if (Configuration.errorOnAutoCreate()) 9920 throw new Error("Attempt to auto-create Contract.instantiatesCanonical"); 9921 else if (Configuration.doAutoCreate()) 9922 this.instantiatesCanonical = new Reference(); // cc 9923 return this.instantiatesCanonical; 9924 } 9925 9926 public boolean hasInstantiatesCanonical() { 9927 return this.instantiatesCanonical != null && !this.instantiatesCanonical.isEmpty(); 9928 } 9929 9930 /** 9931 * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.) 9932 */ 9933 public Contract setInstantiatesCanonical(Reference value) { 9934 this.instantiatesCanonical = value; 9935 return this; 9936 } 9937 9938 /** 9939 * @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.) 9940 */ 9941 public Contract getInstantiatesCanonicalTarget() { 9942 if (this.instantiatesCanonicalTarget == null) 9943 if (Configuration.errorOnAutoCreate()) 9944 throw new Error("Attempt to auto-create Contract.instantiatesCanonical"); 9945 else if (Configuration.doAutoCreate()) 9946 this.instantiatesCanonicalTarget = new Contract(); // aa 9947 return this.instantiatesCanonicalTarget; 9948 } 9949 9950 /** 9951 * @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.) 9952 */ 9953 public Contract setInstantiatesCanonicalTarget(Contract value) { 9954 this.instantiatesCanonicalTarget = value; 9955 return this; 9956 } 9957 9958 /** 9959 * @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 9960 */ 9961 public UriType getInstantiatesUriElement() { 9962 if (this.instantiatesUri == null) 9963 if (Configuration.errorOnAutoCreate()) 9964 throw new Error("Attempt to auto-create Contract.instantiatesUri"); 9965 else if (Configuration.doAutoCreate()) 9966 this.instantiatesUri = new UriType(); // bb 9967 return this.instantiatesUri; 9968 } 9969 9970 public boolean hasInstantiatesUriElement() { 9971 return this.instantiatesUri != null && !this.instantiatesUri.isEmpty(); 9972 } 9973 9974 public boolean hasInstantiatesUri() { 9975 return this.instantiatesUri != null && !this.instantiatesUri.isEmpty(); 9976 } 9977 9978 /** 9979 * @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 9980 */ 9981 public Contract setInstantiatesUriElement(UriType value) { 9982 this.instantiatesUri = value; 9983 return this; 9984 } 9985 9986 /** 9987 * @return The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract. 9988 */ 9989 public String getInstantiatesUri() { 9990 return this.instantiatesUri == null ? null : this.instantiatesUri.getValue(); 9991 } 9992 9993 /** 9994 * @param value The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract. 9995 */ 9996 public Contract setInstantiatesUri(String value) { 9997 if (Utilities.noString(value)) 9998 this.instantiatesUri = null; 9999 else { 10000 if (this.instantiatesUri == null) 10001 this.instantiatesUri = new UriType(); 10002 this.instantiatesUri.setValue(value); 10003 } 10004 return this; 10005 } 10006 10007 /** 10008 * @return {@link #contentDerivative} (The minimal content derived from the basal information source at a specific stage in its lifecycle.) 10009 */ 10010 public CodeableConcept getContentDerivative() { 10011 if (this.contentDerivative == null) 10012 if (Configuration.errorOnAutoCreate()) 10013 throw new Error("Attempt to auto-create Contract.contentDerivative"); 10014 else if (Configuration.doAutoCreate()) 10015 this.contentDerivative = new CodeableConcept(); // cc 10016 return this.contentDerivative; 10017 } 10018 10019 public boolean hasContentDerivative() { 10020 return this.contentDerivative != null && !this.contentDerivative.isEmpty(); 10021 } 10022 10023 /** 10024 * @param value {@link #contentDerivative} (The minimal content derived from the basal information source at a specific stage in its lifecycle.) 10025 */ 10026 public Contract setContentDerivative(CodeableConcept value) { 10027 this.contentDerivative = value; 10028 return this; 10029 } 10030 10031 /** 10032 * @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 10033 */ 10034 public DateTimeType getIssuedElement() { 10035 if (this.issued == null) 10036 if (Configuration.errorOnAutoCreate()) 10037 throw new Error("Attempt to auto-create Contract.issued"); 10038 else if (Configuration.doAutoCreate()) 10039 this.issued = new DateTimeType(); // bb 10040 return this.issued; 10041 } 10042 10043 public boolean hasIssuedElement() { 10044 return this.issued != null && !this.issued.isEmpty(); 10045 } 10046 10047 public boolean hasIssued() { 10048 return this.issued != null && !this.issued.isEmpty(); 10049 } 10050 10051 /** 10052 * @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 10053 */ 10054 public Contract setIssuedElement(DateTimeType value) { 10055 this.issued = value; 10056 return this; 10057 } 10058 10059 /** 10060 * @return When this Contract was issued. 10061 */ 10062 public Date getIssued() { 10063 return this.issued == null ? null : this.issued.getValue(); 10064 } 10065 10066 /** 10067 * @param value When this Contract was issued. 10068 */ 10069 public Contract setIssued(Date value) { 10070 if (value == null) 10071 this.issued = null; 10072 else { 10073 if (this.issued == null) 10074 this.issued = new DateTimeType(); 10075 this.issued.setValue(value); 10076 } 10077 return this; 10078 } 10079 10080 /** 10081 * @return {@link #applies} (Relevant time or time-period when this Contract is applicable.) 10082 */ 10083 public Period getApplies() { 10084 if (this.applies == null) 10085 if (Configuration.errorOnAutoCreate()) 10086 throw new Error("Attempt to auto-create Contract.applies"); 10087 else if (Configuration.doAutoCreate()) 10088 this.applies = new Period(); // cc 10089 return this.applies; 10090 } 10091 10092 public boolean hasApplies() { 10093 return this.applies != null && !this.applies.isEmpty(); 10094 } 10095 10096 /** 10097 * @param value {@link #applies} (Relevant time or time-period when this Contract is applicable.) 10098 */ 10099 public Contract setApplies(Period value) { 10100 this.applies = value; 10101 return this; 10102 } 10103 10104 /** 10105 * @return {@link #expirationType} (Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract.) 10106 */ 10107 public CodeableConcept getExpirationType() { 10108 if (this.expirationType == null) 10109 if (Configuration.errorOnAutoCreate()) 10110 throw new Error("Attempt to auto-create Contract.expirationType"); 10111 else if (Configuration.doAutoCreate()) 10112 this.expirationType = new CodeableConcept(); // cc 10113 return this.expirationType; 10114 } 10115 10116 public boolean hasExpirationType() { 10117 return this.expirationType != null && !this.expirationType.isEmpty(); 10118 } 10119 10120 /** 10121 * @param value {@link #expirationType} (Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract.) 10122 */ 10123 public Contract setExpirationType(CodeableConcept value) { 10124 this.expirationType = value; 10125 return this; 10126 } 10127 10128 /** 10129 * @return {@link #subject} (The target entity impacted by or of interest to parties to the agreement.) 10130 */ 10131 public List<Reference> getSubject() { 10132 if (this.subject == null) 10133 this.subject = new ArrayList<Reference>(); 10134 return this.subject; 10135 } 10136 10137 /** 10138 * @return Returns a reference to <code>this</code> for easy method chaining 10139 */ 10140 public Contract setSubject(List<Reference> theSubject) { 10141 this.subject = theSubject; 10142 return this; 10143 } 10144 10145 public boolean hasSubject() { 10146 if (this.subject == null) 10147 return false; 10148 for (Reference item : this.subject) 10149 if (!item.isEmpty()) 10150 return true; 10151 return false; 10152 } 10153 10154 public Reference addSubject() { //3 10155 Reference t = new Reference(); 10156 if (this.subject == null) 10157 this.subject = new ArrayList<Reference>(); 10158 this.subject.add(t); 10159 return t; 10160 } 10161 10162 public Contract addSubject(Reference t) { //3 10163 if (t == null) 10164 return this; 10165 if (this.subject == null) 10166 this.subject = new ArrayList<Reference>(); 10167 this.subject.add(t); 10168 return this; 10169 } 10170 10171 /** 10172 * @return The first repetition of repeating field {@link #subject}, creating it if it does not already exist 10173 */ 10174 public Reference getSubjectFirstRep() { 10175 if (getSubject().isEmpty()) { 10176 addSubject(); 10177 } 10178 return getSubject().get(0); 10179 } 10180 10181 /** 10182 * @deprecated Use Reference#setResource(IBaseResource) instead 10183 */ 10184 @Deprecated 10185 public List<Resource> getSubjectTarget() { 10186 if (this.subjectTarget == null) 10187 this.subjectTarget = new ArrayList<Resource>(); 10188 return this.subjectTarget; 10189 } 10190 10191 /** 10192 * @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.) 10193 */ 10194 public List<Reference> getAuthority() { 10195 if (this.authority == null) 10196 this.authority = new ArrayList<Reference>(); 10197 return this.authority; 10198 } 10199 10200 /** 10201 * @return Returns a reference to <code>this</code> for easy method chaining 10202 */ 10203 public Contract setAuthority(List<Reference> theAuthority) { 10204 this.authority = theAuthority; 10205 return this; 10206 } 10207 10208 public boolean hasAuthority() { 10209 if (this.authority == null) 10210 return false; 10211 for (Reference item : this.authority) 10212 if (!item.isEmpty()) 10213 return true; 10214 return false; 10215 } 10216 10217 public Reference addAuthority() { //3 10218 Reference t = new Reference(); 10219 if (this.authority == null) 10220 this.authority = new ArrayList<Reference>(); 10221 this.authority.add(t); 10222 return t; 10223 } 10224 10225 public Contract addAuthority(Reference t) { //3 10226 if (t == null) 10227 return this; 10228 if (this.authority == null) 10229 this.authority = new ArrayList<Reference>(); 10230 this.authority.add(t); 10231 return this; 10232 } 10233 10234 /** 10235 * @return The first repetition of repeating field {@link #authority}, creating it if it does not already exist 10236 */ 10237 public Reference getAuthorityFirstRep() { 10238 if (getAuthority().isEmpty()) { 10239 addAuthority(); 10240 } 10241 return getAuthority().get(0); 10242 } 10243 10244 /** 10245 * @deprecated Use Reference#setResource(IBaseResource) instead 10246 */ 10247 @Deprecated 10248 public List<Organization> getAuthorityTarget() { 10249 if (this.authorityTarget == null) 10250 this.authorityTarget = new ArrayList<Organization>(); 10251 return this.authorityTarget; 10252 } 10253 10254 /** 10255 * @deprecated Use Reference#setResource(IBaseResource) instead 10256 */ 10257 @Deprecated 10258 public Organization addAuthorityTarget() { 10259 Organization r = new Organization(); 10260 if (this.authorityTarget == null) 10261 this.authorityTarget = new ArrayList<Organization>(); 10262 this.authorityTarget.add(r); 10263 return r; 10264 } 10265 10266 /** 10267 * @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.) 10268 */ 10269 public List<Reference> getDomain() { 10270 if (this.domain == null) 10271 this.domain = new ArrayList<Reference>(); 10272 return this.domain; 10273 } 10274 10275 /** 10276 * @return Returns a reference to <code>this</code> for easy method chaining 10277 */ 10278 public Contract setDomain(List<Reference> theDomain) { 10279 this.domain = theDomain; 10280 return this; 10281 } 10282 10283 public boolean hasDomain() { 10284 if (this.domain == null) 10285 return false; 10286 for (Reference item : this.domain) 10287 if (!item.isEmpty()) 10288 return true; 10289 return false; 10290 } 10291 10292 public Reference addDomain() { //3 10293 Reference t = new Reference(); 10294 if (this.domain == null) 10295 this.domain = new ArrayList<Reference>(); 10296 this.domain.add(t); 10297 return t; 10298 } 10299 10300 public Contract addDomain(Reference t) { //3 10301 if (t == null) 10302 return this; 10303 if (this.domain == null) 10304 this.domain = new ArrayList<Reference>(); 10305 this.domain.add(t); 10306 return this; 10307 } 10308 10309 /** 10310 * @return The first repetition of repeating field {@link #domain}, creating it if it does not already exist 10311 */ 10312 public Reference getDomainFirstRep() { 10313 if (getDomain().isEmpty()) { 10314 addDomain(); 10315 } 10316 return getDomain().get(0); 10317 } 10318 10319 /** 10320 * @deprecated Use Reference#setResource(IBaseResource) instead 10321 */ 10322 @Deprecated 10323 public List<Location> getDomainTarget() { 10324 if (this.domainTarget == null) 10325 this.domainTarget = new ArrayList<Location>(); 10326 return this.domainTarget; 10327 } 10328 10329 /** 10330 * @deprecated Use Reference#setResource(IBaseResource) instead 10331 */ 10332 @Deprecated 10333 public Location addDomainTarget() { 10334 Location r = new Location(); 10335 if (this.domainTarget == null) 10336 this.domainTarget = new ArrayList<Location>(); 10337 this.domainTarget.add(r); 10338 return r; 10339 } 10340 10341 /** 10342 * @return {@link #site} (Sites in which the contract is complied with, exercised, or in force.) 10343 */ 10344 public List<Reference> getSite() { 10345 if (this.site == null) 10346 this.site = new ArrayList<Reference>(); 10347 return this.site; 10348 } 10349 10350 /** 10351 * @return Returns a reference to <code>this</code> for easy method chaining 10352 */ 10353 public Contract setSite(List<Reference> theSite) { 10354 this.site = theSite; 10355 return this; 10356 } 10357 10358 public boolean hasSite() { 10359 if (this.site == null) 10360 return false; 10361 for (Reference item : this.site) 10362 if (!item.isEmpty()) 10363 return true; 10364 return false; 10365 } 10366 10367 public Reference addSite() { //3 10368 Reference t = new Reference(); 10369 if (this.site == null) 10370 this.site = new ArrayList<Reference>(); 10371 this.site.add(t); 10372 return t; 10373 } 10374 10375 public Contract addSite(Reference t) { //3 10376 if (t == null) 10377 return this; 10378 if (this.site == null) 10379 this.site = new ArrayList<Reference>(); 10380 this.site.add(t); 10381 return this; 10382 } 10383 10384 /** 10385 * @return The first repetition of repeating field {@link #site}, creating it if it does not already exist 10386 */ 10387 public Reference getSiteFirstRep() { 10388 if (getSite().isEmpty()) { 10389 addSite(); 10390 } 10391 return getSite().get(0); 10392 } 10393 10394 /** 10395 * @deprecated Use Reference#setResource(IBaseResource) instead 10396 */ 10397 @Deprecated 10398 public List<Location> getSiteTarget() { 10399 if (this.siteTarget == null) 10400 this.siteTarget = new ArrayList<Location>(); 10401 return this.siteTarget; 10402 } 10403 10404 /** 10405 * @deprecated Use Reference#setResource(IBaseResource) instead 10406 */ 10407 @Deprecated 10408 public Location addSiteTarget() { 10409 Location r = new Location(); 10410 if (this.siteTarget == null) 10411 this.siteTarget = new ArrayList<Location>(); 10412 this.siteTarget.add(r); 10413 return r; 10414 } 10415 10416 /** 10417 * @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 10418 */ 10419 public StringType getNameElement() { 10420 if (this.name == null) 10421 if (Configuration.errorOnAutoCreate()) 10422 throw new Error("Attempt to auto-create Contract.name"); 10423 else if (Configuration.doAutoCreate()) 10424 this.name = new StringType(); // bb 10425 return this.name; 10426 } 10427 10428 public boolean hasNameElement() { 10429 return this.name != null && !this.name.isEmpty(); 10430 } 10431 10432 public boolean hasName() { 10433 return this.name != null && !this.name.isEmpty(); 10434 } 10435 10436 /** 10437 * @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 10438 */ 10439 public Contract setNameElement(StringType value) { 10440 this.name = value; 10441 return this; 10442 } 10443 10444 /** 10445 * @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. 10446 */ 10447 public String getName() { 10448 return this.name == null ? null : this.name.getValue(); 10449 } 10450 10451 /** 10452 * @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. 10453 */ 10454 public Contract setName(String value) { 10455 if (Utilities.noString(value)) 10456 this.name = null; 10457 else { 10458 if (this.name == null) 10459 this.name = new StringType(); 10460 this.name.setValue(value); 10461 } 10462 return this; 10463 } 10464 10465 /** 10466 * @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 10467 */ 10468 public StringType getTitleElement() { 10469 if (this.title == null) 10470 if (Configuration.errorOnAutoCreate()) 10471 throw new Error("Attempt to auto-create Contract.title"); 10472 else if (Configuration.doAutoCreate()) 10473 this.title = new StringType(); // bb 10474 return this.title; 10475 } 10476 10477 public boolean hasTitleElement() { 10478 return this.title != null && !this.title.isEmpty(); 10479 } 10480 10481 public boolean hasTitle() { 10482 return this.title != null && !this.title.isEmpty(); 10483 } 10484 10485 /** 10486 * @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 10487 */ 10488 public Contract setTitleElement(StringType value) { 10489 this.title = value; 10490 return this; 10491 } 10492 10493 /** 10494 * @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. 10495 */ 10496 public String getTitle() { 10497 return this.title == null ? null : this.title.getValue(); 10498 } 10499 10500 /** 10501 * @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. 10502 */ 10503 public Contract setTitle(String value) { 10504 if (Utilities.noString(value)) 10505 this.title = null; 10506 else { 10507 if (this.title == null) 10508 this.title = new StringType(); 10509 this.title.setValue(value); 10510 } 10511 return this; 10512 } 10513 10514 /** 10515 * @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 10516 */ 10517 public StringType getSubtitleElement() { 10518 if (this.subtitle == null) 10519 if (Configuration.errorOnAutoCreate()) 10520 throw new Error("Attempt to auto-create Contract.subtitle"); 10521 else if (Configuration.doAutoCreate()) 10522 this.subtitle = new StringType(); // bb 10523 return this.subtitle; 10524 } 10525 10526 public boolean hasSubtitleElement() { 10527 return this.subtitle != null && !this.subtitle.isEmpty(); 10528 } 10529 10530 public boolean hasSubtitle() { 10531 return this.subtitle != null && !this.subtitle.isEmpty(); 10532 } 10533 10534 /** 10535 * @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 10536 */ 10537 public Contract setSubtitleElement(StringType value) { 10538 this.subtitle = value; 10539 return this; 10540 } 10541 10542 /** 10543 * @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. 10544 */ 10545 public String getSubtitle() { 10546 return this.subtitle == null ? null : this.subtitle.getValue(); 10547 } 10548 10549 /** 10550 * @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. 10551 */ 10552 public Contract setSubtitle(String value) { 10553 if (Utilities.noString(value)) 10554 this.subtitle = null; 10555 else { 10556 if (this.subtitle == null) 10557 this.subtitle = new StringType(); 10558 this.subtitle.setValue(value); 10559 } 10560 return this; 10561 } 10562 10563 /** 10564 * @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.) 10565 */ 10566 public List<StringType> getAlias() { 10567 if (this.alias == null) 10568 this.alias = new ArrayList<StringType>(); 10569 return this.alias; 10570 } 10571 10572 /** 10573 * @return Returns a reference to <code>this</code> for easy method chaining 10574 */ 10575 public Contract setAlias(List<StringType> theAlias) { 10576 this.alias = theAlias; 10577 return this; 10578 } 10579 10580 public boolean hasAlias() { 10581 if (this.alias == null) 10582 return false; 10583 for (StringType item : this.alias) 10584 if (!item.isEmpty()) 10585 return true; 10586 return false; 10587 } 10588 10589 /** 10590 * @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.) 10591 */ 10592 public StringType addAliasElement() {//2 10593 StringType t = new StringType(); 10594 if (this.alias == null) 10595 this.alias = new ArrayList<StringType>(); 10596 this.alias.add(t); 10597 return t; 10598 } 10599 10600 /** 10601 * @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.) 10602 */ 10603 public Contract addAlias(String value) { //1 10604 StringType t = new StringType(); 10605 t.setValue(value); 10606 if (this.alias == null) 10607 this.alias = new ArrayList<StringType>(); 10608 this.alias.add(t); 10609 return this; 10610 } 10611 10612 /** 10613 * @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.) 10614 */ 10615 public boolean hasAlias(String value) { 10616 if (this.alias == null) 10617 return false; 10618 for (StringType v : this.alias) 10619 if (v.getValue().equals(value)) // string 10620 return true; 10621 return false; 10622 } 10623 10624 /** 10625 * @return {@link #author} (The individual or organization that authored the Contract definition, derivative, or instance in any legal state.) 10626 */ 10627 public Reference getAuthor() { 10628 if (this.author == null) 10629 if (Configuration.errorOnAutoCreate()) 10630 throw new Error("Attempt to auto-create Contract.author"); 10631 else if (Configuration.doAutoCreate()) 10632 this.author = new Reference(); // cc 10633 return this.author; 10634 } 10635 10636 public boolean hasAuthor() { 10637 return this.author != null && !this.author.isEmpty(); 10638 } 10639 10640 /** 10641 * @param value {@link #author} (The individual or organization that authored the Contract definition, derivative, or instance in any legal state.) 10642 */ 10643 public Contract setAuthor(Reference value) { 10644 this.author = value; 10645 return this; 10646 } 10647 10648 /** 10649 * @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.) 10650 */ 10651 public Resource getAuthorTarget() { 10652 return this.authorTarget; 10653 } 10654 10655 /** 10656 * @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.) 10657 */ 10658 public Contract setAuthorTarget(Resource value) { 10659 this.authorTarget = value; 10660 return this; 10661 } 10662 10663 /** 10664 * @return {@link #scope} (A selector of legal concerns for this Contract definition, derivative, or instance in any legal state.) 10665 */ 10666 public CodeableConcept getScope() { 10667 if (this.scope == null) 10668 if (Configuration.errorOnAutoCreate()) 10669 throw new Error("Attempt to auto-create Contract.scope"); 10670 else if (Configuration.doAutoCreate()) 10671 this.scope = new CodeableConcept(); // cc 10672 return this.scope; 10673 } 10674 10675 public boolean hasScope() { 10676 return this.scope != null && !this.scope.isEmpty(); 10677 } 10678 10679 /** 10680 * @param value {@link #scope} (A selector of legal concerns for this Contract definition, derivative, or instance in any legal state.) 10681 */ 10682 public Contract setScope(CodeableConcept value) { 10683 this.scope = value; 10684 return this; 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 Type getTopic() { 10691 return this.topic; 10692 } 10693 10694 /** 10695 * @return {@link #topic} (Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.) 10696 */ 10697 public CodeableConcept getTopicCodeableConcept() throws FHIRException { 10698 if (this.topic == null) 10699 this.topic = new CodeableConcept(); 10700 if (!(this.topic instanceof CodeableConcept)) 10701 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.topic.getClass().getName()+" was encountered"); 10702 return (CodeableConcept) this.topic; 10703 } 10704 10705 public boolean hasTopicCodeableConcept() { 10706 return this != null && this.topic instanceof CodeableConcept; 10707 } 10708 10709 /** 10710 * @return {@link #topic} (Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.) 10711 */ 10712 public Reference getTopicReference() throws FHIRException { 10713 if (this.topic == null) 10714 this.topic = new Reference(); 10715 if (!(this.topic instanceof Reference)) 10716 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.topic.getClass().getName()+" was encountered"); 10717 return (Reference) this.topic; 10718 } 10719 10720 public boolean hasTopicReference() { 10721 return this != null && this.topic instanceof Reference; 10722 } 10723 10724 public boolean hasTopic() { 10725 return this.topic != null && !this.topic.isEmpty(); 10726 } 10727 10728 /** 10729 * @param value {@link #topic} (Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.) 10730 */ 10731 public Contract setTopic(Type value) { 10732 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 10733 throw new Error("Not the right type for Contract.topic[x]: "+value.fhirType()); 10734 this.topic = value; 10735 return this; 10736 } 10737 10738 /** 10739 * @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.) 10740 */ 10741 public CodeableConcept getType() { 10742 if (this.type == null) 10743 if (Configuration.errorOnAutoCreate()) 10744 throw new Error("Attempt to auto-create Contract.type"); 10745 else if (Configuration.doAutoCreate()) 10746 this.type = new CodeableConcept(); // cc 10747 return this.type; 10748 } 10749 10750 public boolean hasType() { 10751 return this.type != null && !this.type.isEmpty(); 10752 } 10753 10754 /** 10755 * @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.) 10756 */ 10757 public Contract setType(CodeableConcept value) { 10758 this.type = value; 10759 return this; 10760 } 10761 10762 /** 10763 * @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.) 10764 */ 10765 public List<CodeableConcept> getSubType() { 10766 if (this.subType == null) 10767 this.subType = new ArrayList<CodeableConcept>(); 10768 return this.subType; 10769 } 10770 10771 /** 10772 * @return Returns a reference to <code>this</code> for easy method chaining 10773 */ 10774 public Contract setSubType(List<CodeableConcept> theSubType) { 10775 this.subType = theSubType; 10776 return this; 10777 } 10778 10779 public boolean hasSubType() { 10780 if (this.subType == null) 10781 return false; 10782 for (CodeableConcept item : this.subType) 10783 if (!item.isEmpty()) 10784 return true; 10785 return false; 10786 } 10787 10788 public CodeableConcept addSubType() { //3 10789 CodeableConcept t = new CodeableConcept(); 10790 if (this.subType == null) 10791 this.subType = new ArrayList<CodeableConcept>(); 10792 this.subType.add(t); 10793 return t; 10794 } 10795 10796 public Contract addSubType(CodeableConcept t) { //3 10797 if (t == null) 10798 return this; 10799 if (this.subType == null) 10800 this.subType = new ArrayList<CodeableConcept>(); 10801 this.subType.add(t); 10802 return this; 10803 } 10804 10805 /** 10806 * @return The first repetition of repeating field {@link #subType}, creating it if it does not already exist 10807 */ 10808 public CodeableConcept getSubTypeFirstRep() { 10809 if (getSubType().isEmpty()) { 10810 addSubType(); 10811 } 10812 return getSubType().get(0); 10813 } 10814 10815 /** 10816 * @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.) 10817 */ 10818 public ContentDefinitionComponent getContentDefinition() { 10819 if (this.contentDefinition == null) 10820 if (Configuration.errorOnAutoCreate()) 10821 throw new Error("Attempt to auto-create Contract.contentDefinition"); 10822 else if (Configuration.doAutoCreate()) 10823 this.contentDefinition = new ContentDefinitionComponent(); // cc 10824 return this.contentDefinition; 10825 } 10826 10827 public boolean hasContentDefinition() { 10828 return this.contentDefinition != null && !this.contentDefinition.isEmpty(); 10829 } 10830 10831 /** 10832 * @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.) 10833 */ 10834 public Contract setContentDefinition(ContentDefinitionComponent value) { 10835 this.contentDefinition = value; 10836 return this; 10837 } 10838 10839 /** 10840 * @return {@link #term} (One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.) 10841 */ 10842 public List<TermComponent> getTerm() { 10843 if (this.term == null) 10844 this.term = new ArrayList<TermComponent>(); 10845 return this.term; 10846 } 10847 10848 /** 10849 * @return Returns a reference to <code>this</code> for easy method chaining 10850 */ 10851 public Contract setTerm(List<TermComponent> theTerm) { 10852 this.term = theTerm; 10853 return this; 10854 } 10855 10856 public boolean hasTerm() { 10857 if (this.term == null) 10858 return false; 10859 for (TermComponent item : this.term) 10860 if (!item.isEmpty()) 10861 return true; 10862 return false; 10863 } 10864 10865 public TermComponent addTerm() { //3 10866 TermComponent t = new TermComponent(); 10867 if (this.term == null) 10868 this.term = new ArrayList<TermComponent>(); 10869 this.term.add(t); 10870 return t; 10871 } 10872 10873 public Contract addTerm(TermComponent t) { //3 10874 if (t == null) 10875 return this; 10876 if (this.term == null) 10877 this.term = new ArrayList<TermComponent>(); 10878 this.term.add(t); 10879 return this; 10880 } 10881 10882 /** 10883 * @return The first repetition of repeating field {@link #term}, creating it if it does not already exist 10884 */ 10885 public TermComponent getTermFirstRep() { 10886 if (getTerm().isEmpty()) { 10887 addTerm(); 10888 } 10889 return getTerm().get(0); 10890 } 10891 10892 /** 10893 * @return {@link #supportingInfo} (Information that may be needed by/relevant to the performer in their execution of this term action.) 10894 */ 10895 public List<Reference> getSupportingInfo() { 10896 if (this.supportingInfo == null) 10897 this.supportingInfo = new ArrayList<Reference>(); 10898 return this.supportingInfo; 10899 } 10900 10901 /** 10902 * @return Returns a reference to <code>this</code> for easy method chaining 10903 */ 10904 public Contract setSupportingInfo(List<Reference> theSupportingInfo) { 10905 this.supportingInfo = theSupportingInfo; 10906 return this; 10907 } 10908 10909 public boolean hasSupportingInfo() { 10910 if (this.supportingInfo == null) 10911 return false; 10912 for (Reference item : this.supportingInfo) 10913 if (!item.isEmpty()) 10914 return true; 10915 return false; 10916 } 10917 10918 public Reference addSupportingInfo() { //3 10919 Reference t = new Reference(); 10920 if (this.supportingInfo == null) 10921 this.supportingInfo = new ArrayList<Reference>(); 10922 this.supportingInfo.add(t); 10923 return t; 10924 } 10925 10926 public Contract addSupportingInfo(Reference t) { //3 10927 if (t == null) 10928 return this; 10929 if (this.supportingInfo == null) 10930 this.supportingInfo = new ArrayList<Reference>(); 10931 this.supportingInfo.add(t); 10932 return this; 10933 } 10934 10935 /** 10936 * @return The first repetition of repeating field {@link #supportingInfo}, creating it if it does not already exist 10937 */ 10938 public Reference getSupportingInfoFirstRep() { 10939 if (getSupportingInfo().isEmpty()) { 10940 addSupportingInfo(); 10941 } 10942 return getSupportingInfo().get(0); 10943 } 10944 10945 /** 10946 * @deprecated Use Reference#setResource(IBaseResource) instead 10947 */ 10948 @Deprecated 10949 public List<Resource> getSupportingInfoTarget() { 10950 if (this.supportingInfoTarget == null) 10951 this.supportingInfoTarget = new ArrayList<Resource>(); 10952 return this.supportingInfoTarget; 10953 } 10954 10955 /** 10956 * @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.) 10957 */ 10958 public List<Reference> getRelevantHistory() { 10959 if (this.relevantHistory == null) 10960 this.relevantHistory = new ArrayList<Reference>(); 10961 return this.relevantHistory; 10962 } 10963 10964 /** 10965 * @return Returns a reference to <code>this</code> for easy method chaining 10966 */ 10967 public Contract setRelevantHistory(List<Reference> theRelevantHistory) { 10968 this.relevantHistory = theRelevantHistory; 10969 return this; 10970 } 10971 10972 public boolean hasRelevantHistory() { 10973 if (this.relevantHistory == null) 10974 return false; 10975 for (Reference item : this.relevantHistory) 10976 if (!item.isEmpty()) 10977 return true; 10978 return false; 10979 } 10980 10981 public Reference addRelevantHistory() { //3 10982 Reference t = new Reference(); 10983 if (this.relevantHistory == null) 10984 this.relevantHistory = new ArrayList<Reference>(); 10985 this.relevantHistory.add(t); 10986 return t; 10987 } 10988 10989 public Contract addRelevantHistory(Reference t) { //3 10990 if (t == null) 10991 return this; 10992 if (this.relevantHistory == null) 10993 this.relevantHistory = new ArrayList<Reference>(); 10994 this.relevantHistory.add(t); 10995 return this; 10996 } 10997 10998 /** 10999 * @return The first repetition of repeating field {@link #relevantHistory}, creating it if it does not already exist 11000 */ 11001 public Reference getRelevantHistoryFirstRep() { 11002 if (getRelevantHistory().isEmpty()) { 11003 addRelevantHistory(); 11004 } 11005 return getRelevantHistory().get(0); 11006 } 11007 11008 /** 11009 * @deprecated Use Reference#setResource(IBaseResource) instead 11010 */ 11011 @Deprecated 11012 public List<Provenance> getRelevantHistoryTarget() { 11013 if (this.relevantHistoryTarget == null) 11014 this.relevantHistoryTarget = new ArrayList<Provenance>(); 11015 return this.relevantHistoryTarget; 11016 } 11017 11018 /** 11019 * @deprecated Use Reference#setResource(IBaseResource) instead 11020 */ 11021 @Deprecated 11022 public Provenance addRelevantHistoryTarget() { 11023 Provenance r = new Provenance(); 11024 if (this.relevantHistoryTarget == null) 11025 this.relevantHistoryTarget = new ArrayList<Provenance>(); 11026 this.relevantHistoryTarget.add(r); 11027 return r; 11028 } 11029 11030 /** 11031 * @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.) 11032 */ 11033 public List<SignatoryComponent> getSigner() { 11034 if (this.signer == null) 11035 this.signer = new ArrayList<SignatoryComponent>(); 11036 return this.signer; 11037 } 11038 11039 /** 11040 * @return Returns a reference to <code>this</code> for easy method chaining 11041 */ 11042 public Contract setSigner(List<SignatoryComponent> theSigner) { 11043 this.signer = theSigner; 11044 return this; 11045 } 11046 11047 public boolean hasSigner() { 11048 if (this.signer == null) 11049 return false; 11050 for (SignatoryComponent item : this.signer) 11051 if (!item.isEmpty()) 11052 return true; 11053 return false; 11054 } 11055 11056 public SignatoryComponent addSigner() { //3 11057 SignatoryComponent t = new SignatoryComponent(); 11058 if (this.signer == null) 11059 this.signer = new ArrayList<SignatoryComponent>(); 11060 this.signer.add(t); 11061 return t; 11062 } 11063 11064 public Contract addSigner(SignatoryComponent t) { //3 11065 if (t == null) 11066 return this; 11067 if (this.signer == null) 11068 this.signer = new ArrayList<SignatoryComponent>(); 11069 this.signer.add(t); 11070 return this; 11071 } 11072 11073 /** 11074 * @return The first repetition of repeating field {@link #signer}, creating it if it does not already exist 11075 */ 11076 public SignatoryComponent getSignerFirstRep() { 11077 if (getSigner().isEmpty()) { 11078 addSigner(); 11079 } 11080 return getSigner().get(0); 11081 } 11082 11083 /** 11084 * @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.) 11085 */ 11086 public List<FriendlyLanguageComponent> getFriendly() { 11087 if (this.friendly == null) 11088 this.friendly = new ArrayList<FriendlyLanguageComponent>(); 11089 return this.friendly; 11090 } 11091 11092 /** 11093 * @return Returns a reference to <code>this</code> for easy method chaining 11094 */ 11095 public Contract setFriendly(List<FriendlyLanguageComponent> theFriendly) { 11096 this.friendly = theFriendly; 11097 return this; 11098 } 11099 11100 public boolean hasFriendly() { 11101 if (this.friendly == null) 11102 return false; 11103 for (FriendlyLanguageComponent item : this.friendly) 11104 if (!item.isEmpty()) 11105 return true; 11106 return false; 11107 } 11108 11109 public FriendlyLanguageComponent addFriendly() { //3 11110 FriendlyLanguageComponent t = new FriendlyLanguageComponent(); 11111 if (this.friendly == null) 11112 this.friendly = new ArrayList<FriendlyLanguageComponent>(); 11113 this.friendly.add(t); 11114 return t; 11115 } 11116 11117 public Contract addFriendly(FriendlyLanguageComponent t) { //3 11118 if (t == null) 11119 return this; 11120 if (this.friendly == null) 11121 this.friendly = new ArrayList<FriendlyLanguageComponent>(); 11122 this.friendly.add(t); 11123 return this; 11124 } 11125 11126 /** 11127 * @return The first repetition of repeating field {@link #friendly}, creating it if it does not already exist 11128 */ 11129 public FriendlyLanguageComponent getFriendlyFirstRep() { 11130 if (getFriendly().isEmpty()) { 11131 addFriendly(); 11132 } 11133 return getFriendly().get(0); 11134 } 11135 11136 /** 11137 * @return {@link #legal} (List of Legal expressions or representations of this Contract.) 11138 */ 11139 public List<LegalLanguageComponent> getLegal() { 11140 if (this.legal == null) 11141 this.legal = new ArrayList<LegalLanguageComponent>(); 11142 return this.legal; 11143 } 11144 11145 /** 11146 * @return Returns a reference to <code>this</code> for easy method chaining 11147 */ 11148 public Contract setLegal(List<LegalLanguageComponent> theLegal) { 11149 this.legal = theLegal; 11150 return this; 11151 } 11152 11153 public boolean hasLegal() { 11154 if (this.legal == null) 11155 return false; 11156 for (LegalLanguageComponent item : this.legal) 11157 if (!item.isEmpty()) 11158 return true; 11159 return false; 11160 } 11161 11162 public LegalLanguageComponent addLegal() { //3 11163 LegalLanguageComponent t = new LegalLanguageComponent(); 11164 if (this.legal == null) 11165 this.legal = new ArrayList<LegalLanguageComponent>(); 11166 this.legal.add(t); 11167 return t; 11168 } 11169 11170 public Contract addLegal(LegalLanguageComponent t) { //3 11171 if (t == null) 11172 return this; 11173 if (this.legal == null) 11174 this.legal = new ArrayList<LegalLanguageComponent>(); 11175 this.legal.add(t); 11176 return this; 11177 } 11178 11179 /** 11180 * @return The first repetition of repeating field {@link #legal}, creating it if it does not already exist 11181 */ 11182 public LegalLanguageComponent getLegalFirstRep() { 11183 if (getLegal().isEmpty()) { 11184 addLegal(); 11185 } 11186 return getLegal().get(0); 11187 } 11188 11189 /** 11190 * @return {@link #rule} (List of Computable Policy Rule Language Representations of this Contract.) 11191 */ 11192 public List<ComputableLanguageComponent> getRule() { 11193 if (this.rule == null) 11194 this.rule = new ArrayList<ComputableLanguageComponent>(); 11195 return this.rule; 11196 } 11197 11198 /** 11199 * @return Returns a reference to <code>this</code> for easy method chaining 11200 */ 11201 public Contract setRule(List<ComputableLanguageComponent> theRule) { 11202 this.rule = theRule; 11203 return this; 11204 } 11205 11206 public boolean hasRule() { 11207 if (this.rule == null) 11208 return false; 11209 for (ComputableLanguageComponent item : this.rule) 11210 if (!item.isEmpty()) 11211 return true; 11212 return false; 11213 } 11214 11215 public ComputableLanguageComponent addRule() { //3 11216 ComputableLanguageComponent t = new ComputableLanguageComponent(); 11217 if (this.rule == null) 11218 this.rule = new ArrayList<ComputableLanguageComponent>(); 11219 this.rule.add(t); 11220 return t; 11221 } 11222 11223 public Contract addRule(ComputableLanguageComponent t) { //3 11224 if (t == null) 11225 return this; 11226 if (this.rule == null) 11227 this.rule = new ArrayList<ComputableLanguageComponent>(); 11228 this.rule.add(t); 11229 return this; 11230 } 11231 11232 /** 11233 * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist 11234 */ 11235 public ComputableLanguageComponent getRuleFirstRep() { 11236 if (getRule().isEmpty()) { 11237 addRule(); 11238 } 11239 return getRule().get(0); 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 Type getLegallyBinding() { 11246 return this.legallyBinding; 11247 } 11248 11249 /** 11250 * @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.) 11251 */ 11252 public Attachment getLegallyBindingAttachment() throws FHIRException { 11253 if (this.legallyBinding == null) 11254 this.legallyBinding = new Attachment(); 11255 if (!(this.legallyBinding instanceof Attachment)) 11256 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.legallyBinding.getClass().getName()+" was encountered"); 11257 return (Attachment) this.legallyBinding; 11258 } 11259 11260 public boolean hasLegallyBindingAttachment() { 11261 return this != null && this.legallyBinding instanceof Attachment; 11262 } 11263 11264 /** 11265 * @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.) 11266 */ 11267 public Reference getLegallyBindingReference() throws FHIRException { 11268 if (this.legallyBinding == null) 11269 this.legallyBinding = new Reference(); 11270 if (!(this.legallyBinding instanceof Reference)) 11271 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.legallyBinding.getClass().getName()+" was encountered"); 11272 return (Reference) this.legallyBinding; 11273 } 11274 11275 public boolean hasLegallyBindingReference() { 11276 return this != null && this.legallyBinding instanceof Reference; 11277 } 11278 11279 public boolean hasLegallyBinding() { 11280 return this.legallyBinding != null && !this.legallyBinding.isEmpty(); 11281 } 11282 11283 /** 11284 * @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.) 11285 */ 11286 public Contract setLegallyBinding(Type value) { 11287 if (value != null && !(value instanceof Attachment || value instanceof Reference)) 11288 throw new Error("Not the right type for Contract.legallyBinding[x]: "+value.fhirType()); 11289 this.legallyBinding = value; 11290 return this; 11291 } 11292 11293 protected void listChildren(List<Property> children) { 11294 super.listChildren(children); 11295 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)); 11296 children.add(new Property("url", "uri", "Canonical identifier for this contract, represented as a URI (globally unique).", 0, 1, url)); 11297 children.add(new Property("version", "string", "An edition identifier used for business purposes to label business significant variants.", 0, 1, version)); 11298 children.add(new Property("status", "code", "The status of the resource instance.", 0, 1, status)); 11299 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)); 11300 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)); 11301 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)); 11302 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)); 11303 children.add(new Property("issued", "dateTime", "When this Contract was issued.", 0, 1, issued)); 11304 children.add(new Property("applies", "Period", "Relevant time or time-period when this Contract is applicable.", 0, 1, applies)); 11305 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)); 11306 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)); 11307 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)); 11308 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)); 11309 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)); 11310 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)); 11311 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)); 11312 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)); 11313 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)); 11314 children.add(new Property("author", "Reference(Patient|Practitioner|PractitionerRole|Organization)", "The individual or organization that authored the Contract definition, derivative, or instance in any legal state.", 0, 1, author)); 11315 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)); 11316 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)); 11317 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)); 11318 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)); 11319 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)); 11320 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)); 11321 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)); 11322 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)); 11323 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)); 11324 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)); 11325 children.add(new Property("legal", "", "List of Legal expressions or representations of this Contract.", 0, java.lang.Integer.MAX_VALUE, legal)); 11326 children.add(new Property("rule", "", "List of Computable Policy Rule Language Representations of this Contract.", 0, java.lang.Integer.MAX_VALUE, rule)); 11327 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)); 11328 } 11329 11330 @Override 11331 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 11332 switch (_hash) { 11333 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); 11334 case 116079: /*url*/ return new Property("url", "uri", "Canonical identifier for this contract, represented as a URI (globally unique).", 0, 1, url); 11335 case 351608024: /*version*/ return new Property("version", "string", "An edition identifier used for business purposes to label business significant variants.", 0, 1, version); 11336 case -892481550: /*status*/ return new Property("status", "code", "The status of the resource instance.", 0, 1, status); 11337 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); 11338 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); 11339 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); 11340 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); 11341 case -1179159893: /*issued*/ return new Property("issued", "dateTime", "When this Contract was issued.", 0, 1, issued); 11342 case -793235316: /*applies*/ return new Property("applies", "Period", "Relevant time or time-period when this Contract is applicable.", 0, 1, applies); 11343 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); 11344 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); 11345 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); 11346 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); 11347 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); 11348 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); 11349 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); 11350 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); 11351 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); 11352 case -1406328437: /*author*/ return new Property("author", "Reference(Patient|Practitioner|PractitionerRole|Organization)", "The individual or organization that authored the Contract definition, derivative, or instance in any legal state.", 0, 1, author); 11353 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); 11354 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); 11355 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); 11356 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); 11357 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); 11358 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); 11359 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); 11360 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); 11361 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); 11362 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); 11363 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); 11364 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); 11365 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); 11366 case 102851257: /*legal*/ return new Property("legal", "", "List of Legal expressions or representations of this Contract.", 0, java.lang.Integer.MAX_VALUE, legal); 11367 case 3512060: /*rule*/ return new Property("rule", "", "List of Computable Policy Rule Language Representations of this Contract.", 0, java.lang.Integer.MAX_VALUE, rule); 11368 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); 11369 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); 11370 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); 11371 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); 11372 default: return super.getNamedProperty(_hash, _name, _checkValid); 11373 } 11374 11375 } 11376 11377 @Override 11378 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 11379 switch (hash) { 11380 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 11381 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 11382 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 11383 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ContractStatus> 11384 case 568606040: /*legalState*/ return this.legalState == null ? new Base[0] : new Base[] {this.legalState}; // CodeableConcept 11385 case 8911915: /*instantiatesCanonical*/ return this.instantiatesCanonical == null ? new Base[0] : new Base[] {this.instantiatesCanonical}; // Reference 11386 case -1926393373: /*instantiatesUri*/ return this.instantiatesUri == null ? new Base[0] : new Base[] {this.instantiatesUri}; // UriType 11387 case -92412192: /*contentDerivative*/ return this.contentDerivative == null ? new Base[0] : new Base[] {this.contentDerivative}; // CodeableConcept 11388 case -1179159893: /*issued*/ return this.issued == null ? new Base[0] : new Base[] {this.issued}; // DateTimeType 11389 case -793235316: /*applies*/ return this.applies == null ? new Base[0] : new Base[] {this.applies}; // Period 11390 case -668311927: /*expirationType*/ return this.expirationType == null ? new Base[0] : new Base[] {this.expirationType}; // CodeableConcept 11391 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : this.subject.toArray(new Base[this.subject.size()]); // Reference 11392 case 1475610435: /*authority*/ return this.authority == null ? new Base[0] : this.authority.toArray(new Base[this.authority.size()]); // Reference 11393 case -1326197564: /*domain*/ return this.domain == null ? new Base[0] : this.domain.toArray(new Base[this.domain.size()]); // Reference 11394 case 3530567: /*site*/ return this.site == null ? new Base[0] : this.site.toArray(new Base[this.site.size()]); // Reference 11395 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 11396 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 11397 case -2060497896: /*subtitle*/ return this.subtitle == null ? new Base[0] : new Base[] {this.subtitle}; // StringType 11398 case 92902992: /*alias*/ return this.alias == null ? new Base[0] : this.alias.toArray(new Base[this.alias.size()]); // StringType 11399 case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Reference 11400 case 109264468: /*scope*/ return this.scope == null ? new Base[0] : new Base[] {this.scope}; // CodeableConcept 11401 case 110546223: /*topic*/ return this.topic == null ? new Base[0] : new Base[] {this.topic}; // Type 11402 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 11403 case -1868521062: /*subType*/ return this.subType == null ? new Base[0] : this.subType.toArray(new Base[this.subType.size()]); // CodeableConcept 11404 case 247055020: /*contentDefinition*/ return this.contentDefinition == null ? new Base[0] : new Base[] {this.contentDefinition}; // ContentDefinitionComponent 11405 case 3556460: /*term*/ return this.term == null ? new Base[0] : this.term.toArray(new Base[this.term.size()]); // TermComponent 11406 case 1922406657: /*supportingInfo*/ return this.supportingInfo == null ? new Base[0] : this.supportingInfo.toArray(new Base[this.supportingInfo.size()]); // Reference 11407 case 1538891575: /*relevantHistory*/ return this.relevantHistory == null ? new Base[0] : this.relevantHistory.toArray(new Base[this.relevantHistory.size()]); // Reference 11408 case -902467798: /*signer*/ return this.signer == null ? new Base[0] : this.signer.toArray(new Base[this.signer.size()]); // SignatoryComponent 11409 case -1423054677: /*friendly*/ return this.friendly == null ? new Base[0] : this.friendly.toArray(new Base[this.friendly.size()]); // FriendlyLanguageComponent 11410 case 102851257: /*legal*/ return this.legal == null ? new Base[0] : this.legal.toArray(new Base[this.legal.size()]); // LegalLanguageComponent 11411 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // ComputableLanguageComponent 11412 case -126751329: /*legallyBinding*/ return this.legallyBinding == null ? new Base[0] : new Base[] {this.legallyBinding}; // Type 11413 default: return super.getProperty(hash, name, checkValid); 11414 } 11415 11416 } 11417 11418 @Override 11419 public Base setProperty(int hash, String name, Base value) throws FHIRException { 11420 switch (hash) { 11421 case -1618432855: // identifier 11422 this.getIdentifier().add(castToIdentifier(value)); // Identifier 11423 return value; 11424 case 116079: // url 11425 this.url = castToUri(value); // UriType 11426 return value; 11427 case 351608024: // version 11428 this.version = castToString(value); // StringType 11429 return value; 11430 case -892481550: // status 11431 value = new ContractStatusEnumFactory().fromType(castToCode(value)); 11432 this.status = (Enumeration) value; // Enumeration<ContractStatus> 11433 return value; 11434 case 568606040: // legalState 11435 this.legalState = castToCodeableConcept(value); // CodeableConcept 11436 return value; 11437 case 8911915: // instantiatesCanonical 11438 this.instantiatesCanonical = castToReference(value); // Reference 11439 return value; 11440 case -1926393373: // instantiatesUri 11441 this.instantiatesUri = castToUri(value); // UriType 11442 return value; 11443 case -92412192: // contentDerivative 11444 this.contentDerivative = castToCodeableConcept(value); // CodeableConcept 11445 return value; 11446 case -1179159893: // issued 11447 this.issued = castToDateTime(value); // DateTimeType 11448 return value; 11449 case -793235316: // applies 11450 this.applies = castToPeriod(value); // Period 11451 return value; 11452 case -668311927: // expirationType 11453 this.expirationType = castToCodeableConcept(value); // CodeableConcept 11454 return value; 11455 case -1867885268: // subject 11456 this.getSubject().add(castToReference(value)); // Reference 11457 return value; 11458 case 1475610435: // authority 11459 this.getAuthority().add(castToReference(value)); // Reference 11460 return value; 11461 case -1326197564: // domain 11462 this.getDomain().add(castToReference(value)); // Reference 11463 return value; 11464 case 3530567: // site 11465 this.getSite().add(castToReference(value)); // Reference 11466 return value; 11467 case 3373707: // name 11468 this.name = castToString(value); // StringType 11469 return value; 11470 case 110371416: // title 11471 this.title = castToString(value); // StringType 11472 return value; 11473 case -2060497896: // subtitle 11474 this.subtitle = castToString(value); // StringType 11475 return value; 11476 case 92902992: // alias 11477 this.getAlias().add(castToString(value)); // StringType 11478 return value; 11479 case -1406328437: // author 11480 this.author = castToReference(value); // Reference 11481 return value; 11482 case 109264468: // scope 11483 this.scope = castToCodeableConcept(value); // CodeableConcept 11484 return value; 11485 case 110546223: // topic 11486 this.topic = castToType(value); // Type 11487 return value; 11488 case 3575610: // type 11489 this.type = castToCodeableConcept(value); // CodeableConcept 11490 return value; 11491 case -1868521062: // subType 11492 this.getSubType().add(castToCodeableConcept(value)); // CodeableConcept 11493 return value; 11494 case 247055020: // contentDefinition 11495 this.contentDefinition = (ContentDefinitionComponent) value; // ContentDefinitionComponent 11496 return value; 11497 case 3556460: // term 11498 this.getTerm().add((TermComponent) value); // TermComponent 11499 return value; 11500 case 1922406657: // supportingInfo 11501 this.getSupportingInfo().add(castToReference(value)); // Reference 11502 return value; 11503 case 1538891575: // relevantHistory 11504 this.getRelevantHistory().add(castToReference(value)); // Reference 11505 return value; 11506 case -902467798: // signer 11507 this.getSigner().add((SignatoryComponent) value); // SignatoryComponent 11508 return value; 11509 case -1423054677: // friendly 11510 this.getFriendly().add((FriendlyLanguageComponent) value); // FriendlyLanguageComponent 11511 return value; 11512 case 102851257: // legal 11513 this.getLegal().add((LegalLanguageComponent) value); // LegalLanguageComponent 11514 return value; 11515 case 3512060: // rule 11516 this.getRule().add((ComputableLanguageComponent) value); // ComputableLanguageComponent 11517 return value; 11518 case -126751329: // legallyBinding 11519 this.legallyBinding = castToType(value); // Type 11520 return value; 11521 default: return super.setProperty(hash, name, value); 11522 } 11523 11524 } 11525 11526 @Override 11527 public Base setProperty(String name, Base value) throws FHIRException { 11528 if (name.equals("identifier")) { 11529 this.getIdentifier().add(castToIdentifier(value)); 11530 } else if (name.equals("url")) { 11531 this.url = castToUri(value); // UriType 11532 } else if (name.equals("version")) { 11533 this.version = castToString(value); // StringType 11534 } else if (name.equals("status")) { 11535 value = new ContractStatusEnumFactory().fromType(castToCode(value)); 11536 this.status = (Enumeration) value; // Enumeration<ContractStatus> 11537 } else if (name.equals("legalState")) { 11538 this.legalState = castToCodeableConcept(value); // CodeableConcept 11539 } else if (name.equals("instantiatesCanonical")) { 11540 this.instantiatesCanonical = castToReference(value); // Reference 11541 } else if (name.equals("instantiatesUri")) { 11542 this.instantiatesUri = castToUri(value); // UriType 11543 } else if (name.equals("contentDerivative")) { 11544 this.contentDerivative = castToCodeableConcept(value); // CodeableConcept 11545 } else if (name.equals("issued")) { 11546 this.issued = castToDateTime(value); // DateTimeType 11547 } else if (name.equals("applies")) { 11548 this.applies = castToPeriod(value); // Period 11549 } else if (name.equals("expirationType")) { 11550 this.expirationType = castToCodeableConcept(value); // CodeableConcept 11551 } else if (name.equals("subject")) { 11552 this.getSubject().add(castToReference(value)); 11553 } else if (name.equals("authority")) { 11554 this.getAuthority().add(castToReference(value)); 11555 } else if (name.equals("domain")) { 11556 this.getDomain().add(castToReference(value)); 11557 } else if (name.equals("site")) { 11558 this.getSite().add(castToReference(value)); 11559 } else if (name.equals("name")) { 11560 this.name = castToString(value); // StringType 11561 } else if (name.equals("title")) { 11562 this.title = castToString(value); // StringType 11563 } else if (name.equals("subtitle")) { 11564 this.subtitle = castToString(value); // StringType 11565 } else if (name.equals("alias")) { 11566 this.getAlias().add(castToString(value)); 11567 } else if (name.equals("author")) { 11568 this.author = castToReference(value); // Reference 11569 } else if (name.equals("scope")) { 11570 this.scope = castToCodeableConcept(value); // CodeableConcept 11571 } else if (name.equals("topic[x]")) { 11572 this.topic = castToType(value); // Type 11573 } else if (name.equals("type")) { 11574 this.type = castToCodeableConcept(value); // CodeableConcept 11575 } else if (name.equals("subType")) { 11576 this.getSubType().add(castToCodeableConcept(value)); 11577 } else if (name.equals("contentDefinition")) { 11578 this.contentDefinition = (ContentDefinitionComponent) value; // ContentDefinitionComponent 11579 } else if (name.equals("term")) { 11580 this.getTerm().add((TermComponent) value); 11581 } else if (name.equals("supportingInfo")) { 11582 this.getSupportingInfo().add(castToReference(value)); 11583 } else if (name.equals("relevantHistory")) { 11584 this.getRelevantHistory().add(castToReference(value)); 11585 } else if (name.equals("signer")) { 11586 this.getSigner().add((SignatoryComponent) value); 11587 } else if (name.equals("friendly")) { 11588 this.getFriendly().add((FriendlyLanguageComponent) value); 11589 } else if (name.equals("legal")) { 11590 this.getLegal().add((LegalLanguageComponent) value); 11591 } else if (name.equals("rule")) { 11592 this.getRule().add((ComputableLanguageComponent) value); 11593 } else if (name.equals("legallyBinding[x]")) { 11594 this.legallyBinding = castToType(value); // Type 11595 } else 11596 return super.setProperty(name, value); 11597 return value; 11598 } 11599 11600 @Override 11601 public Base makeProperty(int hash, String name) throws FHIRException { 11602 switch (hash) { 11603 case -1618432855: return addIdentifier(); 11604 case 116079: return getUrlElement(); 11605 case 351608024: return getVersionElement(); 11606 case -892481550: return getStatusElement(); 11607 case 568606040: return getLegalState(); 11608 case 8911915: return getInstantiatesCanonical(); 11609 case -1926393373: return getInstantiatesUriElement(); 11610 case -92412192: return getContentDerivative(); 11611 case -1179159893: return getIssuedElement(); 11612 case -793235316: return getApplies(); 11613 case -668311927: return getExpirationType(); 11614 case -1867885268: return addSubject(); 11615 case 1475610435: return addAuthority(); 11616 case -1326197564: return addDomain(); 11617 case 3530567: return addSite(); 11618 case 3373707: return getNameElement(); 11619 case 110371416: return getTitleElement(); 11620 case -2060497896: return getSubtitleElement(); 11621 case 92902992: return addAliasElement(); 11622 case -1406328437: return getAuthor(); 11623 case 109264468: return getScope(); 11624 case -957295375: return getTopic(); 11625 case 110546223: return getTopic(); 11626 case 3575610: return getType(); 11627 case -1868521062: return addSubType(); 11628 case 247055020: return getContentDefinition(); 11629 case 3556460: return addTerm(); 11630 case 1922406657: return addSupportingInfo(); 11631 case 1538891575: return addRelevantHistory(); 11632 case -902467798: return addSigner(); 11633 case -1423054677: return addFriendly(); 11634 case 102851257: return addLegal(); 11635 case 3512060: return addRule(); 11636 case -772497791: return getLegallyBinding(); 11637 case -126751329: return getLegallyBinding(); 11638 default: return super.makeProperty(hash, name); 11639 } 11640 11641 } 11642 11643 @Override 11644 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 11645 switch (hash) { 11646 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 11647 case 116079: /*url*/ return new String[] {"uri"}; 11648 case 351608024: /*version*/ return new String[] {"string"}; 11649 case -892481550: /*status*/ return new String[] {"code"}; 11650 case 568606040: /*legalState*/ return new String[] {"CodeableConcept"}; 11651 case 8911915: /*instantiatesCanonical*/ return new String[] {"Reference"}; 11652 case -1926393373: /*instantiatesUri*/ return new String[] {"uri"}; 11653 case -92412192: /*contentDerivative*/ return new String[] {"CodeableConcept"}; 11654 case -1179159893: /*issued*/ return new String[] {"dateTime"}; 11655 case -793235316: /*applies*/ return new String[] {"Period"}; 11656 case -668311927: /*expirationType*/ return new String[] {"CodeableConcept"}; 11657 case -1867885268: /*subject*/ return new String[] {"Reference"}; 11658 case 1475610435: /*authority*/ return new String[] {"Reference"}; 11659 case -1326197564: /*domain*/ return new String[] {"Reference"}; 11660 case 3530567: /*site*/ return new String[] {"Reference"}; 11661 case 3373707: /*name*/ return new String[] {"string"}; 11662 case 110371416: /*title*/ return new String[] {"string"}; 11663 case -2060497896: /*subtitle*/ return new String[] {"string"}; 11664 case 92902992: /*alias*/ return new String[] {"string"}; 11665 case -1406328437: /*author*/ return new String[] {"Reference"}; 11666 case 109264468: /*scope*/ return new String[] {"CodeableConcept"}; 11667 case 110546223: /*topic*/ return new String[] {"CodeableConcept", "Reference"}; 11668 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 11669 case -1868521062: /*subType*/ return new String[] {"CodeableConcept"}; 11670 case 247055020: /*contentDefinition*/ return new String[] {}; 11671 case 3556460: /*term*/ return new String[] {}; 11672 case 1922406657: /*supportingInfo*/ return new String[] {"Reference"}; 11673 case 1538891575: /*relevantHistory*/ return new String[] {"Reference"}; 11674 case -902467798: /*signer*/ return new String[] {}; 11675 case -1423054677: /*friendly*/ return new String[] {}; 11676 case 102851257: /*legal*/ return new String[] {}; 11677 case 3512060: /*rule*/ return new String[] {}; 11678 case -126751329: /*legallyBinding*/ return new String[] {"Attachment", "Reference"}; 11679 default: return super.getTypesForProperty(hash, name); 11680 } 11681 11682 } 11683 11684 @Override 11685 public Base addChild(String name) throws FHIRException { 11686 if (name.equals("identifier")) { 11687 return addIdentifier(); 11688 } 11689 else if (name.equals("url")) { 11690 throw new FHIRException("Cannot call addChild on a primitive type Contract.url"); 11691 } 11692 else if (name.equals("version")) { 11693 throw new FHIRException("Cannot call addChild on a primitive type Contract.version"); 11694 } 11695 else if (name.equals("status")) { 11696 throw new FHIRException("Cannot call addChild on a primitive type Contract.status"); 11697 } 11698 else if (name.equals("legalState")) { 11699 this.legalState = new CodeableConcept(); 11700 return this.legalState; 11701 } 11702 else if (name.equals("instantiatesCanonical")) { 11703 this.instantiatesCanonical = new Reference(); 11704 return this.instantiatesCanonical; 11705 } 11706 else if (name.equals("instantiatesUri")) { 11707 throw new FHIRException("Cannot call addChild on a primitive type Contract.instantiatesUri"); 11708 } 11709 else if (name.equals("contentDerivative")) { 11710 this.contentDerivative = new CodeableConcept(); 11711 return this.contentDerivative; 11712 } 11713 else if (name.equals("issued")) { 11714 throw new FHIRException("Cannot call addChild on a primitive type Contract.issued"); 11715 } 11716 else if (name.equals("applies")) { 11717 this.applies = new Period(); 11718 return this.applies; 11719 } 11720 else if (name.equals("expirationType")) { 11721 this.expirationType = new CodeableConcept(); 11722 return this.expirationType; 11723 } 11724 else if (name.equals("subject")) { 11725 return addSubject(); 11726 } 11727 else if (name.equals("authority")) { 11728 return addAuthority(); 11729 } 11730 else if (name.equals("domain")) { 11731 return addDomain(); 11732 } 11733 else if (name.equals("site")) { 11734 return addSite(); 11735 } 11736 else if (name.equals("name")) { 11737 throw new FHIRException("Cannot call addChild on a primitive type Contract.name"); 11738 } 11739 else if (name.equals("title")) { 11740 throw new FHIRException("Cannot call addChild on a primitive type Contract.title"); 11741 } 11742 else if (name.equals("subtitle")) { 11743 throw new FHIRException("Cannot call addChild on a primitive type Contract.subtitle"); 11744 } 11745 else if (name.equals("alias")) { 11746 throw new FHIRException("Cannot call addChild on a primitive type Contract.alias"); 11747 } 11748 else if (name.equals("author")) { 11749 this.author = new Reference(); 11750 return this.author; 11751 } 11752 else if (name.equals("scope")) { 11753 this.scope = new CodeableConcept(); 11754 return this.scope; 11755 } 11756 else if (name.equals("topicCodeableConcept")) { 11757 this.topic = new CodeableConcept(); 11758 return this.topic; 11759 } 11760 else if (name.equals("topicReference")) { 11761 this.topic = new Reference(); 11762 return this.topic; 11763 } 11764 else if (name.equals("type")) { 11765 this.type = new CodeableConcept(); 11766 return this.type; 11767 } 11768 else if (name.equals("subType")) { 11769 return addSubType(); 11770 } 11771 else if (name.equals("contentDefinition")) { 11772 this.contentDefinition = new ContentDefinitionComponent(); 11773 return this.contentDefinition; 11774 } 11775 else if (name.equals("term")) { 11776 return addTerm(); 11777 } 11778 else if (name.equals("supportingInfo")) { 11779 return addSupportingInfo(); 11780 } 11781 else if (name.equals("relevantHistory")) { 11782 return addRelevantHistory(); 11783 } 11784 else if (name.equals("signer")) { 11785 return addSigner(); 11786 } 11787 else if (name.equals("friendly")) { 11788 return addFriendly(); 11789 } 11790 else if (name.equals("legal")) { 11791 return addLegal(); 11792 } 11793 else if (name.equals("rule")) { 11794 return addRule(); 11795 } 11796 else if (name.equals("legallyBindingAttachment")) { 11797 this.legallyBinding = new Attachment(); 11798 return this.legallyBinding; 11799 } 11800 else if (name.equals("legallyBindingReference")) { 11801 this.legallyBinding = new Reference(); 11802 return this.legallyBinding; 11803 } 11804 else 11805 return super.addChild(name); 11806 } 11807 11808 public String fhirType() { 11809 return "Contract"; 11810 11811 } 11812 11813 public Contract copy() { 11814 Contract dst = new Contract(); 11815 copyValues(dst); 11816 if (identifier != null) { 11817 dst.identifier = new ArrayList<Identifier>(); 11818 for (Identifier i : identifier) 11819 dst.identifier.add(i.copy()); 11820 }; 11821 dst.url = url == null ? null : url.copy(); 11822 dst.version = version == null ? null : version.copy(); 11823 dst.status = status == null ? null : status.copy(); 11824 dst.legalState = legalState == null ? null : legalState.copy(); 11825 dst.instantiatesCanonical = instantiatesCanonical == null ? null : instantiatesCanonical.copy(); 11826 dst.instantiatesUri = instantiatesUri == null ? null : instantiatesUri.copy(); 11827 dst.contentDerivative = contentDerivative == null ? null : contentDerivative.copy(); 11828 dst.issued = issued == null ? null : issued.copy(); 11829 dst.applies = applies == null ? null : applies.copy(); 11830 dst.expirationType = expirationType == null ? null : expirationType.copy(); 11831 if (subject != null) { 11832 dst.subject = new ArrayList<Reference>(); 11833 for (Reference i : subject) 11834 dst.subject.add(i.copy()); 11835 }; 11836 if (authority != null) { 11837 dst.authority = new ArrayList<Reference>(); 11838 for (Reference i : authority) 11839 dst.authority.add(i.copy()); 11840 }; 11841 if (domain != null) { 11842 dst.domain = new ArrayList<Reference>(); 11843 for (Reference i : domain) 11844 dst.domain.add(i.copy()); 11845 }; 11846 if (site != null) { 11847 dst.site = new ArrayList<Reference>(); 11848 for (Reference i : site) 11849 dst.site.add(i.copy()); 11850 }; 11851 dst.name = name == null ? null : name.copy(); 11852 dst.title = title == null ? null : title.copy(); 11853 dst.subtitle = subtitle == null ? null : subtitle.copy(); 11854 if (alias != null) { 11855 dst.alias = new ArrayList<StringType>(); 11856 for (StringType i : alias) 11857 dst.alias.add(i.copy()); 11858 }; 11859 dst.author = author == null ? null : author.copy(); 11860 dst.scope = scope == null ? null : scope.copy(); 11861 dst.topic = topic == null ? null : topic.copy(); 11862 dst.type = type == null ? null : type.copy(); 11863 if (subType != null) { 11864 dst.subType = new ArrayList<CodeableConcept>(); 11865 for (CodeableConcept i : subType) 11866 dst.subType.add(i.copy()); 11867 }; 11868 dst.contentDefinition = contentDefinition == null ? null : contentDefinition.copy(); 11869 if (term != null) { 11870 dst.term = new ArrayList<TermComponent>(); 11871 for (TermComponent i : term) 11872 dst.term.add(i.copy()); 11873 }; 11874 if (supportingInfo != null) { 11875 dst.supportingInfo = new ArrayList<Reference>(); 11876 for (Reference i : supportingInfo) 11877 dst.supportingInfo.add(i.copy()); 11878 }; 11879 if (relevantHistory != null) { 11880 dst.relevantHistory = new ArrayList<Reference>(); 11881 for (Reference i : relevantHistory) 11882 dst.relevantHistory.add(i.copy()); 11883 }; 11884 if (signer != null) { 11885 dst.signer = new ArrayList<SignatoryComponent>(); 11886 for (SignatoryComponent i : signer) 11887 dst.signer.add(i.copy()); 11888 }; 11889 if (friendly != null) { 11890 dst.friendly = new ArrayList<FriendlyLanguageComponent>(); 11891 for (FriendlyLanguageComponent i : friendly) 11892 dst.friendly.add(i.copy()); 11893 }; 11894 if (legal != null) { 11895 dst.legal = new ArrayList<LegalLanguageComponent>(); 11896 for (LegalLanguageComponent i : legal) 11897 dst.legal.add(i.copy()); 11898 }; 11899 if (rule != null) { 11900 dst.rule = new ArrayList<ComputableLanguageComponent>(); 11901 for (ComputableLanguageComponent i : rule) 11902 dst.rule.add(i.copy()); 11903 }; 11904 dst.legallyBinding = legallyBinding == null ? null : legallyBinding.copy(); 11905 return dst; 11906 } 11907 11908 protected Contract typedCopy() { 11909 return copy(); 11910 } 11911 11912 @Override 11913 public boolean equalsDeep(Base other_) { 11914 if (!super.equalsDeep(other_)) 11915 return false; 11916 if (!(other_ instanceof Contract)) 11917 return false; 11918 Contract o = (Contract) other_; 11919 return compareDeep(identifier, o.identifier, true) && compareDeep(url, o.url, true) && compareDeep(version, o.version, true) 11920 && compareDeep(status, o.status, true) && compareDeep(legalState, o.legalState, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true) 11921 && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(contentDerivative, o.contentDerivative, true) 11922 && compareDeep(issued, o.issued, true) && compareDeep(applies, o.applies, true) && compareDeep(expirationType, o.expirationType, true) 11923 && compareDeep(subject, o.subject, true) && compareDeep(authority, o.authority, true) && compareDeep(domain, o.domain, true) 11924 && compareDeep(site, o.site, true) && compareDeep(name, o.name, true) && compareDeep(title, o.title, true) 11925 && compareDeep(subtitle, o.subtitle, true) && compareDeep(alias, o.alias, true) && compareDeep(author, o.author, true) 11926 && compareDeep(scope, o.scope, true) && compareDeep(topic, o.topic, true) && compareDeep(type, o.type, true) 11927 && compareDeep(subType, o.subType, true) && compareDeep(contentDefinition, o.contentDefinition, true) 11928 && compareDeep(term, o.term, true) && compareDeep(supportingInfo, o.supportingInfo, true) && compareDeep(relevantHistory, o.relevantHistory, true) 11929 && compareDeep(signer, o.signer, true) && compareDeep(friendly, o.friendly, true) && compareDeep(legal, o.legal, true) 11930 && compareDeep(rule, o.rule, true) && compareDeep(legallyBinding, o.legallyBinding, true); 11931 } 11932 11933 @Override 11934 public boolean equalsShallow(Base other_) { 11935 if (!super.equalsShallow(other_)) 11936 return false; 11937 if (!(other_ instanceof Contract)) 11938 return false; 11939 Contract o = (Contract) other_; 11940 return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(status, o.status, true) 11941 && compareValues(instantiatesUri, o.instantiatesUri, true) && compareValues(issued, o.issued, true) 11942 && compareValues(name, o.name, true) && compareValues(title, o.title, true) && compareValues(subtitle, o.subtitle, true) 11943 && compareValues(alias, o.alias, true); 11944 } 11945 11946 public boolean isEmpty() { 11947 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, url, version 11948 , status, legalState, instantiatesCanonical, instantiatesUri, contentDerivative, issued 11949 , applies, expirationType, subject, authority, domain, site, name, title, subtitle 11950 , alias, author, scope, topic, type, subType, contentDefinition, term, supportingInfo 11951 , relevantHistory, signer, friendly, legal, rule, legallyBinding); 11952 } 11953 11954 @Override 11955 public ResourceType getResourceType() { 11956 return ResourceType.Contract; 11957 } 11958 11959 /** 11960 * Search parameter: <b>identifier</b> 11961 * <p> 11962 * Description: <b>The identity of the contract</b><br> 11963 * Type: <b>token</b><br> 11964 * Path: <b>Contract.identifier</b><br> 11965 * </p> 11966 */ 11967 @SearchParamDefinition(name="identifier", path="Contract.identifier", description="The identity of the contract", type="token" ) 11968 public static final String SP_IDENTIFIER = "identifier"; 11969 /** 11970 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 11971 * <p> 11972 * Description: <b>The identity of the contract</b><br> 11973 * Type: <b>token</b><br> 11974 * Path: <b>Contract.identifier</b><br> 11975 * </p> 11976 */ 11977 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 11978 11979 /** 11980 * Search parameter: <b>instantiates</b> 11981 * <p> 11982 * Description: <b>A source definition of the contract</b><br> 11983 * Type: <b>uri</b><br> 11984 * Path: <b>Contract.instantiatesUri</b><br> 11985 * </p> 11986 */ 11987 @SearchParamDefinition(name="instantiates", path="Contract.instantiatesUri", description="A source definition of the contract", type="uri" ) 11988 public static final String SP_INSTANTIATES = "instantiates"; 11989 /** 11990 * <b>Fluent Client</b> search parameter constant for <b>instantiates</b> 11991 * <p> 11992 * Description: <b>A source definition of the contract</b><br> 11993 * Type: <b>uri</b><br> 11994 * Path: <b>Contract.instantiatesUri</b><br> 11995 * </p> 11996 */ 11997 public static final ca.uhn.fhir.rest.gclient.UriClientParam INSTANTIATES = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_INSTANTIATES); 11998 11999 /** 12000 * Search parameter: <b>patient</b> 12001 * <p> 12002 * Description: <b>The identity of the subject of the contract (if a patient)</b><br> 12003 * Type: <b>reference</b><br> 12004 * Path: <b>Contract.subject</b><br> 12005 * </p> 12006 */ 12007 @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 } ) 12008 public static final String SP_PATIENT = "patient"; 12009 /** 12010 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 12011 * <p> 12012 * Description: <b>The identity of the subject of the contract (if a patient)</b><br> 12013 * Type: <b>reference</b><br> 12014 * Path: <b>Contract.subject</b><br> 12015 * </p> 12016 */ 12017 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 12018 12019/** 12020 * Constant for fluent queries to be used to add include statements. Specifies 12021 * the path value of "<b>Contract:patient</b>". 12022 */ 12023 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Contract:patient").toLocked(); 12024 12025 /** 12026 * Search parameter: <b>subject</b> 12027 * <p> 12028 * Description: <b>The identity of the subject of the contract</b><br> 12029 * Type: <b>reference</b><br> 12030 * Path: <b>Contract.subject</b><br> 12031 * </p> 12032 */ 12033 @SearchParamDefinition(name="subject", path="Contract.subject", description="The identity of the subject of the contract", type="reference" ) 12034 public static final String SP_SUBJECT = "subject"; 12035 /** 12036 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 12037 * <p> 12038 * Description: <b>The identity of the subject of the contract</b><br> 12039 * Type: <b>reference</b><br> 12040 * Path: <b>Contract.subject</b><br> 12041 * </p> 12042 */ 12043 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 12044 12045/** 12046 * Constant for fluent queries to be used to add include statements. Specifies 12047 * the path value of "<b>Contract:subject</b>". 12048 */ 12049 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Contract:subject").toLocked(); 12050 12051 /** 12052 * Search parameter: <b>authority</b> 12053 * <p> 12054 * Description: <b>The authority of the contract</b><br> 12055 * Type: <b>reference</b><br> 12056 * Path: <b>Contract.authority</b><br> 12057 * </p> 12058 */ 12059 @SearchParamDefinition(name="authority", path="Contract.authority", description="The authority of the contract", type="reference", target={Organization.class } ) 12060 public static final String SP_AUTHORITY = "authority"; 12061 /** 12062 * <b>Fluent Client</b> search parameter constant for <b>authority</b> 12063 * <p> 12064 * Description: <b>The authority of the contract</b><br> 12065 * Type: <b>reference</b><br> 12066 * Path: <b>Contract.authority</b><br> 12067 * </p> 12068 */ 12069 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHORITY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHORITY); 12070 12071/** 12072 * Constant for fluent queries to be used to add include statements. Specifies 12073 * the path value of "<b>Contract:authority</b>". 12074 */ 12075 public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHORITY = new ca.uhn.fhir.model.api.Include("Contract:authority").toLocked(); 12076 12077 /** 12078 * Search parameter: <b>domain</b> 12079 * <p> 12080 * Description: <b>The domain of the contract</b><br> 12081 * Type: <b>reference</b><br> 12082 * Path: <b>Contract.domain</b><br> 12083 * </p> 12084 */ 12085 @SearchParamDefinition(name="domain", path="Contract.domain", description="The domain of the contract", type="reference", target={Location.class } ) 12086 public static final String SP_DOMAIN = "domain"; 12087 /** 12088 * <b>Fluent Client</b> search parameter constant for <b>domain</b> 12089 * <p> 12090 * Description: <b>The domain of the contract</b><br> 12091 * Type: <b>reference</b><br> 12092 * Path: <b>Contract.domain</b><br> 12093 * </p> 12094 */ 12095 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DOMAIN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DOMAIN); 12096 12097/** 12098 * Constant for fluent queries to be used to add include statements. Specifies 12099 * the path value of "<b>Contract:domain</b>". 12100 */ 12101 public static final ca.uhn.fhir.model.api.Include INCLUDE_DOMAIN = new ca.uhn.fhir.model.api.Include("Contract:domain").toLocked(); 12102 12103 /** 12104 * Search parameter: <b>issued</b> 12105 * <p> 12106 * Description: <b>The date/time the contract was issued</b><br> 12107 * Type: <b>date</b><br> 12108 * Path: <b>Contract.issued</b><br> 12109 * </p> 12110 */ 12111 @SearchParamDefinition(name="issued", path="Contract.issued", description="The date/time the contract was issued", type="date" ) 12112 public static final String SP_ISSUED = "issued"; 12113 /** 12114 * <b>Fluent Client</b> search parameter constant for <b>issued</b> 12115 * <p> 12116 * Description: <b>The date/time the contract was issued</b><br> 12117 * Type: <b>date</b><br> 12118 * Path: <b>Contract.issued</b><br> 12119 * </p> 12120 */ 12121 public static final ca.uhn.fhir.rest.gclient.DateClientParam ISSUED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_ISSUED); 12122 12123 /** 12124 * Search parameter: <b>url</b> 12125 * <p> 12126 * Description: <b>The basal contract definition</b><br> 12127 * Type: <b>uri</b><br> 12128 * Path: <b>Contract.url</b><br> 12129 * </p> 12130 */ 12131 @SearchParamDefinition(name="url", path="Contract.url", description="The basal contract definition", type="uri" ) 12132 public static final String SP_URL = "url"; 12133 /** 12134 * <b>Fluent Client</b> search parameter constant for <b>url</b> 12135 * <p> 12136 * Description: <b>The basal contract definition</b><br> 12137 * Type: <b>uri</b><br> 12138 * Path: <b>Contract.url</b><br> 12139 * </p> 12140 */ 12141 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 12142 12143 /** 12144 * Search parameter: <b>signer</b> 12145 * <p> 12146 * Description: <b>Contract Signatory Party</b><br> 12147 * Type: <b>reference</b><br> 12148 * Path: <b>Contract.signer.party</b><br> 12149 * </p> 12150 */ 12151 @SearchParamDefinition(name="signer", path="Contract.signer.party", description="Contract Signatory Party", type="reference", target={Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 12152 public static final String SP_SIGNER = "signer"; 12153 /** 12154 * <b>Fluent Client</b> search parameter constant for <b>signer</b> 12155 * <p> 12156 * Description: <b>Contract Signatory Party</b><br> 12157 * Type: <b>reference</b><br> 12158 * Path: <b>Contract.signer.party</b><br> 12159 * </p> 12160 */ 12161 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SIGNER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SIGNER); 12162 12163/** 12164 * Constant for fluent queries to be used to add include statements. Specifies 12165 * the path value of "<b>Contract:signer</b>". 12166 */ 12167 public static final ca.uhn.fhir.model.api.Include INCLUDE_SIGNER = new ca.uhn.fhir.model.api.Include("Contract:signer").toLocked(); 12168 12169 /** 12170 * Search parameter: <b>status</b> 12171 * <p> 12172 * Description: <b>The status of the contract</b><br> 12173 * Type: <b>token</b><br> 12174 * Path: <b>Contract.status</b><br> 12175 * </p> 12176 */ 12177 @SearchParamDefinition(name="status", path="Contract.status", description="The status of the contract", type="token" ) 12178 public static final String SP_STATUS = "status"; 12179 /** 12180 * <b>Fluent Client</b> search parameter constant for <b>status</b> 12181 * <p> 12182 * Description: <b>The status of the contract</b><br> 12183 * Type: <b>token</b><br> 12184 * Path: <b>Contract.status</b><br> 12185 * </p> 12186 */ 12187 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 12188 12189 12190} 12191