![](/hapi-fhir/images/logos/raccoon-forwards.png)
001package org.hl7.fhir.r5.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.r5.model.Enumerations.*; 039import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.ICompositeType; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.ChildOrder; 047import ca.uhn.fhir.model.api.annotation.Description; 048import ca.uhn.fhir.model.api.annotation.Block; 049 050/** 051 * This Resource provides one or more comments, classifiers or ratings about a Resource and supports attribution and rights management metadata for the added content. 052 */ 053@ResourceDef(name="ArtifactAssessment", profile="http://hl7.org/fhir/StructureDefinition/ArtifactAssessment") 054public class ArtifactAssessment extends DomainResource { 055 056 public enum ArtifactAssessmentDisposition { 057 /** 058 * The comment is unresolved 059 */ 060 UNRESOLVED, 061 /** 062 * The comment is not persuasive (rejected in full) 063 */ 064 NOTPERSUASIVE, 065 /** 066 * The comment is persuasive (accepted in full) 067 */ 068 PERSUASIVE, 069 /** 070 * The comment is persuasive with modification (partially accepted) 071 */ 072 PERSUASIVEWITHMODIFICATION, 073 /** 074 * The comment is not persuasive with modification (partially rejected) 075 */ 076 NOTPERSUASIVEWITHMODIFICATION, 077 /** 078 * added to help the parsers with the generic types 079 */ 080 NULL; 081 public static ArtifactAssessmentDisposition fromCode(String codeString) throws FHIRException { 082 if (codeString == null || "".equals(codeString)) 083 return null; 084 if ("unresolved".equals(codeString)) 085 return UNRESOLVED; 086 if ("not-persuasive".equals(codeString)) 087 return NOTPERSUASIVE; 088 if ("persuasive".equals(codeString)) 089 return PERSUASIVE; 090 if ("persuasive-with-modification".equals(codeString)) 091 return PERSUASIVEWITHMODIFICATION; 092 if ("not-persuasive-with-modification".equals(codeString)) 093 return NOTPERSUASIVEWITHMODIFICATION; 094 if (Configuration.isAcceptInvalidEnums()) 095 return null; 096 else 097 throw new FHIRException("Unknown ArtifactAssessmentDisposition code '"+codeString+"'"); 098 } 099 public String toCode() { 100 switch (this) { 101 case UNRESOLVED: return "unresolved"; 102 case NOTPERSUASIVE: return "not-persuasive"; 103 case PERSUASIVE: return "persuasive"; 104 case PERSUASIVEWITHMODIFICATION: return "persuasive-with-modification"; 105 case NOTPERSUASIVEWITHMODIFICATION: return "not-persuasive-with-modification"; 106 case NULL: return null; 107 default: return "?"; 108 } 109 } 110 public String getSystem() { 111 switch (this) { 112 case UNRESOLVED: return "http://hl7.org/fhir/artifactassessment-disposition"; 113 case NOTPERSUASIVE: return "http://hl7.org/fhir/artifactassessment-disposition"; 114 case PERSUASIVE: return "http://hl7.org/fhir/artifactassessment-disposition"; 115 case PERSUASIVEWITHMODIFICATION: return "http://hl7.org/fhir/artifactassessment-disposition"; 116 case NOTPERSUASIVEWITHMODIFICATION: return "http://hl7.org/fhir/artifactassessment-disposition"; 117 case NULL: return null; 118 default: return "?"; 119 } 120 } 121 public String getDefinition() { 122 switch (this) { 123 case UNRESOLVED: return "The comment is unresolved"; 124 case NOTPERSUASIVE: return "The comment is not persuasive (rejected in full)"; 125 case PERSUASIVE: return "The comment is persuasive (accepted in full)"; 126 case PERSUASIVEWITHMODIFICATION: return "The comment is persuasive with modification (partially accepted)"; 127 case NOTPERSUASIVEWITHMODIFICATION: return "The comment is not persuasive with modification (partially rejected)"; 128 case NULL: return null; 129 default: return "?"; 130 } 131 } 132 public String getDisplay() { 133 switch (this) { 134 case UNRESOLVED: return "Unresolved"; 135 case NOTPERSUASIVE: return "Not Persuasive"; 136 case PERSUASIVE: return "Persuasive"; 137 case PERSUASIVEWITHMODIFICATION: return "Persuasive with Modification"; 138 case NOTPERSUASIVEWITHMODIFICATION: return "Not Persuasive with Modification"; 139 case NULL: return null; 140 default: return "?"; 141 } 142 } 143 } 144 145 public static class ArtifactAssessmentDispositionEnumFactory implements EnumFactory<ArtifactAssessmentDisposition> { 146 public ArtifactAssessmentDisposition fromCode(String codeString) throws IllegalArgumentException { 147 if (codeString == null || "".equals(codeString)) 148 if (codeString == null || "".equals(codeString)) 149 return null; 150 if ("unresolved".equals(codeString)) 151 return ArtifactAssessmentDisposition.UNRESOLVED; 152 if ("not-persuasive".equals(codeString)) 153 return ArtifactAssessmentDisposition.NOTPERSUASIVE; 154 if ("persuasive".equals(codeString)) 155 return ArtifactAssessmentDisposition.PERSUASIVE; 156 if ("persuasive-with-modification".equals(codeString)) 157 return ArtifactAssessmentDisposition.PERSUASIVEWITHMODIFICATION; 158 if ("not-persuasive-with-modification".equals(codeString)) 159 return ArtifactAssessmentDisposition.NOTPERSUASIVEWITHMODIFICATION; 160 throw new IllegalArgumentException("Unknown ArtifactAssessmentDisposition code '"+codeString+"'"); 161 } 162 public Enumeration<ArtifactAssessmentDisposition> fromType(PrimitiveType<?> code) throws FHIRException { 163 if (code == null) 164 return null; 165 if (code.isEmpty()) 166 return new Enumeration<ArtifactAssessmentDisposition>(this, ArtifactAssessmentDisposition.NULL, code); 167 String codeString = ((PrimitiveType) code).asStringValue(); 168 if (codeString == null || "".equals(codeString)) 169 return new Enumeration<ArtifactAssessmentDisposition>(this, ArtifactAssessmentDisposition.NULL, code); 170 if ("unresolved".equals(codeString)) 171 return new Enumeration<ArtifactAssessmentDisposition>(this, ArtifactAssessmentDisposition.UNRESOLVED, code); 172 if ("not-persuasive".equals(codeString)) 173 return new Enumeration<ArtifactAssessmentDisposition>(this, ArtifactAssessmentDisposition.NOTPERSUASIVE, code); 174 if ("persuasive".equals(codeString)) 175 return new Enumeration<ArtifactAssessmentDisposition>(this, ArtifactAssessmentDisposition.PERSUASIVE, code); 176 if ("persuasive-with-modification".equals(codeString)) 177 return new Enumeration<ArtifactAssessmentDisposition>(this, ArtifactAssessmentDisposition.PERSUASIVEWITHMODIFICATION, code); 178 if ("not-persuasive-with-modification".equals(codeString)) 179 return new Enumeration<ArtifactAssessmentDisposition>(this, ArtifactAssessmentDisposition.NOTPERSUASIVEWITHMODIFICATION, code); 180 throw new FHIRException("Unknown ArtifactAssessmentDisposition code '"+codeString+"'"); 181 } 182 public String toCode(ArtifactAssessmentDisposition code) { 183 if (code == ArtifactAssessmentDisposition.UNRESOLVED) 184 return "unresolved"; 185 if (code == ArtifactAssessmentDisposition.NOTPERSUASIVE) 186 return "not-persuasive"; 187 if (code == ArtifactAssessmentDisposition.PERSUASIVE) 188 return "persuasive"; 189 if (code == ArtifactAssessmentDisposition.PERSUASIVEWITHMODIFICATION) 190 return "persuasive-with-modification"; 191 if (code == ArtifactAssessmentDisposition.NOTPERSUASIVEWITHMODIFICATION) 192 return "not-persuasive-with-modification"; 193 return "?"; 194 } 195 public String toSystem(ArtifactAssessmentDisposition code) { 196 return code.getSystem(); 197 } 198 } 199 200 public enum ArtifactAssessmentInformationType { 201 /** 202 * A comment on the artifact 203 */ 204 COMMENT, 205 /** 206 * A classifier of the artifact 207 */ 208 CLASSIFIER, 209 /** 210 * A rating of the artifact 211 */ 212 RATING, 213 /** 214 * A container for multiple components 215 */ 216 CONTAINER, 217 /** 218 * A response to a comment 219 */ 220 RESPONSE, 221 /** 222 * A change request for the artifact 223 */ 224 CHANGEREQUEST, 225 /** 226 * added to help the parsers with the generic types 227 */ 228 NULL; 229 public static ArtifactAssessmentInformationType fromCode(String codeString) throws FHIRException { 230 if (codeString == null || "".equals(codeString)) 231 return null; 232 if ("comment".equals(codeString)) 233 return COMMENT; 234 if ("classifier".equals(codeString)) 235 return CLASSIFIER; 236 if ("rating".equals(codeString)) 237 return RATING; 238 if ("container".equals(codeString)) 239 return CONTAINER; 240 if ("response".equals(codeString)) 241 return RESPONSE; 242 if ("change-request".equals(codeString)) 243 return CHANGEREQUEST; 244 if (Configuration.isAcceptInvalidEnums()) 245 return null; 246 else 247 throw new FHIRException("Unknown ArtifactAssessmentInformationType code '"+codeString+"'"); 248 } 249 public String toCode() { 250 switch (this) { 251 case COMMENT: return "comment"; 252 case CLASSIFIER: return "classifier"; 253 case RATING: return "rating"; 254 case CONTAINER: return "container"; 255 case RESPONSE: return "response"; 256 case CHANGEREQUEST: return "change-request"; 257 case NULL: return null; 258 default: return "?"; 259 } 260 } 261 public String getSystem() { 262 switch (this) { 263 case COMMENT: return "http://hl7.org/fhir/artifactassessment-information-type"; 264 case CLASSIFIER: return "http://hl7.org/fhir/artifactassessment-information-type"; 265 case RATING: return "http://hl7.org/fhir/artifactassessment-information-type"; 266 case CONTAINER: return "http://hl7.org/fhir/artifactassessment-information-type"; 267 case RESPONSE: return "http://hl7.org/fhir/artifactassessment-information-type"; 268 case CHANGEREQUEST: return "http://hl7.org/fhir/artifactassessment-information-type"; 269 case NULL: return null; 270 default: return "?"; 271 } 272 } 273 public String getDefinition() { 274 switch (this) { 275 case COMMENT: return "A comment on the artifact"; 276 case CLASSIFIER: return "A classifier of the artifact"; 277 case RATING: return "A rating of the artifact"; 278 case CONTAINER: return "A container for multiple components"; 279 case RESPONSE: return "A response to a comment"; 280 case CHANGEREQUEST: return "A change request for the artifact"; 281 case NULL: return null; 282 default: return "?"; 283 } 284 } 285 public String getDisplay() { 286 switch (this) { 287 case COMMENT: return "Comment"; 288 case CLASSIFIER: return "Classifier"; 289 case RATING: return "Rating"; 290 case CONTAINER: return "Container"; 291 case RESPONSE: return "Response"; 292 case CHANGEREQUEST: return "Change Request"; 293 case NULL: return null; 294 default: return "?"; 295 } 296 } 297 } 298 299 public static class ArtifactAssessmentInformationTypeEnumFactory implements EnumFactory<ArtifactAssessmentInformationType> { 300 public ArtifactAssessmentInformationType fromCode(String codeString) throws IllegalArgumentException { 301 if (codeString == null || "".equals(codeString)) 302 if (codeString == null || "".equals(codeString)) 303 return null; 304 if ("comment".equals(codeString)) 305 return ArtifactAssessmentInformationType.COMMENT; 306 if ("classifier".equals(codeString)) 307 return ArtifactAssessmentInformationType.CLASSIFIER; 308 if ("rating".equals(codeString)) 309 return ArtifactAssessmentInformationType.RATING; 310 if ("container".equals(codeString)) 311 return ArtifactAssessmentInformationType.CONTAINER; 312 if ("response".equals(codeString)) 313 return ArtifactAssessmentInformationType.RESPONSE; 314 if ("change-request".equals(codeString)) 315 return ArtifactAssessmentInformationType.CHANGEREQUEST; 316 throw new IllegalArgumentException("Unknown ArtifactAssessmentInformationType code '"+codeString+"'"); 317 } 318 public Enumeration<ArtifactAssessmentInformationType> fromType(PrimitiveType<?> code) throws FHIRException { 319 if (code == null) 320 return null; 321 if (code.isEmpty()) 322 return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.NULL, code); 323 String codeString = ((PrimitiveType) code).asStringValue(); 324 if (codeString == null || "".equals(codeString)) 325 return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.NULL, code); 326 if ("comment".equals(codeString)) 327 return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.COMMENT, code); 328 if ("classifier".equals(codeString)) 329 return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.CLASSIFIER, code); 330 if ("rating".equals(codeString)) 331 return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.RATING, code); 332 if ("container".equals(codeString)) 333 return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.CONTAINER, code); 334 if ("response".equals(codeString)) 335 return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.RESPONSE, code); 336 if ("change-request".equals(codeString)) 337 return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.CHANGEREQUEST, code); 338 throw new FHIRException("Unknown ArtifactAssessmentInformationType code '"+codeString+"'"); 339 } 340 public String toCode(ArtifactAssessmentInformationType code) { 341 if (code == ArtifactAssessmentInformationType.COMMENT) 342 return "comment"; 343 if (code == ArtifactAssessmentInformationType.CLASSIFIER) 344 return "classifier"; 345 if (code == ArtifactAssessmentInformationType.RATING) 346 return "rating"; 347 if (code == ArtifactAssessmentInformationType.CONTAINER) 348 return "container"; 349 if (code == ArtifactAssessmentInformationType.RESPONSE) 350 return "response"; 351 if (code == ArtifactAssessmentInformationType.CHANGEREQUEST) 352 return "change-request"; 353 return "?"; 354 } 355 public String toSystem(ArtifactAssessmentInformationType code) { 356 return code.getSystem(); 357 } 358 } 359 360 public enum ArtifactAssessmentWorkflowStatus { 361 /** 362 * The comment has been submitted, but the responsible party has not yet been determined, or the responsible party has not yet determined the next steps to be taken. 363 */ 364 SUBMITTED, 365 /** 366 * The comment has been triaged, meaning the responsible party has been determined and next steps have been identified to address the comment. 367 */ 368 TRIAGED, 369 /** 370 * The comment is waiting for input from a specific party before next steps can be taken. 371 */ 372 WAITINGFORINPUT, 373 /** 374 * The comment has been resolved and no changes resulted from the resolution 375 */ 376 RESOLVEDNOCHANGE, 377 /** 378 * The comment has been resolved and changes are required to address the comment 379 */ 380 RESOLVEDCHANGEREQUIRED, 381 /** 382 * The comment is acceptable, but resolution of the comment and application of any associated changes have been deferred 383 */ 384 DEFERRED, 385 /** 386 * The comment is a duplicate of another comment already received 387 */ 388 DUPLICATE, 389 /** 390 * The comment is resolved and any necessary changes have been applied 391 */ 392 APPLIED, 393 /** 394 * The necessary changes to the artifact have been published in a new version of the artifact 395 */ 396 PUBLISHED, 397 /** 398 * The assessment was entered in error 399 */ 400 ENTEREDINERROR, 401 /** 402 * added to help the parsers with the generic types 403 */ 404 NULL; 405 public static ArtifactAssessmentWorkflowStatus fromCode(String codeString) throws FHIRException { 406 if (codeString == null || "".equals(codeString)) 407 return null; 408 if ("submitted".equals(codeString)) 409 return SUBMITTED; 410 if ("triaged".equals(codeString)) 411 return TRIAGED; 412 if ("waiting-for-input".equals(codeString)) 413 return WAITINGFORINPUT; 414 if ("resolved-no-change".equals(codeString)) 415 return RESOLVEDNOCHANGE; 416 if ("resolved-change-required".equals(codeString)) 417 return RESOLVEDCHANGEREQUIRED; 418 if ("deferred".equals(codeString)) 419 return DEFERRED; 420 if ("duplicate".equals(codeString)) 421 return DUPLICATE; 422 if ("applied".equals(codeString)) 423 return APPLIED; 424 if ("published".equals(codeString)) 425 return PUBLISHED; 426 if ("entered-in-error".equals(codeString)) 427 return ENTEREDINERROR; 428 if (Configuration.isAcceptInvalidEnums()) 429 return null; 430 else 431 throw new FHIRException("Unknown ArtifactAssessmentWorkflowStatus code '"+codeString+"'"); 432 } 433 public String toCode() { 434 switch (this) { 435 case SUBMITTED: return "submitted"; 436 case TRIAGED: return "triaged"; 437 case WAITINGFORINPUT: return "waiting-for-input"; 438 case RESOLVEDNOCHANGE: return "resolved-no-change"; 439 case RESOLVEDCHANGEREQUIRED: return "resolved-change-required"; 440 case DEFERRED: return "deferred"; 441 case DUPLICATE: return "duplicate"; 442 case APPLIED: return "applied"; 443 case PUBLISHED: return "published"; 444 case ENTEREDINERROR: return "entered-in-error"; 445 case NULL: return null; 446 default: return "?"; 447 } 448 } 449 public String getSystem() { 450 switch (this) { 451 case SUBMITTED: return "http://hl7.org/fhir/artifactassessment-workflow-status"; 452 case TRIAGED: return "http://hl7.org/fhir/artifactassessment-workflow-status"; 453 case WAITINGFORINPUT: return "http://hl7.org/fhir/artifactassessment-workflow-status"; 454 case RESOLVEDNOCHANGE: return "http://hl7.org/fhir/artifactassessment-workflow-status"; 455 case RESOLVEDCHANGEREQUIRED: return "http://hl7.org/fhir/artifactassessment-workflow-status"; 456 case DEFERRED: return "http://hl7.org/fhir/artifactassessment-workflow-status"; 457 case DUPLICATE: return "http://hl7.org/fhir/artifactassessment-workflow-status"; 458 case APPLIED: return "http://hl7.org/fhir/artifactassessment-workflow-status"; 459 case PUBLISHED: return "http://hl7.org/fhir/artifactassessment-workflow-status"; 460 case ENTEREDINERROR: return "http://hl7.org/fhir/artifactassessment-workflow-status"; 461 case NULL: return null; 462 default: return "?"; 463 } 464 } 465 public String getDefinition() { 466 switch (this) { 467 case SUBMITTED: return "The comment has been submitted, but the responsible party has not yet been determined, or the responsible party has not yet determined the next steps to be taken."; 468 case TRIAGED: return "The comment has been triaged, meaning the responsible party has been determined and next steps have been identified to address the comment."; 469 case WAITINGFORINPUT: return "The comment is waiting for input from a specific party before next steps can be taken."; 470 case RESOLVEDNOCHANGE: return "The comment has been resolved and no changes resulted from the resolution"; 471 case RESOLVEDCHANGEREQUIRED: return "The comment has been resolved and changes are required to address the comment"; 472 case DEFERRED: return "The comment is acceptable, but resolution of the comment and application of any associated changes have been deferred"; 473 case DUPLICATE: return "The comment is a duplicate of another comment already received"; 474 case APPLIED: return "The comment is resolved and any necessary changes have been applied"; 475 case PUBLISHED: return "The necessary changes to the artifact have been published in a new version of the artifact"; 476 case ENTEREDINERROR: return "The assessment was entered in error"; 477 case NULL: return null; 478 default: return "?"; 479 } 480 } 481 public String getDisplay() { 482 switch (this) { 483 case SUBMITTED: return "Submitted"; 484 case TRIAGED: return "Triaged"; 485 case WAITINGFORINPUT: return "Waiting for Input"; 486 case RESOLVEDNOCHANGE: return "Resolved - No Change"; 487 case RESOLVEDCHANGEREQUIRED: return "Resolved - Change Required"; 488 case DEFERRED: return "Deferred"; 489 case DUPLICATE: return "Duplicate"; 490 case APPLIED: return "Applied"; 491 case PUBLISHED: return "Published"; 492 case ENTEREDINERROR: return "Entered in Error"; 493 case NULL: return null; 494 default: return "?"; 495 } 496 } 497 } 498 499 public static class ArtifactAssessmentWorkflowStatusEnumFactory implements EnumFactory<ArtifactAssessmentWorkflowStatus> { 500 public ArtifactAssessmentWorkflowStatus fromCode(String codeString) throws IllegalArgumentException { 501 if (codeString == null || "".equals(codeString)) 502 if (codeString == null || "".equals(codeString)) 503 return null; 504 if ("submitted".equals(codeString)) 505 return ArtifactAssessmentWorkflowStatus.SUBMITTED; 506 if ("triaged".equals(codeString)) 507 return ArtifactAssessmentWorkflowStatus.TRIAGED; 508 if ("waiting-for-input".equals(codeString)) 509 return ArtifactAssessmentWorkflowStatus.WAITINGFORINPUT; 510 if ("resolved-no-change".equals(codeString)) 511 return ArtifactAssessmentWorkflowStatus.RESOLVEDNOCHANGE; 512 if ("resolved-change-required".equals(codeString)) 513 return ArtifactAssessmentWorkflowStatus.RESOLVEDCHANGEREQUIRED; 514 if ("deferred".equals(codeString)) 515 return ArtifactAssessmentWorkflowStatus.DEFERRED; 516 if ("duplicate".equals(codeString)) 517 return ArtifactAssessmentWorkflowStatus.DUPLICATE; 518 if ("applied".equals(codeString)) 519 return ArtifactAssessmentWorkflowStatus.APPLIED; 520 if ("published".equals(codeString)) 521 return ArtifactAssessmentWorkflowStatus.PUBLISHED; 522 if ("entered-in-error".equals(codeString)) 523 return ArtifactAssessmentWorkflowStatus.ENTEREDINERROR; 524 throw new IllegalArgumentException("Unknown ArtifactAssessmentWorkflowStatus code '"+codeString+"'"); 525 } 526 public Enumeration<ArtifactAssessmentWorkflowStatus> fromType(PrimitiveType<?> code) throws FHIRException { 527 if (code == null) 528 return null; 529 if (code.isEmpty()) 530 return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.NULL, code); 531 String codeString = ((PrimitiveType) code).asStringValue(); 532 if (codeString == null || "".equals(codeString)) 533 return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.NULL, code); 534 if ("submitted".equals(codeString)) 535 return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.SUBMITTED, code); 536 if ("triaged".equals(codeString)) 537 return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.TRIAGED, code); 538 if ("waiting-for-input".equals(codeString)) 539 return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.WAITINGFORINPUT, code); 540 if ("resolved-no-change".equals(codeString)) 541 return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.RESOLVEDNOCHANGE, code); 542 if ("resolved-change-required".equals(codeString)) 543 return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.RESOLVEDCHANGEREQUIRED, code); 544 if ("deferred".equals(codeString)) 545 return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.DEFERRED, code); 546 if ("duplicate".equals(codeString)) 547 return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.DUPLICATE, code); 548 if ("applied".equals(codeString)) 549 return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.APPLIED, code); 550 if ("published".equals(codeString)) 551 return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.PUBLISHED, code); 552 if ("entered-in-error".equals(codeString)) 553 return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.ENTEREDINERROR, code); 554 throw new FHIRException("Unknown ArtifactAssessmentWorkflowStatus code '"+codeString+"'"); 555 } 556 public String toCode(ArtifactAssessmentWorkflowStatus code) { 557 if (code == ArtifactAssessmentWorkflowStatus.SUBMITTED) 558 return "submitted"; 559 if (code == ArtifactAssessmentWorkflowStatus.TRIAGED) 560 return "triaged"; 561 if (code == ArtifactAssessmentWorkflowStatus.WAITINGFORINPUT) 562 return "waiting-for-input"; 563 if (code == ArtifactAssessmentWorkflowStatus.RESOLVEDNOCHANGE) 564 return "resolved-no-change"; 565 if (code == ArtifactAssessmentWorkflowStatus.RESOLVEDCHANGEREQUIRED) 566 return "resolved-change-required"; 567 if (code == ArtifactAssessmentWorkflowStatus.DEFERRED) 568 return "deferred"; 569 if (code == ArtifactAssessmentWorkflowStatus.DUPLICATE) 570 return "duplicate"; 571 if (code == ArtifactAssessmentWorkflowStatus.APPLIED) 572 return "applied"; 573 if (code == ArtifactAssessmentWorkflowStatus.PUBLISHED) 574 return "published"; 575 if (code == ArtifactAssessmentWorkflowStatus.ENTEREDINERROR) 576 return "entered-in-error"; 577 return "?"; 578 } 579 public String toSystem(ArtifactAssessmentWorkflowStatus code) { 580 return code.getSystem(); 581 } 582 } 583 584 @Block() 585 public static class ArtifactAssessmentContentComponent extends BackboneElement implements IBaseBackboneElement { 586 /** 587 * The type of information this component of the content represents. 588 */ 589 @Child(name = "informationType", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false) 590 @Description(shortDefinition="comment | classifier | rating | container | response | change-request", formalDefinition="The type of information this component of the content represents." ) 591 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/artifactassessment-information-type") 592 protected Enumeration<ArtifactAssessmentInformationType> informationType; 593 594 /** 595 * A brief summary of the content of this component. 596 */ 597 @Child(name = "summary", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false) 598 @Description(shortDefinition="Brief summary of the content", formalDefinition="A brief summary of the content of this component." ) 599 protected MarkdownType summary; 600 601 /** 602 * Indicates what type of content this component represents. 603 */ 604 @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 605 @Description(shortDefinition="What type of content", formalDefinition="Indicates what type of content this component represents." ) 606 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/certainty-type") 607 protected CodeableConcept type; 608 609 /** 610 * Represents a rating, classifier, or assessment of the artifact. 611 */ 612 @Child(name = "classifier", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 613 @Description(shortDefinition="Rating, classifier, or assessment", formalDefinition="Represents a rating, classifier, or assessment of the artifact." ) 614 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/certainty-rating") 615 protected List<CodeableConcept> classifier; 616 617 /** 618 * A quantitative rating of the artifact. 619 */ 620 @Child(name = "quantity", type = {Quantity.class}, order=5, min=0, max=1, modifier=false, summary=false) 621 @Description(shortDefinition="Quantitative rating", formalDefinition="A quantitative rating of the artifact." ) 622 protected Quantity quantity; 623 624 /** 625 * Indicates who or what authored the content. 626 */ 627 @Child(name = "author", type = {Patient.class, Practitioner.class, PractitionerRole.class, Organization.class, Device.class}, order=6, min=0, max=1, modifier=false, summary=false) 628 @Description(shortDefinition="Who authored the content", formalDefinition="Indicates who or what authored the content." ) 629 protected Reference author; 630 631 /** 632 * A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource. 633 */ 634 @Child(name = "path", type = {UriType.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 635 @Description(shortDefinition="What the comment is directed to", formalDefinition="A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource." ) 636 protected List<UriType> path; 637 638 /** 639 * Additional related artifacts that provide supporting documentation, additional evidence, or further information related to the content. 640 */ 641 @Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 642 @Description(shortDefinition="Additional information", formalDefinition="Additional related artifacts that provide supporting documentation, additional evidence, or further information related to the content." ) 643 protected List<RelatedArtifact> relatedArtifact; 644 645 /** 646 * Acceptable to publicly share the comment, classifier or rating. 647 */ 648 @Child(name = "freeToShare", type = {BooleanType.class}, order=9, min=0, max=1, modifier=false, summary=false) 649 @Description(shortDefinition="Acceptable to publicly share the resource content", formalDefinition="Acceptable to publicly share the comment, classifier or rating." ) 650 protected BooleanType freeToShare; 651 652 /** 653 * If the informationType is container, the components of the content. 654 */ 655 @Child(name = "component", type = {ArtifactAssessmentContentComponent.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 656 @Description(shortDefinition="Contained content", formalDefinition="If the informationType is container, the components of the content." ) 657 protected List<ArtifactAssessmentContentComponent> component; 658 659 private static final long serialVersionUID = -111630435L; 660 661 /** 662 * Constructor 663 */ 664 public ArtifactAssessmentContentComponent() { 665 super(); 666 } 667 668 /** 669 * @return {@link #informationType} (The type of information this component of the content represents.). This is the underlying object with id, value and extensions. The accessor "getInformationType" gives direct access to the value 670 */ 671 public Enumeration<ArtifactAssessmentInformationType> getInformationTypeElement() { 672 if (this.informationType == null) 673 if (Configuration.errorOnAutoCreate()) 674 throw new Error("Attempt to auto-create ArtifactAssessmentContentComponent.informationType"); 675 else if (Configuration.doAutoCreate()) 676 this.informationType = new Enumeration<ArtifactAssessmentInformationType>(new ArtifactAssessmentInformationTypeEnumFactory()); // bb 677 return this.informationType; 678 } 679 680 public boolean hasInformationTypeElement() { 681 return this.informationType != null && !this.informationType.isEmpty(); 682 } 683 684 public boolean hasInformationType() { 685 return this.informationType != null && !this.informationType.isEmpty(); 686 } 687 688 /** 689 * @param value {@link #informationType} (The type of information this component of the content represents.). This is the underlying object with id, value and extensions. The accessor "getInformationType" gives direct access to the value 690 */ 691 public ArtifactAssessmentContentComponent setInformationTypeElement(Enumeration<ArtifactAssessmentInformationType> value) { 692 this.informationType = value; 693 return this; 694 } 695 696 /** 697 * @return The type of information this component of the content represents. 698 */ 699 public ArtifactAssessmentInformationType getInformationType() { 700 return this.informationType == null ? null : this.informationType.getValue(); 701 } 702 703 /** 704 * @param value The type of information this component of the content represents. 705 */ 706 public ArtifactAssessmentContentComponent setInformationType(ArtifactAssessmentInformationType value) { 707 if (value == null) 708 this.informationType = null; 709 else { 710 if (this.informationType == null) 711 this.informationType = new Enumeration<ArtifactAssessmentInformationType>(new ArtifactAssessmentInformationTypeEnumFactory()); 712 this.informationType.setValue(value); 713 } 714 return this; 715 } 716 717 /** 718 * @return {@link #summary} (A brief summary of the content of this component.). This is the underlying object with id, value and extensions. The accessor "getSummary" gives direct access to the value 719 */ 720 public MarkdownType getSummaryElement() { 721 if (this.summary == null) 722 if (Configuration.errorOnAutoCreate()) 723 throw new Error("Attempt to auto-create ArtifactAssessmentContentComponent.summary"); 724 else if (Configuration.doAutoCreate()) 725 this.summary = new MarkdownType(); // bb 726 return this.summary; 727 } 728 729 public boolean hasSummaryElement() { 730 return this.summary != null && !this.summary.isEmpty(); 731 } 732 733 public boolean hasSummary() { 734 return this.summary != null && !this.summary.isEmpty(); 735 } 736 737 /** 738 * @param value {@link #summary} (A brief summary of the content of this component.). This is the underlying object with id, value and extensions. The accessor "getSummary" gives direct access to the value 739 */ 740 public ArtifactAssessmentContentComponent setSummaryElement(MarkdownType value) { 741 this.summary = value; 742 return this; 743 } 744 745 /** 746 * @return A brief summary of the content of this component. 747 */ 748 public String getSummary() { 749 return this.summary == null ? null : this.summary.getValue(); 750 } 751 752 /** 753 * @param value A brief summary of the content of this component. 754 */ 755 public ArtifactAssessmentContentComponent setSummary(String value) { 756 if (Utilities.noString(value)) 757 this.summary = null; 758 else { 759 if (this.summary == null) 760 this.summary = new MarkdownType(); 761 this.summary.setValue(value); 762 } 763 return this; 764 } 765 766 /** 767 * @return {@link #type} (Indicates what type of content this component represents.) 768 */ 769 public CodeableConcept getType() { 770 if (this.type == null) 771 if (Configuration.errorOnAutoCreate()) 772 throw new Error("Attempt to auto-create ArtifactAssessmentContentComponent.type"); 773 else if (Configuration.doAutoCreate()) 774 this.type = new CodeableConcept(); // cc 775 return this.type; 776 } 777 778 public boolean hasType() { 779 return this.type != null && !this.type.isEmpty(); 780 } 781 782 /** 783 * @param value {@link #type} (Indicates what type of content this component represents.) 784 */ 785 public ArtifactAssessmentContentComponent setType(CodeableConcept value) { 786 this.type = value; 787 return this; 788 } 789 790 /** 791 * @return {@link #classifier} (Represents a rating, classifier, or assessment of the artifact.) 792 */ 793 public List<CodeableConcept> getClassifier() { 794 if (this.classifier == null) 795 this.classifier = new ArrayList<CodeableConcept>(); 796 return this.classifier; 797 } 798 799 /** 800 * @return Returns a reference to <code>this</code> for easy method chaining 801 */ 802 public ArtifactAssessmentContentComponent setClassifier(List<CodeableConcept> theClassifier) { 803 this.classifier = theClassifier; 804 return this; 805 } 806 807 public boolean hasClassifier() { 808 if (this.classifier == null) 809 return false; 810 for (CodeableConcept item : this.classifier) 811 if (!item.isEmpty()) 812 return true; 813 return false; 814 } 815 816 public CodeableConcept addClassifier() { //3 817 CodeableConcept t = new CodeableConcept(); 818 if (this.classifier == null) 819 this.classifier = new ArrayList<CodeableConcept>(); 820 this.classifier.add(t); 821 return t; 822 } 823 824 public ArtifactAssessmentContentComponent addClassifier(CodeableConcept t) { //3 825 if (t == null) 826 return this; 827 if (this.classifier == null) 828 this.classifier = new ArrayList<CodeableConcept>(); 829 this.classifier.add(t); 830 return this; 831 } 832 833 /** 834 * @return The first repetition of repeating field {@link #classifier}, creating it if it does not already exist {3} 835 */ 836 public CodeableConcept getClassifierFirstRep() { 837 if (getClassifier().isEmpty()) { 838 addClassifier(); 839 } 840 return getClassifier().get(0); 841 } 842 843 /** 844 * @return {@link #quantity} (A quantitative rating of the artifact.) 845 */ 846 public Quantity getQuantity() { 847 if (this.quantity == null) 848 if (Configuration.errorOnAutoCreate()) 849 throw new Error("Attempt to auto-create ArtifactAssessmentContentComponent.quantity"); 850 else if (Configuration.doAutoCreate()) 851 this.quantity = new Quantity(); // cc 852 return this.quantity; 853 } 854 855 public boolean hasQuantity() { 856 return this.quantity != null && !this.quantity.isEmpty(); 857 } 858 859 /** 860 * @param value {@link #quantity} (A quantitative rating of the artifact.) 861 */ 862 public ArtifactAssessmentContentComponent setQuantity(Quantity value) { 863 this.quantity = value; 864 return this; 865 } 866 867 /** 868 * @return {@link #author} (Indicates who or what authored the content.) 869 */ 870 public Reference getAuthor() { 871 if (this.author == null) 872 if (Configuration.errorOnAutoCreate()) 873 throw new Error("Attempt to auto-create ArtifactAssessmentContentComponent.author"); 874 else if (Configuration.doAutoCreate()) 875 this.author = new Reference(); // cc 876 return this.author; 877 } 878 879 public boolean hasAuthor() { 880 return this.author != null && !this.author.isEmpty(); 881 } 882 883 /** 884 * @param value {@link #author} (Indicates who or what authored the content.) 885 */ 886 public ArtifactAssessmentContentComponent setAuthor(Reference value) { 887 this.author = value; 888 return this; 889 } 890 891 /** 892 * @return {@link #path} (A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource.) 893 */ 894 public List<UriType> getPath() { 895 if (this.path == null) 896 this.path = new ArrayList<UriType>(); 897 return this.path; 898 } 899 900 /** 901 * @return Returns a reference to <code>this</code> for easy method chaining 902 */ 903 public ArtifactAssessmentContentComponent setPath(List<UriType> thePath) { 904 this.path = thePath; 905 return this; 906 } 907 908 public boolean hasPath() { 909 if (this.path == null) 910 return false; 911 for (UriType item : this.path) 912 if (!item.isEmpty()) 913 return true; 914 return false; 915 } 916 917 /** 918 * @return {@link #path} (A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource.) 919 */ 920 public UriType addPathElement() {//2 921 UriType t = new UriType(); 922 if (this.path == null) 923 this.path = new ArrayList<UriType>(); 924 this.path.add(t); 925 return t; 926 } 927 928 /** 929 * @param value {@link #path} (A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource.) 930 */ 931 public ArtifactAssessmentContentComponent addPath(String value) { //1 932 UriType t = new UriType(); 933 t.setValue(value); 934 if (this.path == null) 935 this.path = new ArrayList<UriType>(); 936 this.path.add(t); 937 return this; 938 } 939 940 /** 941 * @param value {@link #path} (A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource.) 942 */ 943 public boolean hasPath(String value) { 944 if (this.path == null) 945 return false; 946 for (UriType v : this.path) 947 if (v.getValue().equals(value)) // uri 948 return true; 949 return false; 950 } 951 952 /** 953 * @return {@link #relatedArtifact} (Additional related artifacts that provide supporting documentation, additional evidence, or further information related to the content.) 954 */ 955 public List<RelatedArtifact> getRelatedArtifact() { 956 if (this.relatedArtifact == null) 957 this.relatedArtifact = new ArrayList<RelatedArtifact>(); 958 return this.relatedArtifact; 959 } 960 961 /** 962 * @return Returns a reference to <code>this</code> for easy method chaining 963 */ 964 public ArtifactAssessmentContentComponent setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) { 965 this.relatedArtifact = theRelatedArtifact; 966 return this; 967 } 968 969 public boolean hasRelatedArtifact() { 970 if (this.relatedArtifact == null) 971 return false; 972 for (RelatedArtifact item : this.relatedArtifact) 973 if (!item.isEmpty()) 974 return true; 975 return false; 976 } 977 978 public RelatedArtifact addRelatedArtifact() { //3 979 RelatedArtifact t = new RelatedArtifact(); 980 if (this.relatedArtifact == null) 981 this.relatedArtifact = new ArrayList<RelatedArtifact>(); 982 this.relatedArtifact.add(t); 983 return t; 984 } 985 986 public ArtifactAssessmentContentComponent addRelatedArtifact(RelatedArtifact t) { //3 987 if (t == null) 988 return this; 989 if (this.relatedArtifact == null) 990 this.relatedArtifact = new ArrayList<RelatedArtifact>(); 991 this.relatedArtifact.add(t); 992 return this; 993 } 994 995 /** 996 * @return The first repetition of repeating field {@link #relatedArtifact}, creating it if it does not already exist {3} 997 */ 998 public RelatedArtifact getRelatedArtifactFirstRep() { 999 if (getRelatedArtifact().isEmpty()) { 1000 addRelatedArtifact(); 1001 } 1002 return getRelatedArtifact().get(0); 1003 } 1004 1005 /** 1006 * @return {@link #freeToShare} (Acceptable to publicly share the comment, classifier or rating.). This is the underlying object with id, value and extensions. The accessor "getFreeToShare" gives direct access to the value 1007 */ 1008 public BooleanType getFreeToShareElement() { 1009 if (this.freeToShare == null) 1010 if (Configuration.errorOnAutoCreate()) 1011 throw new Error("Attempt to auto-create ArtifactAssessmentContentComponent.freeToShare"); 1012 else if (Configuration.doAutoCreate()) 1013 this.freeToShare = new BooleanType(); // bb 1014 return this.freeToShare; 1015 } 1016 1017 public boolean hasFreeToShareElement() { 1018 return this.freeToShare != null && !this.freeToShare.isEmpty(); 1019 } 1020 1021 public boolean hasFreeToShare() { 1022 return this.freeToShare != null && !this.freeToShare.isEmpty(); 1023 } 1024 1025 /** 1026 * @param value {@link #freeToShare} (Acceptable to publicly share the comment, classifier or rating.). This is the underlying object with id, value and extensions. The accessor "getFreeToShare" gives direct access to the value 1027 */ 1028 public ArtifactAssessmentContentComponent setFreeToShareElement(BooleanType value) { 1029 this.freeToShare = value; 1030 return this; 1031 } 1032 1033 /** 1034 * @return Acceptable to publicly share the comment, classifier or rating. 1035 */ 1036 public boolean getFreeToShare() { 1037 return this.freeToShare == null || this.freeToShare.isEmpty() ? false : this.freeToShare.getValue(); 1038 } 1039 1040 /** 1041 * @param value Acceptable to publicly share the comment, classifier or rating. 1042 */ 1043 public ArtifactAssessmentContentComponent setFreeToShare(boolean value) { 1044 if (this.freeToShare == null) 1045 this.freeToShare = new BooleanType(); 1046 this.freeToShare.setValue(value); 1047 return this; 1048 } 1049 1050 /** 1051 * @return {@link #component} (If the informationType is container, the components of the content.) 1052 */ 1053 public List<ArtifactAssessmentContentComponent> getComponent() { 1054 if (this.component == null) 1055 this.component = new ArrayList<ArtifactAssessmentContentComponent>(); 1056 return this.component; 1057 } 1058 1059 /** 1060 * @return Returns a reference to <code>this</code> for easy method chaining 1061 */ 1062 public ArtifactAssessmentContentComponent setComponent(List<ArtifactAssessmentContentComponent> theComponent) { 1063 this.component = theComponent; 1064 return this; 1065 } 1066 1067 public boolean hasComponent() { 1068 if (this.component == null) 1069 return false; 1070 for (ArtifactAssessmentContentComponent item : this.component) 1071 if (!item.isEmpty()) 1072 return true; 1073 return false; 1074 } 1075 1076 public ArtifactAssessmentContentComponent addComponent() { //3 1077 ArtifactAssessmentContentComponent t = new ArtifactAssessmentContentComponent(); 1078 if (this.component == null) 1079 this.component = new ArrayList<ArtifactAssessmentContentComponent>(); 1080 this.component.add(t); 1081 return t; 1082 } 1083 1084 public ArtifactAssessmentContentComponent addComponent(ArtifactAssessmentContentComponent t) { //3 1085 if (t == null) 1086 return this; 1087 if (this.component == null) 1088 this.component = new ArrayList<ArtifactAssessmentContentComponent>(); 1089 this.component.add(t); 1090 return this; 1091 } 1092 1093 /** 1094 * @return The first repetition of repeating field {@link #component}, creating it if it does not already exist {3} 1095 */ 1096 public ArtifactAssessmentContentComponent getComponentFirstRep() { 1097 if (getComponent().isEmpty()) { 1098 addComponent(); 1099 } 1100 return getComponent().get(0); 1101 } 1102 1103 protected void listChildren(List<Property> children) { 1104 super.listChildren(children); 1105 children.add(new Property("informationType", "code", "The type of information this component of the content represents.", 0, 1, informationType)); 1106 children.add(new Property("summary", "markdown", "A brief summary of the content of this component.", 0, 1, summary)); 1107 children.add(new Property("type", "CodeableConcept", "Indicates what type of content this component represents.", 0, 1, type)); 1108 children.add(new Property("classifier", "CodeableConcept", "Represents a rating, classifier, or assessment of the artifact.", 0, java.lang.Integer.MAX_VALUE, classifier)); 1109 children.add(new Property("quantity", "Quantity", "A quantitative rating of the artifact.", 0, 1, quantity)); 1110 children.add(new Property("author", "Reference(Patient|Practitioner|PractitionerRole|Organization|Device)", "Indicates who or what authored the content.", 0, 1, author)); 1111 children.add(new Property("path", "uri", "A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource.", 0, java.lang.Integer.MAX_VALUE, path)); 1112 children.add(new Property("relatedArtifact", "RelatedArtifact", "Additional related artifacts that provide supporting documentation, additional evidence, or further information related to the content.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact)); 1113 children.add(new Property("freeToShare", "boolean", "Acceptable to publicly share the comment, classifier or rating.", 0, 1, freeToShare)); 1114 children.add(new Property("component", "@ArtifactAssessment.content", "If the informationType is container, the components of the content.", 0, java.lang.Integer.MAX_VALUE, component)); 1115 } 1116 1117 @Override 1118 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1119 switch (_hash) { 1120 case 1302856326: /*informationType*/ return new Property("informationType", "code", "The type of information this component of the content represents.", 0, 1, informationType); 1121 case -1857640538: /*summary*/ return new Property("summary", "markdown", "A brief summary of the content of this component.", 0, 1, summary); 1122 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Indicates what type of content this component represents.", 0, 1, type); 1123 case -281470431: /*classifier*/ return new Property("classifier", "CodeableConcept", "Represents a rating, classifier, or assessment of the artifact.", 0, java.lang.Integer.MAX_VALUE, classifier); 1124 case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "A quantitative rating of the artifact.", 0, 1, quantity); 1125 case -1406328437: /*author*/ return new Property("author", "Reference(Patient|Practitioner|PractitionerRole|Organization|Device)", "Indicates who or what authored the content.", 0, 1, author); 1126 case 3433509: /*path*/ return new Property("path", "uri", "A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource.", 0, java.lang.Integer.MAX_VALUE, path); 1127 case 666807069: /*relatedArtifact*/ return new Property("relatedArtifact", "RelatedArtifact", "Additional related artifacts that provide supporting documentation, additional evidence, or further information related to the content.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact); 1128 case -1268656616: /*freeToShare*/ return new Property("freeToShare", "boolean", "Acceptable to publicly share the comment, classifier or rating.", 0, 1, freeToShare); 1129 case -1399907075: /*component*/ return new Property("component", "@ArtifactAssessment.content", "If the informationType is container, the components of the content.", 0, java.lang.Integer.MAX_VALUE, component); 1130 default: return super.getNamedProperty(_hash, _name, _checkValid); 1131 } 1132 1133 } 1134 1135 @Override 1136 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1137 switch (hash) { 1138 case 1302856326: /*informationType*/ return this.informationType == null ? new Base[0] : new Base[] {this.informationType}; // Enumeration<ArtifactAssessmentInformationType> 1139 case -1857640538: /*summary*/ return this.summary == null ? new Base[0] : new Base[] {this.summary}; // MarkdownType 1140 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1141 case -281470431: /*classifier*/ return this.classifier == null ? new Base[0] : this.classifier.toArray(new Base[this.classifier.size()]); // CodeableConcept 1142 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 1143 case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Reference 1144 case 3433509: /*path*/ return this.path == null ? new Base[0] : this.path.toArray(new Base[this.path.size()]); // UriType 1145 case 666807069: /*relatedArtifact*/ return this.relatedArtifact == null ? new Base[0] : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact 1146 case -1268656616: /*freeToShare*/ return this.freeToShare == null ? new Base[0] : new Base[] {this.freeToShare}; // BooleanType 1147 case -1399907075: /*component*/ return this.component == null ? new Base[0] : this.component.toArray(new Base[this.component.size()]); // ArtifactAssessmentContentComponent 1148 default: return super.getProperty(hash, name, checkValid); 1149 } 1150 1151 } 1152 1153 @Override 1154 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1155 switch (hash) { 1156 case 1302856326: // informationType 1157 value = new ArtifactAssessmentInformationTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 1158 this.informationType = (Enumeration) value; // Enumeration<ArtifactAssessmentInformationType> 1159 return value; 1160 case -1857640538: // summary 1161 this.summary = TypeConvertor.castToMarkdown(value); // MarkdownType 1162 return value; 1163 case 3575610: // type 1164 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1165 return value; 1166 case -281470431: // classifier 1167 this.getClassifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1168 return value; 1169 case -1285004149: // quantity 1170 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 1171 return value; 1172 case -1406328437: // author 1173 this.author = TypeConvertor.castToReference(value); // Reference 1174 return value; 1175 case 3433509: // path 1176 this.getPath().add(TypeConvertor.castToUri(value)); // UriType 1177 return value; 1178 case 666807069: // relatedArtifact 1179 this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value)); // RelatedArtifact 1180 return value; 1181 case -1268656616: // freeToShare 1182 this.freeToShare = TypeConvertor.castToBoolean(value); // BooleanType 1183 return value; 1184 case -1399907075: // component 1185 this.getComponent().add((ArtifactAssessmentContentComponent) value); // ArtifactAssessmentContentComponent 1186 return value; 1187 default: return super.setProperty(hash, name, value); 1188 } 1189 1190 } 1191 1192 @Override 1193 public Base setProperty(String name, Base value) throws FHIRException { 1194 if (name.equals("informationType")) { 1195 value = new ArtifactAssessmentInformationTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 1196 this.informationType = (Enumeration) value; // Enumeration<ArtifactAssessmentInformationType> 1197 } else if (name.equals("summary")) { 1198 this.summary = TypeConvertor.castToMarkdown(value); // MarkdownType 1199 } else if (name.equals("type")) { 1200 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1201 } else if (name.equals("classifier")) { 1202 this.getClassifier().add(TypeConvertor.castToCodeableConcept(value)); 1203 } else if (name.equals("quantity")) { 1204 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 1205 } else if (name.equals("author")) { 1206 this.author = TypeConvertor.castToReference(value); // Reference 1207 } else if (name.equals("path")) { 1208 this.getPath().add(TypeConvertor.castToUri(value)); 1209 } else if (name.equals("relatedArtifact")) { 1210 this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value)); 1211 } else if (name.equals("freeToShare")) { 1212 this.freeToShare = TypeConvertor.castToBoolean(value); // BooleanType 1213 } else if (name.equals("component")) { 1214 this.getComponent().add((ArtifactAssessmentContentComponent) value); 1215 } else 1216 return super.setProperty(name, value); 1217 return value; 1218 } 1219 1220 @Override 1221 public void removeChild(String name, Base value) throws FHIRException { 1222 if (name.equals("informationType")) { 1223 value = new ArtifactAssessmentInformationTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 1224 this.informationType = (Enumeration) value; // Enumeration<ArtifactAssessmentInformationType> 1225 } else if (name.equals("summary")) { 1226 this.summary = null; 1227 } else if (name.equals("type")) { 1228 this.type = null; 1229 } else if (name.equals("classifier")) { 1230 this.getClassifier().remove(value); 1231 } else if (name.equals("quantity")) { 1232 this.quantity = null; 1233 } else if (name.equals("author")) { 1234 this.author = null; 1235 } else if (name.equals("path")) { 1236 this.getPath().remove(value); 1237 } else if (name.equals("relatedArtifact")) { 1238 this.getRelatedArtifact().remove(value); 1239 } else if (name.equals("freeToShare")) { 1240 this.freeToShare = null; 1241 } else if (name.equals("component")) { 1242 this.getComponent().remove((ArtifactAssessmentContentComponent) value); 1243 } else 1244 super.removeChild(name, value); 1245 1246 } 1247 1248 @Override 1249 public Base makeProperty(int hash, String name) throws FHIRException { 1250 switch (hash) { 1251 case 1302856326: return getInformationTypeElement(); 1252 case -1857640538: return getSummaryElement(); 1253 case 3575610: return getType(); 1254 case -281470431: return addClassifier(); 1255 case -1285004149: return getQuantity(); 1256 case -1406328437: return getAuthor(); 1257 case 3433509: return addPathElement(); 1258 case 666807069: return addRelatedArtifact(); 1259 case -1268656616: return getFreeToShareElement(); 1260 case -1399907075: return addComponent(); 1261 default: return super.makeProperty(hash, name); 1262 } 1263 1264 } 1265 1266 @Override 1267 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1268 switch (hash) { 1269 case 1302856326: /*informationType*/ return new String[] {"code"}; 1270 case -1857640538: /*summary*/ return new String[] {"markdown"}; 1271 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1272 case -281470431: /*classifier*/ return new String[] {"CodeableConcept"}; 1273 case -1285004149: /*quantity*/ return new String[] {"Quantity"}; 1274 case -1406328437: /*author*/ return new String[] {"Reference"}; 1275 case 3433509: /*path*/ return new String[] {"uri"}; 1276 case 666807069: /*relatedArtifact*/ return new String[] {"RelatedArtifact"}; 1277 case -1268656616: /*freeToShare*/ return new String[] {"boolean"}; 1278 case -1399907075: /*component*/ return new String[] {"@ArtifactAssessment.content"}; 1279 default: return super.getTypesForProperty(hash, name); 1280 } 1281 1282 } 1283 1284 @Override 1285 public Base addChild(String name) throws FHIRException { 1286 if (name.equals("informationType")) { 1287 throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.content.informationType"); 1288 } 1289 else if (name.equals("summary")) { 1290 throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.content.summary"); 1291 } 1292 else if (name.equals("type")) { 1293 this.type = new CodeableConcept(); 1294 return this.type; 1295 } 1296 else if (name.equals("classifier")) { 1297 return addClassifier(); 1298 } 1299 else if (name.equals("quantity")) { 1300 this.quantity = new Quantity(); 1301 return this.quantity; 1302 } 1303 else if (name.equals("author")) { 1304 this.author = new Reference(); 1305 return this.author; 1306 } 1307 else if (name.equals("path")) { 1308 throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.content.path"); 1309 } 1310 else if (name.equals("relatedArtifact")) { 1311 return addRelatedArtifact(); 1312 } 1313 else if (name.equals("freeToShare")) { 1314 throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.content.freeToShare"); 1315 } 1316 else if (name.equals("component")) { 1317 return addComponent(); 1318 } 1319 else 1320 return super.addChild(name); 1321 } 1322 1323 public ArtifactAssessmentContentComponent copy() { 1324 ArtifactAssessmentContentComponent dst = new ArtifactAssessmentContentComponent(); 1325 copyValues(dst); 1326 return dst; 1327 } 1328 1329 public void copyValues(ArtifactAssessmentContentComponent dst) { 1330 super.copyValues(dst); 1331 dst.informationType = informationType == null ? null : informationType.copy(); 1332 dst.summary = summary == null ? null : summary.copy(); 1333 dst.type = type == null ? null : type.copy(); 1334 if (classifier != null) { 1335 dst.classifier = new ArrayList<CodeableConcept>(); 1336 for (CodeableConcept i : classifier) 1337 dst.classifier.add(i.copy()); 1338 }; 1339 dst.quantity = quantity == null ? null : quantity.copy(); 1340 dst.author = author == null ? null : author.copy(); 1341 if (path != null) { 1342 dst.path = new ArrayList<UriType>(); 1343 for (UriType i : path) 1344 dst.path.add(i.copy()); 1345 }; 1346 if (relatedArtifact != null) { 1347 dst.relatedArtifact = new ArrayList<RelatedArtifact>(); 1348 for (RelatedArtifact i : relatedArtifact) 1349 dst.relatedArtifact.add(i.copy()); 1350 }; 1351 dst.freeToShare = freeToShare == null ? null : freeToShare.copy(); 1352 if (component != null) { 1353 dst.component = new ArrayList<ArtifactAssessmentContentComponent>(); 1354 for (ArtifactAssessmentContentComponent i : component) 1355 dst.component.add(i.copy()); 1356 }; 1357 } 1358 1359 @Override 1360 public boolean equalsDeep(Base other_) { 1361 if (!super.equalsDeep(other_)) 1362 return false; 1363 if (!(other_ instanceof ArtifactAssessmentContentComponent)) 1364 return false; 1365 ArtifactAssessmentContentComponent o = (ArtifactAssessmentContentComponent) other_; 1366 return compareDeep(informationType, o.informationType, true) && compareDeep(summary, o.summary, true) 1367 && compareDeep(type, o.type, true) && compareDeep(classifier, o.classifier, true) && compareDeep(quantity, o.quantity, true) 1368 && compareDeep(author, o.author, true) && compareDeep(path, o.path, true) && compareDeep(relatedArtifact, o.relatedArtifact, true) 1369 && compareDeep(freeToShare, o.freeToShare, true) && compareDeep(component, o.component, true); 1370 } 1371 1372 @Override 1373 public boolean equalsShallow(Base other_) { 1374 if (!super.equalsShallow(other_)) 1375 return false; 1376 if (!(other_ instanceof ArtifactAssessmentContentComponent)) 1377 return false; 1378 ArtifactAssessmentContentComponent o = (ArtifactAssessmentContentComponent) other_; 1379 return compareValues(informationType, o.informationType, true) && compareValues(summary, o.summary, true) 1380 && compareValues(path, o.path, true) && compareValues(freeToShare, o.freeToShare, true); 1381 } 1382 1383 public boolean isEmpty() { 1384 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(informationType, summary, type 1385 , classifier, quantity, author, path, relatedArtifact, freeToShare, component 1386 ); 1387 } 1388 1389 public String fhirType() { 1390 return "ArtifactAssessment.content"; 1391 1392 } 1393 1394 } 1395 1396 /** 1397 * A formal identifier that is used to identify this artifact assessment when it is represented in other formats, or referenced in a specification, model, design or an instance. 1398 */ 1399 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1400 @Description(shortDefinition="Additional identifier for the artifact assessment", formalDefinition="A formal identifier that is used to identify this artifact assessment when it is represented in other formats, or referenced in a specification, model, design or an instance." ) 1401 protected List<Identifier> identifier; 1402 1403 /** 1404 * A short title for the assessment for use in displaying and selecting. 1405 */ 1406 @Child(name = "title", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 1407 @Description(shortDefinition="A short title for the assessment for use in displaying and selecting", formalDefinition="A short title for the assessment for use in displaying and selecting." ) 1408 protected StringType title; 1409 1410 /** 1411 * Display of or reference to the bibliographic citation of the comment, classifier, or rating. 1412 */ 1413 @Child(name = "citeAs", type = {Citation.class, MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1414 @Description(shortDefinition="How to cite the comment or rating", formalDefinition="Display of or reference to the bibliographic citation of the comment, classifier, or rating." ) 1415 protected DataType citeAs; 1416 1417 /** 1418 * The date (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes. 1419 */ 1420 @Child(name = "date", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) 1421 @Description(shortDefinition="Date last changed", formalDefinition="The date (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes." ) 1422 protected DateTimeType date; 1423 1424 /** 1425 * A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment. 1426 */ 1427 @Child(name = "copyright", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false) 1428 @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment." ) 1429 protected MarkdownType copyright; 1430 1431 /** 1432 * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage. 1433 */ 1434 @Child(name = "approvalDate", type = {DateType.class}, order=5, min=0, max=1, modifier=false, summary=false) 1435 @Description(shortDefinition="When the artifact assessment was approved by publisher", formalDefinition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." ) 1436 protected DateType approvalDate; 1437 1438 /** 1439 * The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date. 1440 */ 1441 @Child(name = "lastReviewDate", type = {DateType.class}, order=6, min=0, max=1, modifier=false, summary=true) 1442 @Description(shortDefinition="When the artifact assessment was last reviewed by the publisher", formalDefinition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." ) 1443 protected DateType lastReviewDate; 1444 1445 /** 1446 * A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about. 1447 */ 1448 @Child(name = "artifact", type = {Reference.class, CanonicalType.class, UriType.class}, order=7, min=1, max=1, modifier=false, summary=true) 1449 @Description(shortDefinition="The artifact assessed, commented upon or rated", formalDefinition="A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about." ) 1450 protected DataType artifact; 1451 1452 /** 1453 * A component comment, classifier, or rating of the artifact. 1454 */ 1455 @Child(name = "content", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1456 @Description(shortDefinition="Comment, classifier, or rating content", formalDefinition="A component comment, classifier, or rating of the artifact." ) 1457 protected List<ArtifactAssessmentContentComponent> content; 1458 1459 /** 1460 * Indicates the workflow status of the comment or change request. 1461 */ 1462 @Child(name = "workflowStatus", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=true) 1463 @Description(shortDefinition="submitted | triaged | waiting-for-input | resolved-no-change | resolved-change-required | deferred | duplicate | applied | published | entered-in-error", formalDefinition="Indicates the workflow status of the comment or change request." ) 1464 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/artifactassessment-workflow-status") 1465 protected Enumeration<ArtifactAssessmentWorkflowStatus> workflowStatus; 1466 1467 /** 1468 * Indicates the disposition of the responsible party to the comment or change request. 1469 */ 1470 @Child(name = "disposition", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=true) 1471 @Description(shortDefinition="unresolved | not-persuasive | persuasive | persuasive-with-modification | not-persuasive-with-modification", formalDefinition="Indicates the disposition of the responsible party to the comment or change request." ) 1472 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/artifactassessment-disposition") 1473 protected Enumeration<ArtifactAssessmentDisposition> disposition; 1474 1475 private static final long serialVersionUID = 525457507L; 1476 1477 /** 1478 * Constructor 1479 */ 1480 public ArtifactAssessment() { 1481 super(); 1482 } 1483 1484 /** 1485 * Constructor 1486 */ 1487 public ArtifactAssessment(DataType artifact) { 1488 super(); 1489 this.setArtifact(artifact); 1490 } 1491 1492 /** 1493 * @return {@link #identifier} (A formal identifier that is used to identify this artifact assessment when it is represented in other formats, or referenced in a specification, model, design or an instance.) 1494 */ 1495 public List<Identifier> getIdentifier() { 1496 if (this.identifier == null) 1497 this.identifier = new ArrayList<Identifier>(); 1498 return this.identifier; 1499 } 1500 1501 /** 1502 * @return Returns a reference to <code>this</code> for easy method chaining 1503 */ 1504 public ArtifactAssessment setIdentifier(List<Identifier> theIdentifier) { 1505 this.identifier = theIdentifier; 1506 return this; 1507 } 1508 1509 public boolean hasIdentifier() { 1510 if (this.identifier == null) 1511 return false; 1512 for (Identifier item : this.identifier) 1513 if (!item.isEmpty()) 1514 return true; 1515 return false; 1516 } 1517 1518 public Identifier addIdentifier() { //3 1519 Identifier t = new Identifier(); 1520 if (this.identifier == null) 1521 this.identifier = new ArrayList<Identifier>(); 1522 this.identifier.add(t); 1523 return t; 1524 } 1525 1526 public ArtifactAssessment addIdentifier(Identifier t) { //3 1527 if (t == null) 1528 return this; 1529 if (this.identifier == null) 1530 this.identifier = new ArrayList<Identifier>(); 1531 this.identifier.add(t); 1532 return this; 1533 } 1534 1535 /** 1536 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 1537 */ 1538 public Identifier getIdentifierFirstRep() { 1539 if (getIdentifier().isEmpty()) { 1540 addIdentifier(); 1541 } 1542 return getIdentifier().get(0); 1543 } 1544 1545 /** 1546 * @return {@link #title} (A short title for the assessment for use in displaying and selecting.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1547 */ 1548 public StringType getTitleElement() { 1549 if (this.title == null) 1550 if (Configuration.errorOnAutoCreate()) 1551 throw new Error("Attempt to auto-create ArtifactAssessment.title"); 1552 else if (Configuration.doAutoCreate()) 1553 this.title = new StringType(); // bb 1554 return this.title; 1555 } 1556 1557 public boolean hasTitleElement() { 1558 return this.title != null && !this.title.isEmpty(); 1559 } 1560 1561 public boolean hasTitle() { 1562 return this.title != null && !this.title.isEmpty(); 1563 } 1564 1565 /** 1566 * @param value {@link #title} (A short title for the assessment for use in displaying and selecting.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1567 */ 1568 public ArtifactAssessment setTitleElement(StringType value) { 1569 this.title = value; 1570 return this; 1571 } 1572 1573 /** 1574 * @return A short title for the assessment for use in displaying and selecting. 1575 */ 1576 public String getTitle() { 1577 return this.title == null ? null : this.title.getValue(); 1578 } 1579 1580 /** 1581 * @param value A short title for the assessment for use in displaying and selecting. 1582 */ 1583 public ArtifactAssessment setTitle(String value) { 1584 if (Utilities.noString(value)) 1585 this.title = null; 1586 else { 1587 if (this.title == null) 1588 this.title = new StringType(); 1589 this.title.setValue(value); 1590 } 1591 return this; 1592 } 1593 1594 /** 1595 * @return {@link #citeAs} (Display of or reference to the bibliographic citation of the comment, classifier, or rating.) 1596 */ 1597 public DataType getCiteAs() { 1598 return this.citeAs; 1599 } 1600 1601 /** 1602 * @return {@link #citeAs} (Display of or reference to the bibliographic citation of the comment, classifier, or rating.) 1603 */ 1604 public Reference getCiteAsReference() throws FHIRException { 1605 if (this.citeAs == null) 1606 this.citeAs = new Reference(); 1607 if (!(this.citeAs instanceof Reference)) 1608 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.citeAs.getClass().getName()+" was encountered"); 1609 return (Reference) this.citeAs; 1610 } 1611 1612 public boolean hasCiteAsReference() { 1613 return this != null && this.citeAs instanceof Reference; 1614 } 1615 1616 /** 1617 * @return {@link #citeAs} (Display of or reference to the bibliographic citation of the comment, classifier, or rating.) 1618 */ 1619 public MarkdownType getCiteAsMarkdownType() throws FHIRException { 1620 if (this.citeAs == null) 1621 this.citeAs = new MarkdownType(); 1622 if (!(this.citeAs instanceof MarkdownType)) 1623 throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.citeAs.getClass().getName()+" was encountered"); 1624 return (MarkdownType) this.citeAs; 1625 } 1626 1627 public boolean hasCiteAsMarkdownType() { 1628 return this != null && this.citeAs instanceof MarkdownType; 1629 } 1630 1631 public boolean hasCiteAs() { 1632 return this.citeAs != null && !this.citeAs.isEmpty(); 1633 } 1634 1635 /** 1636 * @param value {@link #citeAs} (Display of or reference to the bibliographic citation of the comment, classifier, or rating.) 1637 */ 1638 public ArtifactAssessment setCiteAs(DataType value) { 1639 if (value != null && !(value instanceof Reference || value instanceof MarkdownType)) 1640 throw new FHIRException("Not the right type for ArtifactAssessment.citeAs[x]: "+value.fhirType()); 1641 this.citeAs = value; 1642 return this; 1643 } 1644 1645 /** 1646 * @return {@link #date} (The date (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1647 */ 1648 public DateTimeType getDateElement() { 1649 if (this.date == null) 1650 if (Configuration.errorOnAutoCreate()) 1651 throw new Error("Attempt to auto-create ArtifactAssessment.date"); 1652 else if (Configuration.doAutoCreate()) 1653 this.date = new DateTimeType(); // bb 1654 return this.date; 1655 } 1656 1657 public boolean hasDateElement() { 1658 return this.date != null && !this.date.isEmpty(); 1659 } 1660 1661 public boolean hasDate() { 1662 return this.date != null && !this.date.isEmpty(); 1663 } 1664 1665 /** 1666 * @param value {@link #date} (The date (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1667 */ 1668 public ArtifactAssessment setDateElement(DateTimeType value) { 1669 this.date = value; 1670 return this; 1671 } 1672 1673 /** 1674 * @return The date (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes. 1675 */ 1676 public Date getDate() { 1677 return this.date == null ? null : this.date.getValue(); 1678 } 1679 1680 /** 1681 * @param value The date (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes. 1682 */ 1683 public ArtifactAssessment setDate(Date value) { 1684 if (value == null) 1685 this.date = null; 1686 else { 1687 if (this.date == null) 1688 this.date = new DateTimeType(); 1689 this.date.setValue(value); 1690 } 1691 return this; 1692 } 1693 1694 /** 1695 * @return {@link #copyright} (A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 1696 */ 1697 public MarkdownType getCopyrightElement() { 1698 if (this.copyright == null) 1699 if (Configuration.errorOnAutoCreate()) 1700 throw new Error("Attempt to auto-create ArtifactAssessment.copyright"); 1701 else if (Configuration.doAutoCreate()) 1702 this.copyright = new MarkdownType(); // bb 1703 return this.copyright; 1704 } 1705 1706 public boolean hasCopyrightElement() { 1707 return this.copyright != null && !this.copyright.isEmpty(); 1708 } 1709 1710 public boolean hasCopyright() { 1711 return this.copyright != null && !this.copyright.isEmpty(); 1712 } 1713 1714 /** 1715 * @param value {@link #copyright} (A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 1716 */ 1717 public ArtifactAssessment setCopyrightElement(MarkdownType value) { 1718 this.copyright = value; 1719 return this; 1720 } 1721 1722 /** 1723 * @return A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment. 1724 */ 1725 public String getCopyright() { 1726 return this.copyright == null ? null : this.copyright.getValue(); 1727 } 1728 1729 /** 1730 * @param value A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment. 1731 */ 1732 public ArtifactAssessment setCopyright(String value) { 1733 if (Utilities.noString(value)) 1734 this.copyright = null; 1735 else { 1736 if (this.copyright == null) 1737 this.copyright = new MarkdownType(); 1738 this.copyright.setValue(value); 1739 } 1740 return this; 1741 } 1742 1743 /** 1744 * @return {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value 1745 */ 1746 public DateType getApprovalDateElement() { 1747 if (this.approvalDate == null) 1748 if (Configuration.errorOnAutoCreate()) 1749 throw new Error("Attempt to auto-create ArtifactAssessment.approvalDate"); 1750 else if (Configuration.doAutoCreate()) 1751 this.approvalDate = new DateType(); // bb 1752 return this.approvalDate; 1753 } 1754 1755 public boolean hasApprovalDateElement() { 1756 return this.approvalDate != null && !this.approvalDate.isEmpty(); 1757 } 1758 1759 public boolean hasApprovalDate() { 1760 return this.approvalDate != null && !this.approvalDate.isEmpty(); 1761 } 1762 1763 /** 1764 * @param value {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value 1765 */ 1766 public ArtifactAssessment setApprovalDateElement(DateType value) { 1767 this.approvalDate = value; 1768 return this; 1769 } 1770 1771 /** 1772 * @return The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage. 1773 */ 1774 public Date getApprovalDate() { 1775 return this.approvalDate == null ? null : this.approvalDate.getValue(); 1776 } 1777 1778 /** 1779 * @param value The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage. 1780 */ 1781 public ArtifactAssessment setApprovalDate(Date value) { 1782 if (value == null) 1783 this.approvalDate = null; 1784 else { 1785 if (this.approvalDate == null) 1786 this.approvalDate = new DateType(); 1787 this.approvalDate.setValue(value); 1788 } 1789 return this; 1790 } 1791 1792 /** 1793 * @return {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value 1794 */ 1795 public DateType getLastReviewDateElement() { 1796 if (this.lastReviewDate == null) 1797 if (Configuration.errorOnAutoCreate()) 1798 throw new Error("Attempt to auto-create ArtifactAssessment.lastReviewDate"); 1799 else if (Configuration.doAutoCreate()) 1800 this.lastReviewDate = new DateType(); // bb 1801 return this.lastReviewDate; 1802 } 1803 1804 public boolean hasLastReviewDateElement() { 1805 return this.lastReviewDate != null && !this.lastReviewDate.isEmpty(); 1806 } 1807 1808 public boolean hasLastReviewDate() { 1809 return this.lastReviewDate != null && !this.lastReviewDate.isEmpty(); 1810 } 1811 1812 /** 1813 * @param value {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value 1814 */ 1815 public ArtifactAssessment setLastReviewDateElement(DateType value) { 1816 this.lastReviewDate = value; 1817 return this; 1818 } 1819 1820 /** 1821 * @return The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date. 1822 */ 1823 public Date getLastReviewDate() { 1824 return this.lastReviewDate == null ? null : this.lastReviewDate.getValue(); 1825 } 1826 1827 /** 1828 * @param value The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date. 1829 */ 1830 public ArtifactAssessment setLastReviewDate(Date value) { 1831 if (value == null) 1832 this.lastReviewDate = null; 1833 else { 1834 if (this.lastReviewDate == null) 1835 this.lastReviewDate = new DateType(); 1836 this.lastReviewDate.setValue(value); 1837 } 1838 return this; 1839 } 1840 1841 /** 1842 * @return {@link #artifact} (A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.) 1843 */ 1844 public DataType getArtifact() { 1845 return this.artifact; 1846 } 1847 1848 /** 1849 * @return {@link #artifact} (A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.) 1850 */ 1851 public Reference getArtifactReference() throws FHIRException { 1852 if (this.artifact == null) 1853 this.artifact = new Reference(); 1854 if (!(this.artifact instanceof Reference)) 1855 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.artifact.getClass().getName()+" was encountered"); 1856 return (Reference) this.artifact; 1857 } 1858 1859 public boolean hasArtifactReference() { 1860 return this != null && this.artifact instanceof Reference; 1861 } 1862 1863 /** 1864 * @return {@link #artifact} (A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.) 1865 */ 1866 public CanonicalType getArtifactCanonicalType() throws FHIRException { 1867 if (this.artifact == null) 1868 this.artifact = new CanonicalType(); 1869 if (!(this.artifact instanceof CanonicalType)) 1870 throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.artifact.getClass().getName()+" was encountered"); 1871 return (CanonicalType) this.artifact; 1872 } 1873 1874 public boolean hasArtifactCanonicalType() { 1875 return this != null && this.artifact instanceof CanonicalType; 1876 } 1877 1878 /** 1879 * @return {@link #artifact} (A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.) 1880 */ 1881 public UriType getArtifactUriType() throws FHIRException { 1882 if (this.artifact == null) 1883 this.artifact = new UriType(); 1884 if (!(this.artifact instanceof UriType)) 1885 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.artifact.getClass().getName()+" was encountered"); 1886 return (UriType) this.artifact; 1887 } 1888 1889 public boolean hasArtifactUriType() { 1890 return this != null && this.artifact instanceof UriType; 1891 } 1892 1893 public boolean hasArtifact() { 1894 return this.artifact != null && !this.artifact.isEmpty(); 1895 } 1896 1897 /** 1898 * @param value {@link #artifact} (A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.) 1899 */ 1900 public ArtifactAssessment setArtifact(DataType value) { 1901 if (value != null && !(value instanceof Reference || value instanceof CanonicalType || value instanceof UriType)) 1902 throw new FHIRException("Not the right type for ArtifactAssessment.artifact[x]: "+value.fhirType()); 1903 this.artifact = value; 1904 return this; 1905 } 1906 1907 /** 1908 * @return {@link #content} (A component comment, classifier, or rating of the artifact.) 1909 */ 1910 public List<ArtifactAssessmentContentComponent> getContent() { 1911 if (this.content == null) 1912 this.content = new ArrayList<ArtifactAssessmentContentComponent>(); 1913 return this.content; 1914 } 1915 1916 /** 1917 * @return Returns a reference to <code>this</code> for easy method chaining 1918 */ 1919 public ArtifactAssessment setContent(List<ArtifactAssessmentContentComponent> theContent) { 1920 this.content = theContent; 1921 return this; 1922 } 1923 1924 public boolean hasContent() { 1925 if (this.content == null) 1926 return false; 1927 for (ArtifactAssessmentContentComponent item : this.content) 1928 if (!item.isEmpty()) 1929 return true; 1930 return false; 1931 } 1932 1933 public ArtifactAssessmentContentComponent addContent() { //3 1934 ArtifactAssessmentContentComponent t = new ArtifactAssessmentContentComponent(); 1935 if (this.content == null) 1936 this.content = new ArrayList<ArtifactAssessmentContentComponent>(); 1937 this.content.add(t); 1938 return t; 1939 } 1940 1941 public ArtifactAssessment addContent(ArtifactAssessmentContentComponent t) { //3 1942 if (t == null) 1943 return this; 1944 if (this.content == null) 1945 this.content = new ArrayList<ArtifactAssessmentContentComponent>(); 1946 this.content.add(t); 1947 return this; 1948 } 1949 1950 /** 1951 * @return The first repetition of repeating field {@link #content}, creating it if it does not already exist {3} 1952 */ 1953 public ArtifactAssessmentContentComponent getContentFirstRep() { 1954 if (getContent().isEmpty()) { 1955 addContent(); 1956 } 1957 return getContent().get(0); 1958 } 1959 1960 /** 1961 * @return {@link #workflowStatus} (Indicates the workflow status of the comment or change request.). This is the underlying object with id, value and extensions. The accessor "getWorkflowStatus" gives direct access to the value 1962 */ 1963 public Enumeration<ArtifactAssessmentWorkflowStatus> getWorkflowStatusElement() { 1964 if (this.workflowStatus == null) 1965 if (Configuration.errorOnAutoCreate()) 1966 throw new Error("Attempt to auto-create ArtifactAssessment.workflowStatus"); 1967 else if (Configuration.doAutoCreate()) 1968 this.workflowStatus = new Enumeration<ArtifactAssessmentWorkflowStatus>(new ArtifactAssessmentWorkflowStatusEnumFactory()); // bb 1969 return this.workflowStatus; 1970 } 1971 1972 public boolean hasWorkflowStatusElement() { 1973 return this.workflowStatus != null && !this.workflowStatus.isEmpty(); 1974 } 1975 1976 public boolean hasWorkflowStatus() { 1977 return this.workflowStatus != null && !this.workflowStatus.isEmpty(); 1978 } 1979 1980 /** 1981 * @param value {@link #workflowStatus} (Indicates the workflow status of the comment or change request.). This is the underlying object with id, value and extensions. The accessor "getWorkflowStatus" gives direct access to the value 1982 */ 1983 public ArtifactAssessment setWorkflowStatusElement(Enumeration<ArtifactAssessmentWorkflowStatus> value) { 1984 this.workflowStatus = value; 1985 return this; 1986 } 1987 1988 /** 1989 * @return Indicates the workflow status of the comment or change request. 1990 */ 1991 public ArtifactAssessmentWorkflowStatus getWorkflowStatus() { 1992 return this.workflowStatus == null ? null : this.workflowStatus.getValue(); 1993 } 1994 1995 /** 1996 * @param value Indicates the workflow status of the comment or change request. 1997 */ 1998 public ArtifactAssessment setWorkflowStatus(ArtifactAssessmentWorkflowStatus value) { 1999 if (value == null) 2000 this.workflowStatus = null; 2001 else { 2002 if (this.workflowStatus == null) 2003 this.workflowStatus = new Enumeration<ArtifactAssessmentWorkflowStatus>(new ArtifactAssessmentWorkflowStatusEnumFactory()); 2004 this.workflowStatus.setValue(value); 2005 } 2006 return this; 2007 } 2008 2009 /** 2010 * @return {@link #disposition} (Indicates the disposition of the responsible party to the comment or change request.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value 2011 */ 2012 public Enumeration<ArtifactAssessmentDisposition> getDispositionElement() { 2013 if (this.disposition == null) 2014 if (Configuration.errorOnAutoCreate()) 2015 throw new Error("Attempt to auto-create ArtifactAssessment.disposition"); 2016 else if (Configuration.doAutoCreate()) 2017 this.disposition = new Enumeration<ArtifactAssessmentDisposition>(new ArtifactAssessmentDispositionEnumFactory()); // bb 2018 return this.disposition; 2019 } 2020 2021 public boolean hasDispositionElement() { 2022 return this.disposition != null && !this.disposition.isEmpty(); 2023 } 2024 2025 public boolean hasDisposition() { 2026 return this.disposition != null && !this.disposition.isEmpty(); 2027 } 2028 2029 /** 2030 * @param value {@link #disposition} (Indicates the disposition of the responsible party to the comment or change request.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value 2031 */ 2032 public ArtifactAssessment setDispositionElement(Enumeration<ArtifactAssessmentDisposition> value) { 2033 this.disposition = value; 2034 return this; 2035 } 2036 2037 /** 2038 * @return Indicates the disposition of the responsible party to the comment or change request. 2039 */ 2040 public ArtifactAssessmentDisposition getDisposition() { 2041 return this.disposition == null ? null : this.disposition.getValue(); 2042 } 2043 2044 /** 2045 * @param value Indicates the disposition of the responsible party to the comment or change request. 2046 */ 2047 public ArtifactAssessment setDisposition(ArtifactAssessmentDisposition value) { 2048 if (value == null) 2049 this.disposition = null; 2050 else { 2051 if (this.disposition == null) 2052 this.disposition = new Enumeration<ArtifactAssessmentDisposition>(new ArtifactAssessmentDispositionEnumFactory()); 2053 this.disposition.setValue(value); 2054 } 2055 return this; 2056 } 2057 2058 protected void listChildren(List<Property> children) { 2059 super.listChildren(children); 2060 children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this artifact assessment when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2061 children.add(new Property("title", "string", "A short title for the assessment for use in displaying and selecting.", 0, 1, title)); 2062 children.add(new Property("citeAs[x]", "Reference(Citation)|markdown", "Display of or reference to the bibliographic citation of the comment, classifier, or rating.", 0, 1, citeAs)); 2063 children.add(new Property("date", "dateTime", "The date (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes.", 0, 1, date)); 2064 children.add(new Property("copyright", "markdown", "A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment.", 0, 1, copyright)); 2065 children.add(new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate)); 2066 children.add(new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", 0, 1, lastReviewDate)); 2067 children.add(new Property("artifact[x]", "Reference(Any)|canonical|uri", "A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.", 0, 1, artifact)); 2068 children.add(new Property("content", "", "A component comment, classifier, or rating of the artifact.", 0, java.lang.Integer.MAX_VALUE, content)); 2069 children.add(new Property("workflowStatus", "code", "Indicates the workflow status of the comment or change request.", 0, 1, workflowStatus)); 2070 children.add(new Property("disposition", "code", "Indicates the disposition of the responsible party to the comment or change request.", 0, 1, disposition)); 2071 } 2072 2073 @Override 2074 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2075 switch (_hash) { 2076 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A formal identifier that is used to identify this artifact assessment when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier); 2077 case 110371416: /*title*/ return new Property("title", "string", "A short title for the assessment for use in displaying and selecting.", 0, 1, title); 2078 case -1706539017: /*citeAs[x]*/ return new Property("citeAs[x]", "Reference(Citation)|markdown", "Display of or reference to the bibliographic citation of the comment, classifier, or rating.", 0, 1, citeAs); 2079 case -1360156695: /*citeAs*/ return new Property("citeAs[x]", "Reference(Citation)|markdown", "Display of or reference to the bibliographic citation of the comment, classifier, or rating.", 0, 1, citeAs); 2080 case 1269009762: /*citeAsReference*/ return new Property("citeAs[x]", "Reference(Citation)", "Display of or reference to the bibliographic citation of the comment, classifier, or rating.", 0, 1, citeAs); 2081 case 456265720: /*citeAsMarkdown*/ return new Property("citeAs[x]", "markdown", "Display of or reference to the bibliographic citation of the comment, classifier, or rating.", 0, 1, citeAs); 2082 case 3076014: /*date*/ return new Property("date", "dateTime", "The date (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes.", 0, 1, date); 2083 case 1522889671: /*copyright*/ return new Property("copyright", "markdown", "A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment.", 0, 1, copyright); 2084 case 223539345: /*approvalDate*/ return new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate); 2085 case -1687512484: /*lastReviewDate*/ return new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", 0, 1, lastReviewDate); 2086 case -1130056338: /*artifact[x]*/ return new Property("artifact[x]", "Reference(Any)|canonical|uri", "A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.", 0, 1, artifact); 2087 case -1228798510: /*artifact*/ return new Property("artifact[x]", "Reference(Any)|canonical|uri", "A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.", 0, 1, artifact); 2088 case -683686503: /*artifactReference*/ return new Property("artifact[x]", "Reference(Any)", "A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.", 0, 1, artifact); 2089 case 1069820738: /*artifactCanonical*/ return new Property("artifact[x]", "canonical", "A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.", 0, 1, artifact); 2090 case -1130062278: /*artifactUri*/ return new Property("artifact[x]", "uri", "A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.", 0, 1, artifact); 2091 case 951530617: /*content*/ return new Property("content", "", "A component comment, classifier, or rating of the artifact.", 0, java.lang.Integer.MAX_VALUE, content); 2092 case 697796753: /*workflowStatus*/ return new Property("workflowStatus", "code", "Indicates the workflow status of the comment or change request.", 0, 1, workflowStatus); 2093 case 583380919: /*disposition*/ return new Property("disposition", "code", "Indicates the disposition of the responsible party to the comment or change request.", 0, 1, disposition); 2094 default: return super.getNamedProperty(_hash, _name, _checkValid); 2095 } 2096 2097 } 2098 2099 @Override 2100 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2101 switch (hash) { 2102 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 2103 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 2104 case -1360156695: /*citeAs*/ return this.citeAs == null ? new Base[0] : new Base[] {this.citeAs}; // DataType 2105 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 2106 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 2107 case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType 2108 case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType 2109 case -1228798510: /*artifact*/ return this.artifact == null ? new Base[0] : new Base[] {this.artifact}; // DataType 2110 case 951530617: /*content*/ return this.content == null ? new Base[0] : this.content.toArray(new Base[this.content.size()]); // ArtifactAssessmentContentComponent 2111 case 697796753: /*workflowStatus*/ return this.workflowStatus == null ? new Base[0] : new Base[] {this.workflowStatus}; // Enumeration<ArtifactAssessmentWorkflowStatus> 2112 case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // Enumeration<ArtifactAssessmentDisposition> 2113 default: return super.getProperty(hash, name, checkValid); 2114 } 2115 2116 } 2117 2118 @Override 2119 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2120 switch (hash) { 2121 case -1618432855: // identifier 2122 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 2123 return value; 2124 case 110371416: // title 2125 this.title = TypeConvertor.castToString(value); // StringType 2126 return value; 2127 case -1360156695: // citeAs 2128 this.citeAs = TypeConvertor.castToType(value); // DataType 2129 return value; 2130 case 3076014: // date 2131 this.date = TypeConvertor.castToDateTime(value); // DateTimeType 2132 return value; 2133 case 1522889671: // copyright 2134 this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType 2135 return value; 2136 case 223539345: // approvalDate 2137 this.approvalDate = TypeConvertor.castToDate(value); // DateType 2138 return value; 2139 case -1687512484: // lastReviewDate 2140 this.lastReviewDate = TypeConvertor.castToDate(value); // DateType 2141 return value; 2142 case -1228798510: // artifact 2143 this.artifact = TypeConvertor.castToType(value); // DataType 2144 return value; 2145 case 951530617: // content 2146 this.getContent().add((ArtifactAssessmentContentComponent) value); // ArtifactAssessmentContentComponent 2147 return value; 2148 case 697796753: // workflowStatus 2149 value = new ArtifactAssessmentWorkflowStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 2150 this.workflowStatus = (Enumeration) value; // Enumeration<ArtifactAssessmentWorkflowStatus> 2151 return value; 2152 case 583380919: // disposition 2153 value = new ArtifactAssessmentDispositionEnumFactory().fromType(TypeConvertor.castToCode(value)); 2154 this.disposition = (Enumeration) value; // Enumeration<ArtifactAssessmentDisposition> 2155 return value; 2156 default: return super.setProperty(hash, name, value); 2157 } 2158 2159 } 2160 2161 @Override 2162 public Base setProperty(String name, Base value) throws FHIRException { 2163 if (name.equals("identifier")) { 2164 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 2165 } else if (name.equals("title")) { 2166 this.title = TypeConvertor.castToString(value); // StringType 2167 } else if (name.equals("citeAs[x]")) { 2168 this.citeAs = TypeConvertor.castToType(value); // DataType 2169 } else if (name.equals("date")) { 2170 this.date = TypeConvertor.castToDateTime(value); // DateTimeType 2171 } else if (name.equals("copyright")) { 2172 this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType 2173 } else if (name.equals("approvalDate")) { 2174 this.approvalDate = TypeConvertor.castToDate(value); // DateType 2175 } else if (name.equals("lastReviewDate")) { 2176 this.lastReviewDate = TypeConvertor.castToDate(value); // DateType 2177 } else if (name.equals("artifact[x]")) { 2178 this.artifact = TypeConvertor.castToType(value); // DataType 2179 } else if (name.equals("content")) { 2180 this.getContent().add((ArtifactAssessmentContentComponent) value); 2181 } else if (name.equals("workflowStatus")) { 2182 value = new ArtifactAssessmentWorkflowStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 2183 this.workflowStatus = (Enumeration) value; // Enumeration<ArtifactAssessmentWorkflowStatus> 2184 } else if (name.equals("disposition")) { 2185 value = new ArtifactAssessmentDispositionEnumFactory().fromType(TypeConvertor.castToCode(value)); 2186 this.disposition = (Enumeration) value; // Enumeration<ArtifactAssessmentDisposition> 2187 } else 2188 return super.setProperty(name, value); 2189 return value; 2190 } 2191 2192 @Override 2193 public void removeChild(String name, Base value) throws FHIRException { 2194 if (name.equals("identifier")) { 2195 this.getIdentifier().remove(value); 2196 } else if (name.equals("title")) { 2197 this.title = null; 2198 } else if (name.equals("citeAs[x]")) { 2199 this.citeAs = null; 2200 } else if (name.equals("date")) { 2201 this.date = null; 2202 } else if (name.equals("copyright")) { 2203 this.copyright = null; 2204 } else if (name.equals("approvalDate")) { 2205 this.approvalDate = null; 2206 } else if (name.equals("lastReviewDate")) { 2207 this.lastReviewDate = null; 2208 } else if (name.equals("artifact[x]")) { 2209 this.artifact = null; 2210 } else if (name.equals("content")) { 2211 this.getContent().remove((ArtifactAssessmentContentComponent) value); 2212 } else if (name.equals("workflowStatus")) { 2213 value = new ArtifactAssessmentWorkflowStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 2214 this.workflowStatus = (Enumeration) value; // Enumeration<ArtifactAssessmentWorkflowStatus> 2215 } else if (name.equals("disposition")) { 2216 value = new ArtifactAssessmentDispositionEnumFactory().fromType(TypeConvertor.castToCode(value)); 2217 this.disposition = (Enumeration) value; // Enumeration<ArtifactAssessmentDisposition> 2218 } else 2219 super.removeChild(name, value); 2220 2221 } 2222 2223 @Override 2224 public Base makeProperty(int hash, String name) throws FHIRException { 2225 switch (hash) { 2226 case -1618432855: return addIdentifier(); 2227 case 110371416: return getTitleElement(); 2228 case -1706539017: return getCiteAs(); 2229 case -1360156695: return getCiteAs(); 2230 case 3076014: return getDateElement(); 2231 case 1522889671: return getCopyrightElement(); 2232 case 223539345: return getApprovalDateElement(); 2233 case -1687512484: return getLastReviewDateElement(); 2234 case -1130056338: return getArtifact(); 2235 case -1228798510: return getArtifact(); 2236 case 951530617: return addContent(); 2237 case 697796753: return getWorkflowStatusElement(); 2238 case 583380919: return getDispositionElement(); 2239 default: return super.makeProperty(hash, name); 2240 } 2241 2242 } 2243 2244 @Override 2245 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2246 switch (hash) { 2247 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2248 case 110371416: /*title*/ return new String[] {"string"}; 2249 case -1360156695: /*citeAs*/ return new String[] {"Reference", "markdown"}; 2250 case 3076014: /*date*/ return new String[] {"dateTime"}; 2251 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 2252 case 223539345: /*approvalDate*/ return new String[] {"date"}; 2253 case -1687512484: /*lastReviewDate*/ return new String[] {"date"}; 2254 case -1228798510: /*artifact*/ return new String[] {"Reference", "canonical", "uri"}; 2255 case 951530617: /*content*/ return new String[] {}; 2256 case 697796753: /*workflowStatus*/ return new String[] {"code"}; 2257 case 583380919: /*disposition*/ return new String[] {"code"}; 2258 default: return super.getTypesForProperty(hash, name); 2259 } 2260 2261 } 2262 2263 @Override 2264 public Base addChild(String name) throws FHIRException { 2265 if (name.equals("identifier")) { 2266 return addIdentifier(); 2267 } 2268 else if (name.equals("title")) { 2269 throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.title"); 2270 } 2271 else if (name.equals("citeAsReference")) { 2272 this.citeAs = new Reference(); 2273 return this.citeAs; 2274 } 2275 else if (name.equals("citeAsMarkdown")) { 2276 this.citeAs = new MarkdownType(); 2277 return this.citeAs; 2278 } 2279 else if (name.equals("date")) { 2280 throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.date"); 2281 } 2282 else if (name.equals("copyright")) { 2283 throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.copyright"); 2284 } 2285 else if (name.equals("approvalDate")) { 2286 throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.approvalDate"); 2287 } 2288 else if (name.equals("lastReviewDate")) { 2289 throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.lastReviewDate"); 2290 } 2291 else if (name.equals("artifactReference")) { 2292 this.artifact = new Reference(); 2293 return this.artifact; 2294 } 2295 else if (name.equals("artifactCanonical")) { 2296 this.artifact = new CanonicalType(); 2297 return this.artifact; 2298 } 2299 else if (name.equals("artifactUri")) { 2300 this.artifact = new UriType(); 2301 return this.artifact; 2302 } 2303 else if (name.equals("content")) { 2304 return addContent(); 2305 } 2306 else if (name.equals("workflowStatus")) { 2307 throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.workflowStatus"); 2308 } 2309 else if (name.equals("disposition")) { 2310 throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.disposition"); 2311 } 2312 else 2313 return super.addChild(name); 2314 } 2315 2316 public String fhirType() { 2317 return "ArtifactAssessment"; 2318 2319 } 2320 2321 public ArtifactAssessment copy() { 2322 ArtifactAssessment dst = new ArtifactAssessment(); 2323 copyValues(dst); 2324 return dst; 2325 } 2326 2327 public void copyValues(ArtifactAssessment dst) { 2328 super.copyValues(dst); 2329 if (identifier != null) { 2330 dst.identifier = new ArrayList<Identifier>(); 2331 for (Identifier i : identifier) 2332 dst.identifier.add(i.copy()); 2333 }; 2334 dst.title = title == null ? null : title.copy(); 2335 dst.citeAs = citeAs == null ? null : citeAs.copy(); 2336 dst.date = date == null ? null : date.copy(); 2337 dst.copyright = copyright == null ? null : copyright.copy(); 2338 dst.approvalDate = approvalDate == null ? null : approvalDate.copy(); 2339 dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy(); 2340 dst.artifact = artifact == null ? null : artifact.copy(); 2341 if (content != null) { 2342 dst.content = new ArrayList<ArtifactAssessmentContentComponent>(); 2343 for (ArtifactAssessmentContentComponent i : content) 2344 dst.content.add(i.copy()); 2345 }; 2346 dst.workflowStatus = workflowStatus == null ? null : workflowStatus.copy(); 2347 dst.disposition = disposition == null ? null : disposition.copy(); 2348 } 2349 2350 protected ArtifactAssessment typedCopy() { 2351 return copy(); 2352 } 2353 2354 @Override 2355 public boolean equalsDeep(Base other_) { 2356 if (!super.equalsDeep(other_)) 2357 return false; 2358 if (!(other_ instanceof ArtifactAssessment)) 2359 return false; 2360 ArtifactAssessment o = (ArtifactAssessment) other_; 2361 return compareDeep(identifier, o.identifier, true) && compareDeep(title, o.title, true) && compareDeep(citeAs, o.citeAs, true) 2362 && compareDeep(date, o.date, true) && compareDeep(copyright, o.copyright, true) && compareDeep(approvalDate, o.approvalDate, true) 2363 && compareDeep(lastReviewDate, o.lastReviewDate, true) && compareDeep(artifact, o.artifact, true) 2364 && compareDeep(content, o.content, true) && compareDeep(workflowStatus, o.workflowStatus, true) 2365 && compareDeep(disposition, o.disposition, true); 2366 } 2367 2368 @Override 2369 public boolean equalsShallow(Base other_) { 2370 if (!super.equalsShallow(other_)) 2371 return false; 2372 if (!(other_ instanceof ArtifactAssessment)) 2373 return false; 2374 ArtifactAssessment o = (ArtifactAssessment) other_; 2375 return compareValues(title, o.title, true) && compareValues(date, o.date, true) && compareValues(copyright, o.copyright, true) 2376 && compareValues(approvalDate, o.approvalDate, true) && compareValues(lastReviewDate, o.lastReviewDate, true) 2377 && compareValues(workflowStatus, o.workflowStatus, true) && compareValues(disposition, o.disposition, true) 2378 ; 2379 } 2380 2381 public boolean isEmpty() { 2382 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, title, citeAs 2383 , date, copyright, approvalDate, lastReviewDate, artifact, content, workflowStatus 2384 , disposition); 2385 } 2386 2387 @Override 2388 public ResourceType getResourceType() { 2389 return ResourceType.ArtifactAssessment; 2390 } 2391 2392 /** 2393 * Search parameter: <b>date</b> 2394 * <p> 2395 * Description: <b>The artifact assessment publication date</b><br> 2396 * Type: <b>date</b><br> 2397 * Path: <b>ArtifactAssessment.date</b><br> 2398 * </p> 2399 */ 2400 @SearchParamDefinition(name="date", path="ArtifactAssessment.date", description="The artifact assessment publication date", type="date" ) 2401 public static final String SP_DATE = "date"; 2402 /** 2403 * <b>Fluent Client</b> search parameter constant for <b>date</b> 2404 * <p> 2405 * Description: <b>The artifact assessment publication date</b><br> 2406 * Type: <b>date</b><br> 2407 * Path: <b>ArtifactAssessment.date</b><br> 2408 * </p> 2409 */ 2410 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 2411 2412 /** 2413 * Search parameter: <b>identifier</b> 2414 * <p> 2415 * Description: <b>The artifact assessment identifier</b><br> 2416 * Type: <b>token</b><br> 2417 * Path: <b>ArtifactAssessment.identifier</b><br> 2418 * </p> 2419 */ 2420 @SearchParamDefinition(name="identifier", path="ArtifactAssessment.identifier", description="The artifact assessment identifier", type="token" ) 2421 public static final String SP_IDENTIFIER = "identifier"; 2422 /** 2423 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2424 * <p> 2425 * Description: <b>The artifact assessment identifier</b><br> 2426 * Type: <b>token</b><br> 2427 * Path: <b>ArtifactAssessment.identifier</b><br> 2428 * </p> 2429 */ 2430 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2431 2432 2433} 2434