
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 * The Citation Resource enables reference to any knowledge artifact for purposes of identification and attribution. The Citation Resource supports existing reference structures and developing publication practices such as versioning, expressing complex contributorship roles, and referencing computable resources. 052 */ 053@ResourceDef(name="Citation", profile="http://hl7.org/fhir/StructureDefinition/Citation") 054public class Citation extends MetadataResource { 055 056 public enum RelatedArtifactTypeExpanded { 057 /** 058 * Additional documentation for the knowledge resource. This would include additional instructions on usage as well as additional information on clinical context or appropriateness. 059 */ 060 DOCUMENTATION, 061 /** 062 * The target artifact is a summary of the justification for the knowledge resource including supporting evidence, relevant guidelines, or other clinically important information. This information is intended to provide a way to make the justification for the knowledge resource available to the consumer of interventions or results produced by the knowledge resource. 063 */ 064 JUSTIFICATION, 065 /** 066 * Bibliographic citation for papers, references, or other relevant material for the knowledge resource. This is intended to allow for citation of related material, but that was not necessarily specifically prepared in connection with this knowledge resource. 067 */ 068 CITATION, 069 /** 070 * The previous version of the knowledge artifact, used to establish an ordering of versions of an artifact, independent of the status of each version. 071 */ 072 PREDECESSOR, 073 /** 074 * The subsequent version of the knowledge artfact, used to establish an ordering of versions of an artifact, independent of the status of each version. 075 */ 076 SUCCESSOR, 077 /** 078 * This artifact is derived from the target artifact. This is intended to capture the relationship in which a particular knowledge resource is based on the content of another artifact, but is modified to capture either a different set of overall requirements, or a more specific set of requirements such as those involved in a particular institution or clinical setting. The artifact may be derived from one or more target artifacts. 079 */ 080 DERIVEDFROM, 081 /** 082 * This artifact depends on the target artifact. There is a requirement to use the target artifact in the creation or interpretation of this artifact. 083 */ 084 DEPENDSON, 085 /** 086 * This artifact is composed of the target artifact. This artifact is constructed with the target artifact as a component. The target artifact is a part of this artifact. (A dataset is composed of data.). 087 */ 088 COMPOSEDOF, 089 /** 090 * This artifact is a part of the target artifact. The target artifact is composed of this artifact (and possibly other artifacts). 091 */ 092 PARTOF, 093 /** 094 * This artifact amends or changes the target artifact. This artifact adds additional information that is functionally expected to replace information in the target artifact. This artifact replaces a part but not all of the target artifact. 095 */ 096 AMENDS, 097 /** 098 * This artifact is amended with or changed by the target artifact. There is information in this artifact that should be functionally replaced with information in the target artifact. 099 */ 100 AMENDEDWITH, 101 /** 102 * This artifact adds additional information to the target artifact. The additional information does not replace or change information in the target artifact. 103 */ 104 APPENDS, 105 /** 106 * This artifact has additional information in the target artifact. 107 */ 108 APPENDEDWITH, 109 /** 110 * This artifact cites the target artifact. This may be a bibliographic citation for papers, references, or other relevant material for the knowledge resource. This is intended to allow for citation of related material, but that was not necessarily specifically prepared in connection with this knowledge resource. 111 */ 112 CITES, 113 /** 114 * This artifact is cited by the target artifact. 115 */ 116 CITEDBY, 117 /** 118 * This artifact contains comments about the target artifact. 119 */ 120 COMMENTSON, 121 /** 122 * This artifact has comments about it in the target artifact. The type of comments may be expressed in the targetClassifier element such as reply, review, editorial, feedback, solicited, unsolicited, structured, unstructured. 123 */ 124 COMMENTIN, 125 /** 126 * This artifact is a container in which the target artifact is contained. A container is a data structure whose instances are collections of other objects. (A database contains the dataset.). 127 */ 128 CONTAINS, 129 /** 130 * This artifact is contained in the target artifact. The target artifact is a data structure whose instances are collections of other objects. 131 */ 132 CONTAINEDIN, 133 /** 134 * This artifact identifies errors and replacement content for the target artifact. 135 */ 136 CORRECTS, 137 /** 138 * This artifact has corrections to it in the target artifact. The target artifact identifies errors and replacement content for this artifact. 139 */ 140 CORRECTIONIN, 141 /** 142 * This artifact replaces or supersedes the target artifact. The target artifact may be considered deprecated. 143 */ 144 REPLACES, 145 /** 146 * This artifact is replaced with or superseded by the target artifact. This artifact may be considered deprecated. 147 */ 148 REPLACEDWITH, 149 /** 150 * This artifact retracts the target artifact. The content that was published in the target artifact should be considered removed from publication and should no longer be considered part of the public record. 151 */ 152 RETRACTS, 153 /** 154 * This artifact is retracted by the target artifact. The content that was published in this artifact should be considered removed from publication and should no longer be considered part of the public record. 155 */ 156 RETRACTEDBY, 157 /** 158 * This artifact is a signature of the target artifact. 159 */ 160 SIGNS, 161 /** 162 * This artifact has characteristics in common with the target artifact. This relationship may be used in systems to ?deduplicate? knowledge artifacts from different sources, or in systems to show ?similar items?. 163 */ 164 SIMILARTO, 165 /** 166 * This artifact provides additional support for the target artifact. The type of support is not documentation as it does not describe, explain, or instruct regarding the target artifact. 167 */ 168 SUPPORTS, 169 /** 170 * The target artifact contains additional information related to the knowledge artifact but is not documentation as the additional information does not describe, explain, or instruct regarding the knowledge artifact content or application. This could include an associated dataset. 171 */ 172 SUPPORTEDWITH, 173 /** 174 * This artifact was generated by transforming the target artifact (e.g., format or language conversion). This is intended to capture the relationship in which a particular knowledge resource is based on the content of another artifact, but changes are only apparent in form and there is only one target artifact with the ?transforms? relationship type. 175 */ 176 TRANSFORMS, 177 /** 178 * This artifact was transformed into the target artifact (e.g., by format or language conversion). 179 */ 180 TRANSFORMEDINTO, 181 /** 182 * This artifact was generated by transforming a related artifact (e.g., format or language conversion), noted separately with the ?transforms? relationship type. This transformation used the target artifact to inform the transformation. The target artifact may be a conversion script or translation guide. 183 */ 184 TRANSFORMEDWITH, 185 /** 186 * This artifact provides additional documentation for the target artifact. This could include additional instructions on usage as well as additional information on clinical context or appropriateness. 187 */ 188 DOCUMENTS, 189 /** 190 * The target artifact is a precise description of a concept in this artifact. This may be used when the RelatedArtifact datatype is used in elements contained in this artifact. 191 */ 192 SPECIFICATIONOF, 193 /** 194 * This artifact was created with the target artifact. The target artifact is a tool or support material used in the creation of the artifact, and not content that the artifact was derived from. 195 */ 196 CREATEDWITH, 197 /** 198 * The related artifact is the citation for this artifact. 199 */ 200 CITEAS, 201 /** 202 * A copy of the artifact in a publication with a different artifact identifier. 203 */ 204 REPRINT, 205 /** 206 * The original version of record for which the current artifact is a copy. 207 */ 208 REPRINTOF, 209 /** 210 * added to help the parsers with the generic types 211 */ 212 NULL; 213 public static RelatedArtifactTypeExpanded fromCode(String codeString) throws FHIRException { 214 if (codeString == null || "".equals(codeString)) 215 return null; 216 if ("documentation".equals(codeString)) 217 return DOCUMENTATION; 218 if ("justification".equals(codeString)) 219 return JUSTIFICATION; 220 if ("citation".equals(codeString)) 221 return CITATION; 222 if ("predecessor".equals(codeString)) 223 return PREDECESSOR; 224 if ("successor".equals(codeString)) 225 return SUCCESSOR; 226 if ("derived-from".equals(codeString)) 227 return DERIVEDFROM; 228 if ("depends-on".equals(codeString)) 229 return DEPENDSON; 230 if ("composed-of".equals(codeString)) 231 return COMPOSEDOF; 232 if ("part-of".equals(codeString)) 233 return PARTOF; 234 if ("amends".equals(codeString)) 235 return AMENDS; 236 if ("amended-with".equals(codeString)) 237 return AMENDEDWITH; 238 if ("appends".equals(codeString)) 239 return APPENDS; 240 if ("appended-with".equals(codeString)) 241 return APPENDEDWITH; 242 if ("cites".equals(codeString)) 243 return CITES; 244 if ("cited-by".equals(codeString)) 245 return CITEDBY; 246 if ("comments-on".equals(codeString)) 247 return COMMENTSON; 248 if ("comment-in".equals(codeString)) 249 return COMMENTIN; 250 if ("contains".equals(codeString)) 251 return CONTAINS; 252 if ("contained-in".equals(codeString)) 253 return CONTAINEDIN; 254 if ("corrects".equals(codeString)) 255 return CORRECTS; 256 if ("correction-in".equals(codeString)) 257 return CORRECTIONIN; 258 if ("replaces".equals(codeString)) 259 return REPLACES; 260 if ("replaced-with".equals(codeString)) 261 return REPLACEDWITH; 262 if ("retracts".equals(codeString)) 263 return RETRACTS; 264 if ("retracted-by".equals(codeString)) 265 return RETRACTEDBY; 266 if ("signs".equals(codeString)) 267 return SIGNS; 268 if ("similar-to".equals(codeString)) 269 return SIMILARTO; 270 if ("supports".equals(codeString)) 271 return SUPPORTS; 272 if ("supported-with".equals(codeString)) 273 return SUPPORTEDWITH; 274 if ("transforms".equals(codeString)) 275 return TRANSFORMS; 276 if ("transformed-into".equals(codeString)) 277 return TRANSFORMEDINTO; 278 if ("transformed-with".equals(codeString)) 279 return TRANSFORMEDWITH; 280 if ("documents".equals(codeString)) 281 return DOCUMENTS; 282 if ("specification-of".equals(codeString)) 283 return SPECIFICATIONOF; 284 if ("created-with".equals(codeString)) 285 return CREATEDWITH; 286 if ("cite-as".equals(codeString)) 287 return CITEAS; 288 if ("reprint".equals(codeString)) 289 return REPRINT; 290 if ("reprint-of".equals(codeString)) 291 return REPRINTOF; 292 if (Configuration.isAcceptInvalidEnums()) 293 return null; 294 else 295 throw new FHIRException("Unknown RelatedArtifactTypeExpanded code '"+codeString+"'"); 296 } 297 public String toCode() { 298 switch (this) { 299 case DOCUMENTATION: return "documentation"; 300 case JUSTIFICATION: return "justification"; 301 case CITATION: return "citation"; 302 case PREDECESSOR: return "predecessor"; 303 case SUCCESSOR: return "successor"; 304 case DERIVEDFROM: return "derived-from"; 305 case DEPENDSON: return "depends-on"; 306 case COMPOSEDOF: return "composed-of"; 307 case PARTOF: return "part-of"; 308 case AMENDS: return "amends"; 309 case AMENDEDWITH: return "amended-with"; 310 case APPENDS: return "appends"; 311 case APPENDEDWITH: return "appended-with"; 312 case CITES: return "cites"; 313 case CITEDBY: return "cited-by"; 314 case COMMENTSON: return "comments-on"; 315 case COMMENTIN: return "comment-in"; 316 case CONTAINS: return "contains"; 317 case CONTAINEDIN: return "contained-in"; 318 case CORRECTS: return "corrects"; 319 case CORRECTIONIN: return "correction-in"; 320 case REPLACES: return "replaces"; 321 case REPLACEDWITH: return "replaced-with"; 322 case RETRACTS: return "retracts"; 323 case RETRACTEDBY: return "retracted-by"; 324 case SIGNS: return "signs"; 325 case SIMILARTO: return "similar-to"; 326 case SUPPORTS: return "supports"; 327 case SUPPORTEDWITH: return "supported-with"; 328 case TRANSFORMS: return "transforms"; 329 case TRANSFORMEDINTO: return "transformed-into"; 330 case TRANSFORMEDWITH: return "transformed-with"; 331 case DOCUMENTS: return "documents"; 332 case SPECIFICATIONOF: return "specification-of"; 333 case CREATEDWITH: return "created-with"; 334 case CITEAS: return "cite-as"; 335 case REPRINT: return "reprint"; 336 case REPRINTOF: return "reprint-of"; 337 case NULL: return null; 338 default: return "?"; 339 } 340 } 341 public String getSystem() { 342 switch (this) { 343 case DOCUMENTATION: return "http://hl7.org/fhir/related-artifact-type"; 344 case JUSTIFICATION: return "http://hl7.org/fhir/related-artifact-type"; 345 case CITATION: return "http://hl7.org/fhir/related-artifact-type"; 346 case PREDECESSOR: return "http://hl7.org/fhir/related-artifact-type"; 347 case SUCCESSOR: return "http://hl7.org/fhir/related-artifact-type"; 348 case DERIVEDFROM: return "http://hl7.org/fhir/related-artifact-type"; 349 case DEPENDSON: return "http://hl7.org/fhir/related-artifact-type"; 350 case COMPOSEDOF: return "http://hl7.org/fhir/related-artifact-type"; 351 case PARTOF: return "http://hl7.org/fhir/related-artifact-type"; 352 case AMENDS: return "http://hl7.org/fhir/related-artifact-type"; 353 case AMENDEDWITH: return "http://hl7.org/fhir/related-artifact-type"; 354 case APPENDS: return "http://hl7.org/fhir/related-artifact-type"; 355 case APPENDEDWITH: return "http://hl7.org/fhir/related-artifact-type"; 356 case CITES: return "http://hl7.org/fhir/related-artifact-type"; 357 case CITEDBY: return "http://hl7.org/fhir/related-artifact-type"; 358 case COMMENTSON: return "http://hl7.org/fhir/related-artifact-type"; 359 case COMMENTIN: return "http://hl7.org/fhir/related-artifact-type"; 360 case CONTAINS: return "http://hl7.org/fhir/related-artifact-type"; 361 case CONTAINEDIN: return "http://hl7.org/fhir/related-artifact-type"; 362 case CORRECTS: return "http://hl7.org/fhir/related-artifact-type"; 363 case CORRECTIONIN: return "http://hl7.org/fhir/related-artifact-type"; 364 case REPLACES: return "http://hl7.org/fhir/related-artifact-type"; 365 case REPLACEDWITH: return "http://hl7.org/fhir/related-artifact-type"; 366 case RETRACTS: return "http://hl7.org/fhir/related-artifact-type"; 367 case RETRACTEDBY: return "http://hl7.org/fhir/related-artifact-type"; 368 case SIGNS: return "http://hl7.org/fhir/related-artifact-type"; 369 case SIMILARTO: return "http://hl7.org/fhir/related-artifact-type"; 370 case SUPPORTS: return "http://hl7.org/fhir/related-artifact-type"; 371 case SUPPORTEDWITH: return "http://hl7.org/fhir/related-artifact-type"; 372 case TRANSFORMS: return "http://hl7.org/fhir/related-artifact-type"; 373 case TRANSFORMEDINTO: return "http://hl7.org/fhir/related-artifact-type"; 374 case TRANSFORMEDWITH: return "http://hl7.org/fhir/related-artifact-type"; 375 case DOCUMENTS: return "http://hl7.org/fhir/related-artifact-type"; 376 case SPECIFICATIONOF: return "http://hl7.org/fhir/related-artifact-type"; 377 case CREATEDWITH: return "http://hl7.org/fhir/related-artifact-type"; 378 case CITEAS: return "http://hl7.org/fhir/related-artifact-type"; 379 case REPRINT: return "http://hl7.org/fhir/related-artifact-type-expanded"; 380 case REPRINTOF: return "http://hl7.org/fhir/related-artifact-type-expanded"; 381 case NULL: return null; 382 default: return "?"; 383 } 384 } 385 public String getDefinition() { 386 switch (this) { 387 case DOCUMENTATION: return "Additional documentation for the knowledge resource. This would include additional instructions on usage as well as additional information on clinical context or appropriateness."; 388 case JUSTIFICATION: return "The target artifact is a summary of the justification for the knowledge resource including supporting evidence, relevant guidelines, or other clinically important information. This information is intended to provide a way to make the justification for the knowledge resource available to the consumer of interventions or results produced by the knowledge resource."; 389 case CITATION: return "Bibliographic citation for papers, references, or other relevant material for the knowledge resource. This is intended to allow for citation of related material, but that was not necessarily specifically prepared in connection with this knowledge resource."; 390 case PREDECESSOR: return "The previous version of the knowledge artifact, used to establish an ordering of versions of an artifact, independent of the status of each version."; 391 case SUCCESSOR: return "The subsequent version of the knowledge artfact, used to establish an ordering of versions of an artifact, independent of the status of each version."; 392 case DERIVEDFROM: return "This artifact is derived from the target artifact. This is intended to capture the relationship in which a particular knowledge resource is based on the content of another artifact, but is modified to capture either a different set of overall requirements, or a more specific set of requirements such as those involved in a particular institution or clinical setting. The artifact may be derived from one or more target artifacts."; 393 case DEPENDSON: return "This artifact depends on the target artifact. There is a requirement to use the target artifact in the creation or interpretation of this artifact."; 394 case COMPOSEDOF: return "This artifact is composed of the target artifact. This artifact is constructed with the target artifact as a component. The target artifact is a part of this artifact. (A dataset is composed of data.)."; 395 case PARTOF: return "This artifact is a part of the target artifact. The target artifact is composed of this artifact (and possibly other artifacts)."; 396 case AMENDS: return "This artifact amends or changes the target artifact. This artifact adds additional information that is functionally expected to replace information in the target artifact. This artifact replaces a part but not all of the target artifact."; 397 case AMENDEDWITH: return "This artifact is amended with or changed by the target artifact. There is information in this artifact that should be functionally replaced with information in the target artifact."; 398 case APPENDS: return "This artifact adds additional information to the target artifact. The additional information does not replace or change information in the target artifact."; 399 case APPENDEDWITH: return "This artifact has additional information in the target artifact."; 400 case CITES: return "This artifact cites the target artifact. This may be a bibliographic citation for papers, references, or other relevant material for the knowledge resource. This is intended to allow for citation of related material, but that was not necessarily specifically prepared in connection with this knowledge resource."; 401 case CITEDBY: return "This artifact is cited by the target artifact."; 402 case COMMENTSON: return "This artifact contains comments about the target artifact."; 403 case COMMENTIN: return "This artifact has comments about it in the target artifact. The type of comments may be expressed in the targetClassifier element such as reply, review, editorial, feedback, solicited, unsolicited, structured, unstructured."; 404 case CONTAINS: return "This artifact is a container in which the target artifact is contained. A container is a data structure whose instances are collections of other objects. (A database contains the dataset.)."; 405 case CONTAINEDIN: return "This artifact is contained in the target artifact. The target artifact is a data structure whose instances are collections of other objects."; 406 case CORRECTS: return "This artifact identifies errors and replacement content for the target artifact."; 407 case CORRECTIONIN: return "This artifact has corrections to it in the target artifact. The target artifact identifies errors and replacement content for this artifact."; 408 case REPLACES: return "This artifact replaces or supersedes the target artifact. The target artifact may be considered deprecated."; 409 case REPLACEDWITH: return "This artifact is replaced with or superseded by the target artifact. This artifact may be considered deprecated."; 410 case RETRACTS: return "This artifact retracts the target artifact. The content that was published in the target artifact should be considered removed from publication and should no longer be considered part of the public record."; 411 case RETRACTEDBY: return "This artifact is retracted by the target artifact. The content that was published in this artifact should be considered removed from publication and should no longer be considered part of the public record."; 412 case SIGNS: return "This artifact is a signature of the target artifact."; 413 case SIMILARTO: return "This artifact has characteristics in common with the target artifact. This relationship may be used in systems to ?deduplicate? knowledge artifacts from different sources, or in systems to show ?similar items?."; 414 case SUPPORTS: return "This artifact provides additional support for the target artifact. The type of support is not documentation as it does not describe, explain, or instruct regarding the target artifact."; 415 case SUPPORTEDWITH: return "The target artifact contains additional information related to the knowledge artifact but is not documentation as the additional information does not describe, explain, or instruct regarding the knowledge artifact content or application. This could include an associated dataset."; 416 case TRANSFORMS: return "This artifact was generated by transforming the target artifact (e.g., format or language conversion). This is intended to capture the relationship in which a particular knowledge resource is based on the content of another artifact, but changes are only apparent in form and there is only one target artifact with the ?transforms? relationship type."; 417 case TRANSFORMEDINTO: return "This artifact was transformed into the target artifact (e.g., by format or language conversion)."; 418 case TRANSFORMEDWITH: return "This artifact was generated by transforming a related artifact (e.g., format or language conversion), noted separately with the ?transforms? relationship type. This transformation used the target artifact to inform the transformation. The target artifact may be a conversion script or translation guide."; 419 case DOCUMENTS: return "This artifact provides additional documentation for the target artifact. This could include additional instructions on usage as well as additional information on clinical context or appropriateness."; 420 case SPECIFICATIONOF: return "The target artifact is a precise description of a concept in this artifact. This may be used when the RelatedArtifact datatype is used in elements contained in this artifact."; 421 case CREATEDWITH: return "This artifact was created with the target artifact. The target artifact is a tool or support material used in the creation of the artifact, and not content that the artifact was derived from."; 422 case CITEAS: return "The related artifact is the citation for this artifact."; 423 case REPRINT: return "A copy of the artifact in a publication with a different artifact identifier."; 424 case REPRINTOF: return "The original version of record for which the current artifact is a copy."; 425 case NULL: return null; 426 default: return "?"; 427 } 428 } 429 public String getDisplay() { 430 switch (this) { 431 case DOCUMENTATION: return "Documentation"; 432 case JUSTIFICATION: return "Justification"; 433 case CITATION: return "Citation"; 434 case PREDECESSOR: return "Predecessor"; 435 case SUCCESSOR: return "Successor"; 436 case DERIVEDFROM: return "Derived From"; 437 case DEPENDSON: return "Depends On"; 438 case COMPOSEDOF: return "Composed Of"; 439 case PARTOF: return "Part Of"; 440 case AMENDS: return "Amends"; 441 case AMENDEDWITH: return "Amended With"; 442 case APPENDS: return "Appends"; 443 case APPENDEDWITH: return "Appended With"; 444 case CITES: return "Cites"; 445 case CITEDBY: return "Cited By"; 446 case COMMENTSON: return "Is Comment On"; 447 case COMMENTIN: return "Has Comment In"; 448 case CONTAINS: return "Contains"; 449 case CONTAINEDIN: return "Contained In"; 450 case CORRECTS: return "Corrects"; 451 case CORRECTIONIN: return "Correction In"; 452 case REPLACES: return "Replaces"; 453 case REPLACEDWITH: return "Replaced With"; 454 case RETRACTS: return "Retracts"; 455 case RETRACTEDBY: return "Retracted By"; 456 case SIGNS: return "Signs"; 457 case SIMILARTO: return "Similar To"; 458 case SUPPORTS: return "Supports"; 459 case SUPPORTEDWITH: return "Supported With"; 460 case TRANSFORMS: return "Transforms"; 461 case TRANSFORMEDINTO: return "Transformed Into"; 462 case TRANSFORMEDWITH: return "Transformed With"; 463 case DOCUMENTS: return "Documents"; 464 case SPECIFICATIONOF: return "Specification Of"; 465 case CREATEDWITH: return "Created With"; 466 case CITEAS: return "Cite As"; 467 case REPRINT: return "Reprint"; 468 case REPRINTOF: return "Reprint Of"; 469 case NULL: return null; 470 default: return "?"; 471 } 472 } 473 } 474 475 public static class RelatedArtifactTypeExpandedEnumFactory implements EnumFactory<RelatedArtifactTypeExpanded> { 476 public RelatedArtifactTypeExpanded fromCode(String codeString) throws IllegalArgumentException { 477 if (codeString == null || "".equals(codeString)) 478 if (codeString == null || "".equals(codeString)) 479 return null; 480 if ("documentation".equals(codeString)) 481 return RelatedArtifactTypeExpanded.DOCUMENTATION; 482 if ("justification".equals(codeString)) 483 return RelatedArtifactTypeExpanded.JUSTIFICATION; 484 if ("citation".equals(codeString)) 485 return RelatedArtifactTypeExpanded.CITATION; 486 if ("predecessor".equals(codeString)) 487 return RelatedArtifactTypeExpanded.PREDECESSOR; 488 if ("successor".equals(codeString)) 489 return RelatedArtifactTypeExpanded.SUCCESSOR; 490 if ("derived-from".equals(codeString)) 491 return RelatedArtifactTypeExpanded.DERIVEDFROM; 492 if ("depends-on".equals(codeString)) 493 return RelatedArtifactTypeExpanded.DEPENDSON; 494 if ("composed-of".equals(codeString)) 495 return RelatedArtifactTypeExpanded.COMPOSEDOF; 496 if ("part-of".equals(codeString)) 497 return RelatedArtifactTypeExpanded.PARTOF; 498 if ("amends".equals(codeString)) 499 return RelatedArtifactTypeExpanded.AMENDS; 500 if ("amended-with".equals(codeString)) 501 return RelatedArtifactTypeExpanded.AMENDEDWITH; 502 if ("appends".equals(codeString)) 503 return RelatedArtifactTypeExpanded.APPENDS; 504 if ("appended-with".equals(codeString)) 505 return RelatedArtifactTypeExpanded.APPENDEDWITH; 506 if ("cites".equals(codeString)) 507 return RelatedArtifactTypeExpanded.CITES; 508 if ("cited-by".equals(codeString)) 509 return RelatedArtifactTypeExpanded.CITEDBY; 510 if ("comments-on".equals(codeString)) 511 return RelatedArtifactTypeExpanded.COMMENTSON; 512 if ("comment-in".equals(codeString)) 513 return RelatedArtifactTypeExpanded.COMMENTIN; 514 if ("contains".equals(codeString)) 515 return RelatedArtifactTypeExpanded.CONTAINS; 516 if ("contained-in".equals(codeString)) 517 return RelatedArtifactTypeExpanded.CONTAINEDIN; 518 if ("corrects".equals(codeString)) 519 return RelatedArtifactTypeExpanded.CORRECTS; 520 if ("correction-in".equals(codeString)) 521 return RelatedArtifactTypeExpanded.CORRECTIONIN; 522 if ("replaces".equals(codeString)) 523 return RelatedArtifactTypeExpanded.REPLACES; 524 if ("replaced-with".equals(codeString)) 525 return RelatedArtifactTypeExpanded.REPLACEDWITH; 526 if ("retracts".equals(codeString)) 527 return RelatedArtifactTypeExpanded.RETRACTS; 528 if ("retracted-by".equals(codeString)) 529 return RelatedArtifactTypeExpanded.RETRACTEDBY; 530 if ("signs".equals(codeString)) 531 return RelatedArtifactTypeExpanded.SIGNS; 532 if ("similar-to".equals(codeString)) 533 return RelatedArtifactTypeExpanded.SIMILARTO; 534 if ("supports".equals(codeString)) 535 return RelatedArtifactTypeExpanded.SUPPORTS; 536 if ("supported-with".equals(codeString)) 537 return RelatedArtifactTypeExpanded.SUPPORTEDWITH; 538 if ("transforms".equals(codeString)) 539 return RelatedArtifactTypeExpanded.TRANSFORMS; 540 if ("transformed-into".equals(codeString)) 541 return RelatedArtifactTypeExpanded.TRANSFORMEDINTO; 542 if ("transformed-with".equals(codeString)) 543 return RelatedArtifactTypeExpanded.TRANSFORMEDWITH; 544 if ("documents".equals(codeString)) 545 return RelatedArtifactTypeExpanded.DOCUMENTS; 546 if ("specification-of".equals(codeString)) 547 return RelatedArtifactTypeExpanded.SPECIFICATIONOF; 548 if ("created-with".equals(codeString)) 549 return RelatedArtifactTypeExpanded.CREATEDWITH; 550 if ("cite-as".equals(codeString)) 551 return RelatedArtifactTypeExpanded.CITEAS; 552 if ("reprint".equals(codeString)) 553 return RelatedArtifactTypeExpanded.REPRINT; 554 if ("reprint-of".equals(codeString)) 555 return RelatedArtifactTypeExpanded.REPRINTOF; 556 throw new IllegalArgumentException("Unknown RelatedArtifactTypeExpanded code '"+codeString+"'"); 557 } 558 public Enumeration<RelatedArtifactTypeExpanded> fromType(PrimitiveType<?> code) throws FHIRException { 559 if (code == null) 560 return null; 561 if (code.isEmpty()) 562 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.NULL, code); 563 String codeString = ((PrimitiveType) code).asStringValue(); 564 if (codeString == null || "".equals(codeString)) 565 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.NULL, code); 566 if ("documentation".equals(codeString)) 567 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.DOCUMENTATION, code); 568 if ("justification".equals(codeString)) 569 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.JUSTIFICATION, code); 570 if ("citation".equals(codeString)) 571 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.CITATION, code); 572 if ("predecessor".equals(codeString)) 573 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.PREDECESSOR, code); 574 if ("successor".equals(codeString)) 575 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.SUCCESSOR, code); 576 if ("derived-from".equals(codeString)) 577 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.DERIVEDFROM, code); 578 if ("depends-on".equals(codeString)) 579 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.DEPENDSON, code); 580 if ("composed-of".equals(codeString)) 581 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.COMPOSEDOF, code); 582 if ("part-of".equals(codeString)) 583 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.PARTOF, code); 584 if ("amends".equals(codeString)) 585 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.AMENDS, code); 586 if ("amended-with".equals(codeString)) 587 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.AMENDEDWITH, code); 588 if ("appends".equals(codeString)) 589 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.APPENDS, code); 590 if ("appended-with".equals(codeString)) 591 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.APPENDEDWITH, code); 592 if ("cites".equals(codeString)) 593 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.CITES, code); 594 if ("cited-by".equals(codeString)) 595 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.CITEDBY, code); 596 if ("comments-on".equals(codeString)) 597 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.COMMENTSON, code); 598 if ("comment-in".equals(codeString)) 599 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.COMMENTIN, code); 600 if ("contains".equals(codeString)) 601 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.CONTAINS, code); 602 if ("contained-in".equals(codeString)) 603 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.CONTAINEDIN, code); 604 if ("corrects".equals(codeString)) 605 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.CORRECTS, code); 606 if ("correction-in".equals(codeString)) 607 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.CORRECTIONIN, code); 608 if ("replaces".equals(codeString)) 609 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.REPLACES, code); 610 if ("replaced-with".equals(codeString)) 611 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.REPLACEDWITH, code); 612 if ("retracts".equals(codeString)) 613 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.RETRACTS, code); 614 if ("retracted-by".equals(codeString)) 615 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.RETRACTEDBY, code); 616 if ("signs".equals(codeString)) 617 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.SIGNS, code); 618 if ("similar-to".equals(codeString)) 619 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.SIMILARTO, code); 620 if ("supports".equals(codeString)) 621 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.SUPPORTS, code); 622 if ("supported-with".equals(codeString)) 623 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.SUPPORTEDWITH, code); 624 if ("transforms".equals(codeString)) 625 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.TRANSFORMS, code); 626 if ("transformed-into".equals(codeString)) 627 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.TRANSFORMEDINTO, code); 628 if ("transformed-with".equals(codeString)) 629 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.TRANSFORMEDWITH, code); 630 if ("documents".equals(codeString)) 631 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.DOCUMENTS, code); 632 if ("specification-of".equals(codeString)) 633 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.SPECIFICATIONOF, code); 634 if ("created-with".equals(codeString)) 635 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.CREATEDWITH, code); 636 if ("cite-as".equals(codeString)) 637 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.CITEAS, code); 638 if ("reprint".equals(codeString)) 639 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.REPRINT, code); 640 if ("reprint-of".equals(codeString)) 641 return new Enumeration<RelatedArtifactTypeExpanded>(this, RelatedArtifactTypeExpanded.REPRINTOF, code); 642 throw new FHIRException("Unknown RelatedArtifactTypeExpanded code '"+codeString+"'"); 643 } 644 public String toCode(RelatedArtifactTypeExpanded code) { 645 if (code == RelatedArtifactTypeExpanded.DOCUMENTATION) 646 return "documentation"; 647 if (code == RelatedArtifactTypeExpanded.JUSTIFICATION) 648 return "justification"; 649 if (code == RelatedArtifactTypeExpanded.CITATION) 650 return "citation"; 651 if (code == RelatedArtifactTypeExpanded.PREDECESSOR) 652 return "predecessor"; 653 if (code == RelatedArtifactTypeExpanded.SUCCESSOR) 654 return "successor"; 655 if (code == RelatedArtifactTypeExpanded.DERIVEDFROM) 656 return "derived-from"; 657 if (code == RelatedArtifactTypeExpanded.DEPENDSON) 658 return "depends-on"; 659 if (code == RelatedArtifactTypeExpanded.COMPOSEDOF) 660 return "composed-of"; 661 if (code == RelatedArtifactTypeExpanded.PARTOF) 662 return "part-of"; 663 if (code == RelatedArtifactTypeExpanded.AMENDS) 664 return "amends"; 665 if (code == RelatedArtifactTypeExpanded.AMENDEDWITH) 666 return "amended-with"; 667 if (code == RelatedArtifactTypeExpanded.APPENDS) 668 return "appends"; 669 if (code == RelatedArtifactTypeExpanded.APPENDEDWITH) 670 return "appended-with"; 671 if (code == RelatedArtifactTypeExpanded.CITES) 672 return "cites"; 673 if (code == RelatedArtifactTypeExpanded.CITEDBY) 674 return "cited-by"; 675 if (code == RelatedArtifactTypeExpanded.COMMENTSON) 676 return "comments-on"; 677 if (code == RelatedArtifactTypeExpanded.COMMENTIN) 678 return "comment-in"; 679 if (code == RelatedArtifactTypeExpanded.CONTAINS) 680 return "contains"; 681 if (code == RelatedArtifactTypeExpanded.CONTAINEDIN) 682 return "contained-in"; 683 if (code == RelatedArtifactTypeExpanded.CORRECTS) 684 return "corrects"; 685 if (code == RelatedArtifactTypeExpanded.CORRECTIONIN) 686 return "correction-in"; 687 if (code == RelatedArtifactTypeExpanded.REPLACES) 688 return "replaces"; 689 if (code == RelatedArtifactTypeExpanded.REPLACEDWITH) 690 return "replaced-with"; 691 if (code == RelatedArtifactTypeExpanded.RETRACTS) 692 return "retracts"; 693 if (code == RelatedArtifactTypeExpanded.RETRACTEDBY) 694 return "retracted-by"; 695 if (code == RelatedArtifactTypeExpanded.SIGNS) 696 return "signs"; 697 if (code == RelatedArtifactTypeExpanded.SIMILARTO) 698 return "similar-to"; 699 if (code == RelatedArtifactTypeExpanded.SUPPORTS) 700 return "supports"; 701 if (code == RelatedArtifactTypeExpanded.SUPPORTEDWITH) 702 return "supported-with"; 703 if (code == RelatedArtifactTypeExpanded.TRANSFORMS) 704 return "transforms"; 705 if (code == RelatedArtifactTypeExpanded.TRANSFORMEDINTO) 706 return "transformed-into"; 707 if (code == RelatedArtifactTypeExpanded.TRANSFORMEDWITH) 708 return "transformed-with"; 709 if (code == RelatedArtifactTypeExpanded.DOCUMENTS) 710 return "documents"; 711 if (code == RelatedArtifactTypeExpanded.SPECIFICATIONOF) 712 return "specification-of"; 713 if (code == RelatedArtifactTypeExpanded.CREATEDWITH) 714 return "created-with"; 715 if (code == RelatedArtifactTypeExpanded.CITEAS) 716 return "cite-as"; 717 if (code == RelatedArtifactTypeExpanded.REPRINT) 718 return "reprint"; 719 if (code == RelatedArtifactTypeExpanded.REPRINTOF) 720 return "reprint-of"; 721 return "?"; 722 } 723 public String toSystem(RelatedArtifactTypeExpanded code) { 724 return code.getSystem(); 725 } 726 } 727 728 @Block() 729 public static class CitationSummaryComponent extends BackboneElement implements IBaseBackboneElement { 730 /** 731 * Format for display of the citation summary. 732 */ 733 @Child(name = "style", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 734 @Description(shortDefinition="Format for display of the citation summary", formalDefinition="Format for display of the citation summary." ) 735 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/citation-summary-style") 736 protected CodeableConcept style; 737 738 /** 739 * The human-readable display of the citation summary. 740 */ 741 @Child(name = "text", type = {MarkdownType.class}, order=2, min=1, max=1, modifier=false, summary=true) 742 @Description(shortDefinition="The human-readable display of the citation summary", formalDefinition="The human-readable display of the citation summary." ) 743 protected MarkdownType text; 744 745 private static final long serialVersionUID = 123416446L; 746 747 /** 748 * Constructor 749 */ 750 public CitationSummaryComponent() { 751 super(); 752 } 753 754 /** 755 * Constructor 756 */ 757 public CitationSummaryComponent(String text) { 758 super(); 759 this.setText(text); 760 } 761 762 /** 763 * @return {@link #style} (Format for display of the citation summary.) 764 */ 765 public CodeableConcept getStyle() { 766 if (this.style == null) 767 if (Configuration.errorOnAutoCreate()) 768 throw new Error("Attempt to auto-create CitationSummaryComponent.style"); 769 else if (Configuration.doAutoCreate()) 770 this.style = new CodeableConcept(); // cc 771 return this.style; 772 } 773 774 public boolean hasStyle() { 775 return this.style != null && !this.style.isEmpty(); 776 } 777 778 /** 779 * @param value {@link #style} (Format for display of the citation summary.) 780 */ 781 public CitationSummaryComponent setStyle(CodeableConcept value) { 782 this.style = value; 783 return this; 784 } 785 786 /** 787 * @return {@link #text} (The human-readable display of the citation summary.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 788 */ 789 public MarkdownType getTextElement() { 790 if (this.text == null) 791 if (Configuration.errorOnAutoCreate()) 792 throw new Error("Attempt to auto-create CitationSummaryComponent.text"); 793 else if (Configuration.doAutoCreate()) 794 this.text = new MarkdownType(); // bb 795 return this.text; 796 } 797 798 public boolean hasTextElement() { 799 return this.text != null && !this.text.isEmpty(); 800 } 801 802 public boolean hasText() { 803 return this.text != null && !this.text.isEmpty(); 804 } 805 806 /** 807 * @param value {@link #text} (The human-readable display of the citation summary.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 808 */ 809 public CitationSummaryComponent setTextElement(MarkdownType value) { 810 this.text = value; 811 return this; 812 } 813 814 /** 815 * @return The human-readable display of the citation summary. 816 */ 817 public String getText() { 818 return this.text == null ? null : this.text.getValue(); 819 } 820 821 /** 822 * @param value The human-readable display of the citation summary. 823 */ 824 public CitationSummaryComponent setText(String value) { 825 if (this.text == null) 826 this.text = new MarkdownType(); 827 this.text.setValue(value); 828 return this; 829 } 830 831 protected void listChildren(List<Property> children) { 832 super.listChildren(children); 833 children.add(new Property("style", "CodeableConcept", "Format for display of the citation summary.", 0, 1, style)); 834 children.add(new Property("text", "markdown", "The human-readable display of the citation summary.", 0, 1, text)); 835 } 836 837 @Override 838 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 839 switch (_hash) { 840 case 109780401: /*style*/ return new Property("style", "CodeableConcept", "Format for display of the citation summary.", 0, 1, style); 841 case 3556653: /*text*/ return new Property("text", "markdown", "The human-readable display of the citation summary.", 0, 1, text); 842 default: return super.getNamedProperty(_hash, _name, _checkValid); 843 } 844 845 } 846 847 @Override 848 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 849 switch (hash) { 850 case 109780401: /*style*/ return this.style == null ? new Base[0] : new Base[] {this.style}; // CodeableConcept 851 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // MarkdownType 852 default: return super.getProperty(hash, name, checkValid); 853 } 854 855 } 856 857 @Override 858 public Base setProperty(int hash, String name, Base value) throws FHIRException { 859 switch (hash) { 860 case 109780401: // style 861 this.style = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 862 return value; 863 case 3556653: // text 864 this.text = TypeConvertor.castToMarkdown(value); // MarkdownType 865 return value; 866 default: return super.setProperty(hash, name, value); 867 } 868 869 } 870 871 @Override 872 public Base setProperty(String name, Base value) throws FHIRException { 873 if (name.equals("style")) { 874 this.style = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 875 } else if (name.equals("text")) { 876 this.text = TypeConvertor.castToMarkdown(value); // MarkdownType 877 } else 878 return super.setProperty(name, value); 879 return value; 880 } 881 882 @Override 883 public Base makeProperty(int hash, String name) throws FHIRException { 884 switch (hash) { 885 case 109780401: return getStyle(); 886 case 3556653: return getTextElement(); 887 default: return super.makeProperty(hash, name); 888 } 889 890 } 891 892 @Override 893 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 894 switch (hash) { 895 case 109780401: /*style*/ return new String[] {"CodeableConcept"}; 896 case 3556653: /*text*/ return new String[] {"markdown"}; 897 default: return super.getTypesForProperty(hash, name); 898 } 899 900 } 901 902 @Override 903 public Base addChild(String name) throws FHIRException { 904 if (name.equals("style")) { 905 this.style = new CodeableConcept(); 906 return this.style; 907 } 908 else if (name.equals("text")) { 909 throw new FHIRException("Cannot call addChild on a singleton property Citation.summary.text"); 910 } 911 else 912 return super.addChild(name); 913 } 914 915 public CitationSummaryComponent copy() { 916 CitationSummaryComponent dst = new CitationSummaryComponent(); 917 copyValues(dst); 918 return dst; 919 } 920 921 public void copyValues(CitationSummaryComponent dst) { 922 super.copyValues(dst); 923 dst.style = style == null ? null : style.copy(); 924 dst.text = text == null ? null : text.copy(); 925 } 926 927 @Override 928 public boolean equalsDeep(Base other_) { 929 if (!super.equalsDeep(other_)) 930 return false; 931 if (!(other_ instanceof CitationSummaryComponent)) 932 return false; 933 CitationSummaryComponent o = (CitationSummaryComponent) other_; 934 return compareDeep(style, o.style, true) && compareDeep(text, o.text, true); 935 } 936 937 @Override 938 public boolean equalsShallow(Base other_) { 939 if (!super.equalsShallow(other_)) 940 return false; 941 if (!(other_ instanceof CitationSummaryComponent)) 942 return false; 943 CitationSummaryComponent o = (CitationSummaryComponent) other_; 944 return compareValues(text, o.text, true); 945 } 946 947 public boolean isEmpty() { 948 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(style, text); 949 } 950 951 public String fhirType() { 952 return "Citation.summary"; 953 954 } 955 956 } 957 958 @Block() 959 public static class CitationClassificationComponent extends BackboneElement implements IBaseBackboneElement { 960 /** 961 * The kind of classifier (e.g. publication type, keyword). 962 */ 963 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 964 @Description(shortDefinition="The kind of classifier (e.g. publication type, keyword)", formalDefinition="The kind of classifier (e.g. publication type, keyword)." ) 965 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/citation-classification-type") 966 protected CodeableConcept type; 967 968 /** 969 * The specific classification value. 970 */ 971 @Child(name = "classifier", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 972 @Description(shortDefinition="The specific classification value", formalDefinition="The specific classification value." ) 973 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/citation-artifact-classifier") 974 protected List<CodeableConcept> classifier; 975 976 private static final long serialVersionUID = -283121869L; 977 978 /** 979 * Constructor 980 */ 981 public CitationClassificationComponent() { 982 super(); 983 } 984 985 /** 986 * @return {@link #type} (The kind of classifier (e.g. publication type, keyword).) 987 */ 988 public CodeableConcept getType() { 989 if (this.type == null) 990 if (Configuration.errorOnAutoCreate()) 991 throw new Error("Attempt to auto-create CitationClassificationComponent.type"); 992 else if (Configuration.doAutoCreate()) 993 this.type = new CodeableConcept(); // cc 994 return this.type; 995 } 996 997 public boolean hasType() { 998 return this.type != null && !this.type.isEmpty(); 999 } 1000 1001 /** 1002 * @param value {@link #type} (The kind of classifier (e.g. publication type, keyword).) 1003 */ 1004 public CitationClassificationComponent setType(CodeableConcept value) { 1005 this.type = value; 1006 return this; 1007 } 1008 1009 /** 1010 * @return {@link #classifier} (The specific classification value.) 1011 */ 1012 public List<CodeableConcept> getClassifier() { 1013 if (this.classifier == null) 1014 this.classifier = new ArrayList<CodeableConcept>(); 1015 return this.classifier; 1016 } 1017 1018 /** 1019 * @return Returns a reference to <code>this</code> for easy method chaining 1020 */ 1021 public CitationClassificationComponent setClassifier(List<CodeableConcept> theClassifier) { 1022 this.classifier = theClassifier; 1023 return this; 1024 } 1025 1026 public boolean hasClassifier() { 1027 if (this.classifier == null) 1028 return false; 1029 for (CodeableConcept item : this.classifier) 1030 if (!item.isEmpty()) 1031 return true; 1032 return false; 1033 } 1034 1035 public CodeableConcept addClassifier() { //3 1036 CodeableConcept t = new CodeableConcept(); 1037 if (this.classifier == null) 1038 this.classifier = new ArrayList<CodeableConcept>(); 1039 this.classifier.add(t); 1040 return t; 1041 } 1042 1043 public CitationClassificationComponent addClassifier(CodeableConcept t) { //3 1044 if (t == null) 1045 return this; 1046 if (this.classifier == null) 1047 this.classifier = new ArrayList<CodeableConcept>(); 1048 this.classifier.add(t); 1049 return this; 1050 } 1051 1052 /** 1053 * @return The first repetition of repeating field {@link #classifier}, creating it if it does not already exist {3} 1054 */ 1055 public CodeableConcept getClassifierFirstRep() { 1056 if (getClassifier().isEmpty()) { 1057 addClassifier(); 1058 } 1059 return getClassifier().get(0); 1060 } 1061 1062 protected void listChildren(List<Property> children) { 1063 super.listChildren(children); 1064 children.add(new Property("type", "CodeableConcept", "The kind of classifier (e.g. publication type, keyword).", 0, 1, type)); 1065 children.add(new Property("classifier", "CodeableConcept", "The specific classification value.", 0, java.lang.Integer.MAX_VALUE, classifier)); 1066 } 1067 1068 @Override 1069 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1070 switch (_hash) { 1071 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The kind of classifier (e.g. publication type, keyword).", 0, 1, type); 1072 case -281470431: /*classifier*/ return new Property("classifier", "CodeableConcept", "The specific classification value.", 0, java.lang.Integer.MAX_VALUE, classifier); 1073 default: return super.getNamedProperty(_hash, _name, _checkValid); 1074 } 1075 1076 } 1077 1078 @Override 1079 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1080 switch (hash) { 1081 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1082 case -281470431: /*classifier*/ return this.classifier == null ? new Base[0] : this.classifier.toArray(new Base[this.classifier.size()]); // CodeableConcept 1083 default: return super.getProperty(hash, name, checkValid); 1084 } 1085 1086 } 1087 1088 @Override 1089 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1090 switch (hash) { 1091 case 3575610: // type 1092 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1093 return value; 1094 case -281470431: // classifier 1095 this.getClassifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1096 return value; 1097 default: return super.setProperty(hash, name, value); 1098 } 1099 1100 } 1101 1102 @Override 1103 public Base setProperty(String name, Base value) throws FHIRException { 1104 if (name.equals("type")) { 1105 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1106 } else if (name.equals("classifier")) { 1107 this.getClassifier().add(TypeConvertor.castToCodeableConcept(value)); 1108 } else 1109 return super.setProperty(name, value); 1110 return value; 1111 } 1112 1113 @Override 1114 public Base makeProperty(int hash, String name) throws FHIRException { 1115 switch (hash) { 1116 case 3575610: return getType(); 1117 case -281470431: return addClassifier(); 1118 default: return super.makeProperty(hash, name); 1119 } 1120 1121 } 1122 1123 @Override 1124 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1125 switch (hash) { 1126 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1127 case -281470431: /*classifier*/ return new String[] {"CodeableConcept"}; 1128 default: return super.getTypesForProperty(hash, name); 1129 } 1130 1131 } 1132 1133 @Override 1134 public Base addChild(String name) throws FHIRException { 1135 if (name.equals("type")) { 1136 this.type = new CodeableConcept(); 1137 return this.type; 1138 } 1139 else if (name.equals("classifier")) { 1140 return addClassifier(); 1141 } 1142 else 1143 return super.addChild(name); 1144 } 1145 1146 public CitationClassificationComponent copy() { 1147 CitationClassificationComponent dst = new CitationClassificationComponent(); 1148 copyValues(dst); 1149 return dst; 1150 } 1151 1152 public void copyValues(CitationClassificationComponent dst) { 1153 super.copyValues(dst); 1154 dst.type = type == null ? null : type.copy(); 1155 if (classifier != null) { 1156 dst.classifier = new ArrayList<CodeableConcept>(); 1157 for (CodeableConcept i : classifier) 1158 dst.classifier.add(i.copy()); 1159 }; 1160 } 1161 1162 @Override 1163 public boolean equalsDeep(Base other_) { 1164 if (!super.equalsDeep(other_)) 1165 return false; 1166 if (!(other_ instanceof CitationClassificationComponent)) 1167 return false; 1168 CitationClassificationComponent o = (CitationClassificationComponent) other_; 1169 return compareDeep(type, o.type, true) && compareDeep(classifier, o.classifier, true); 1170 } 1171 1172 @Override 1173 public boolean equalsShallow(Base other_) { 1174 if (!super.equalsShallow(other_)) 1175 return false; 1176 if (!(other_ instanceof CitationClassificationComponent)) 1177 return false; 1178 CitationClassificationComponent o = (CitationClassificationComponent) other_; 1179 return true; 1180 } 1181 1182 public boolean isEmpty() { 1183 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, classifier); 1184 } 1185 1186 public String fhirType() { 1187 return "Citation.classification"; 1188 1189 } 1190 1191 } 1192 1193 @Block() 1194 public static class CitationStatusDateComponent extends BackboneElement implements IBaseBackboneElement { 1195 /** 1196 * The state or status of the citation record (that will be paired with the period). 1197 */ 1198 @Child(name = "activity", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 1199 @Description(shortDefinition="Classification of the status", formalDefinition="The state or status of the citation record (that will be paired with the period)." ) 1200 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/citation-status-type") 1201 protected CodeableConcept activity; 1202 1203 /** 1204 * Whether the status date is actual (has occurred) or expected (estimated or anticipated). 1205 */ 1206 @Child(name = "actual", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1207 @Description(shortDefinition="Either occurred or expected", formalDefinition="Whether the status date is actual (has occurred) or expected (estimated or anticipated)." ) 1208 protected BooleanType actual; 1209 1210 /** 1211 * When the status started and/or ended. 1212 */ 1213 @Child(name = "period", type = {Period.class}, order=3, min=1, max=1, modifier=false, summary=false) 1214 @Description(shortDefinition="When the status started and/or ended", formalDefinition="When the status started and/or ended." ) 1215 protected Period period; 1216 1217 private static final long serialVersionUID = 1123586924L; 1218 1219 /** 1220 * Constructor 1221 */ 1222 public CitationStatusDateComponent() { 1223 super(); 1224 } 1225 1226 /** 1227 * Constructor 1228 */ 1229 public CitationStatusDateComponent(CodeableConcept activity, Period period) { 1230 super(); 1231 this.setActivity(activity); 1232 this.setPeriod(period); 1233 } 1234 1235 /** 1236 * @return {@link #activity} (The state or status of the citation record (that will be paired with the period).) 1237 */ 1238 public CodeableConcept getActivity() { 1239 if (this.activity == null) 1240 if (Configuration.errorOnAutoCreate()) 1241 throw new Error("Attempt to auto-create CitationStatusDateComponent.activity"); 1242 else if (Configuration.doAutoCreate()) 1243 this.activity = new CodeableConcept(); // cc 1244 return this.activity; 1245 } 1246 1247 public boolean hasActivity() { 1248 return this.activity != null && !this.activity.isEmpty(); 1249 } 1250 1251 /** 1252 * @param value {@link #activity} (The state or status of the citation record (that will be paired with the period).) 1253 */ 1254 public CitationStatusDateComponent setActivity(CodeableConcept value) { 1255 this.activity = value; 1256 return this; 1257 } 1258 1259 /** 1260 * @return {@link #actual} (Whether the status date is actual (has occurred) or expected (estimated or anticipated).). This is the underlying object with id, value and extensions. The accessor "getActual" gives direct access to the value 1261 */ 1262 public BooleanType getActualElement() { 1263 if (this.actual == null) 1264 if (Configuration.errorOnAutoCreate()) 1265 throw new Error("Attempt to auto-create CitationStatusDateComponent.actual"); 1266 else if (Configuration.doAutoCreate()) 1267 this.actual = new BooleanType(); // bb 1268 return this.actual; 1269 } 1270 1271 public boolean hasActualElement() { 1272 return this.actual != null && !this.actual.isEmpty(); 1273 } 1274 1275 public boolean hasActual() { 1276 return this.actual != null && !this.actual.isEmpty(); 1277 } 1278 1279 /** 1280 * @param value {@link #actual} (Whether the status date is actual (has occurred) or expected (estimated or anticipated).). This is the underlying object with id, value and extensions. The accessor "getActual" gives direct access to the value 1281 */ 1282 public CitationStatusDateComponent setActualElement(BooleanType value) { 1283 this.actual = value; 1284 return this; 1285 } 1286 1287 /** 1288 * @return Whether the status date is actual (has occurred) or expected (estimated or anticipated). 1289 */ 1290 public boolean getActual() { 1291 return this.actual == null || this.actual.isEmpty() ? false : this.actual.getValue(); 1292 } 1293 1294 /** 1295 * @param value Whether the status date is actual (has occurred) or expected (estimated or anticipated). 1296 */ 1297 public CitationStatusDateComponent setActual(boolean value) { 1298 if (this.actual == null) 1299 this.actual = new BooleanType(); 1300 this.actual.setValue(value); 1301 return this; 1302 } 1303 1304 /** 1305 * @return {@link #period} (When the status started and/or ended.) 1306 */ 1307 public Period getPeriod() { 1308 if (this.period == null) 1309 if (Configuration.errorOnAutoCreate()) 1310 throw new Error("Attempt to auto-create CitationStatusDateComponent.period"); 1311 else if (Configuration.doAutoCreate()) 1312 this.period = new Period(); // cc 1313 return this.period; 1314 } 1315 1316 public boolean hasPeriod() { 1317 return this.period != null && !this.period.isEmpty(); 1318 } 1319 1320 /** 1321 * @param value {@link #period} (When the status started and/or ended.) 1322 */ 1323 public CitationStatusDateComponent setPeriod(Period value) { 1324 this.period = value; 1325 return this; 1326 } 1327 1328 protected void listChildren(List<Property> children) { 1329 super.listChildren(children); 1330 children.add(new Property("activity", "CodeableConcept", "The state or status of the citation record (that will be paired with the period).", 0, 1, activity)); 1331 children.add(new Property("actual", "boolean", "Whether the status date is actual (has occurred) or expected (estimated or anticipated).", 0, 1, actual)); 1332 children.add(new Property("period", "Period", "When the status started and/or ended.", 0, 1, period)); 1333 } 1334 1335 @Override 1336 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1337 switch (_hash) { 1338 case -1655966961: /*activity*/ return new Property("activity", "CodeableConcept", "The state or status of the citation record (that will be paired with the period).", 0, 1, activity); 1339 case -1422939762: /*actual*/ return new Property("actual", "boolean", "Whether the status date is actual (has occurred) or expected (estimated or anticipated).", 0, 1, actual); 1340 case -991726143: /*period*/ return new Property("period", "Period", "When the status started and/or ended.", 0, 1, period); 1341 default: return super.getNamedProperty(_hash, _name, _checkValid); 1342 } 1343 1344 } 1345 1346 @Override 1347 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1348 switch (hash) { 1349 case -1655966961: /*activity*/ return this.activity == null ? new Base[0] : new Base[] {this.activity}; // CodeableConcept 1350 case -1422939762: /*actual*/ return this.actual == null ? new Base[0] : new Base[] {this.actual}; // BooleanType 1351 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 1352 default: return super.getProperty(hash, name, checkValid); 1353 } 1354 1355 } 1356 1357 @Override 1358 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1359 switch (hash) { 1360 case -1655966961: // activity 1361 this.activity = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1362 return value; 1363 case -1422939762: // actual 1364 this.actual = TypeConvertor.castToBoolean(value); // BooleanType 1365 return value; 1366 case -991726143: // period 1367 this.period = TypeConvertor.castToPeriod(value); // Period 1368 return value; 1369 default: return super.setProperty(hash, name, value); 1370 } 1371 1372 } 1373 1374 @Override 1375 public Base setProperty(String name, Base value) throws FHIRException { 1376 if (name.equals("activity")) { 1377 this.activity = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1378 } else if (name.equals("actual")) { 1379 this.actual = TypeConvertor.castToBoolean(value); // BooleanType 1380 } else if (name.equals("period")) { 1381 this.period = TypeConvertor.castToPeriod(value); // Period 1382 } else 1383 return super.setProperty(name, value); 1384 return value; 1385 } 1386 1387 @Override 1388 public Base makeProperty(int hash, String name) throws FHIRException { 1389 switch (hash) { 1390 case -1655966961: return getActivity(); 1391 case -1422939762: return getActualElement(); 1392 case -991726143: return getPeriod(); 1393 default: return super.makeProperty(hash, name); 1394 } 1395 1396 } 1397 1398 @Override 1399 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1400 switch (hash) { 1401 case -1655966961: /*activity*/ return new String[] {"CodeableConcept"}; 1402 case -1422939762: /*actual*/ return new String[] {"boolean"}; 1403 case -991726143: /*period*/ return new String[] {"Period"}; 1404 default: return super.getTypesForProperty(hash, name); 1405 } 1406 1407 } 1408 1409 @Override 1410 public Base addChild(String name) throws FHIRException { 1411 if (name.equals("activity")) { 1412 this.activity = new CodeableConcept(); 1413 return this.activity; 1414 } 1415 else if (name.equals("actual")) { 1416 throw new FHIRException("Cannot call addChild on a singleton property Citation.statusDate.actual"); 1417 } 1418 else if (name.equals("period")) { 1419 this.period = new Period(); 1420 return this.period; 1421 } 1422 else 1423 return super.addChild(name); 1424 } 1425 1426 public CitationStatusDateComponent copy() { 1427 CitationStatusDateComponent dst = new CitationStatusDateComponent(); 1428 copyValues(dst); 1429 return dst; 1430 } 1431 1432 public void copyValues(CitationStatusDateComponent dst) { 1433 super.copyValues(dst); 1434 dst.activity = activity == null ? null : activity.copy(); 1435 dst.actual = actual == null ? null : actual.copy(); 1436 dst.period = period == null ? null : period.copy(); 1437 } 1438 1439 @Override 1440 public boolean equalsDeep(Base other_) { 1441 if (!super.equalsDeep(other_)) 1442 return false; 1443 if (!(other_ instanceof CitationStatusDateComponent)) 1444 return false; 1445 CitationStatusDateComponent o = (CitationStatusDateComponent) other_; 1446 return compareDeep(activity, o.activity, true) && compareDeep(actual, o.actual, true) && compareDeep(period, o.period, true) 1447 ; 1448 } 1449 1450 @Override 1451 public boolean equalsShallow(Base other_) { 1452 if (!super.equalsShallow(other_)) 1453 return false; 1454 if (!(other_ instanceof CitationStatusDateComponent)) 1455 return false; 1456 CitationStatusDateComponent o = (CitationStatusDateComponent) other_; 1457 return compareValues(actual, o.actual, true); 1458 } 1459 1460 public boolean isEmpty() { 1461 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(activity, actual, period 1462 ); 1463 } 1464 1465 public String fhirType() { 1466 return "Citation.statusDate"; 1467 1468 } 1469 1470 } 1471 1472 @Block() 1473 public static class CitationCitedArtifactComponent extends BackboneElement implements IBaseBackboneElement { 1474 /** 1475 * A formal identifier that is used to identify the cited artifact when it is represented in other formats, or referenced in a specification, model, design or an instance. 1476 */ 1477 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1478 @Description(shortDefinition="Unique identifier. May include DOI, PMID, PMCID, etc", formalDefinition="A formal identifier that is used to identify the cited artifact when it is represented in other formats, or referenced in a specification, model, design or an instance." ) 1479 protected List<Identifier> identifier; 1480 1481 /** 1482 * A formal identifier that is used to identify things closely related to the cited artifact. 1483 */ 1484 @Child(name = "relatedIdentifier", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1485 @Description(shortDefinition="Identifier not unique to the cited artifact. May include trial registry identifiers", formalDefinition="A formal identifier that is used to identify things closely related to the cited artifact." ) 1486 protected List<Identifier> relatedIdentifier; 1487 1488 /** 1489 * When the cited artifact was accessed. 1490 */ 1491 @Child(name = "dateAccessed", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) 1492 @Description(shortDefinition="When the cited artifact was accessed", formalDefinition="When the cited artifact was accessed." ) 1493 protected DateTimeType dateAccessed; 1494 1495 /** 1496 * The defined version of the cited artifact. 1497 */ 1498 @Child(name = "version", type = {}, order=4, min=0, max=1, modifier=false, summary=false) 1499 @Description(shortDefinition="The defined version of the cited artifact", formalDefinition="The defined version of the cited artifact." ) 1500 protected CitationCitedArtifactVersionComponent version; 1501 1502 /** 1503 * The status of the cited artifact. 1504 */ 1505 @Child(name = "currentState", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1506 @Description(shortDefinition="The status of the cited artifact", formalDefinition="The status of the cited artifact." ) 1507 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/cited-artifact-status-type") 1508 protected List<CodeableConcept> currentState; 1509 1510 /** 1511 * An effective date or period, historical or future, actual or expected, for a status of the cited artifact. 1512 */ 1513 @Child(name = "statusDate", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1514 @Description(shortDefinition="An effective date or period for a status of the cited artifact", formalDefinition="An effective date or period, historical or future, actual or expected, for a status of the cited artifact." ) 1515 protected List<CitationCitedArtifactStatusDateComponent> statusDate; 1516 1517 /** 1518 * The title details of the article or artifact. 1519 */ 1520 @Child(name = "title", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1521 @Description(shortDefinition="The title details of the article or artifact", formalDefinition="The title details of the article or artifact." ) 1522 protected List<CitationCitedArtifactTitleComponent> title; 1523 1524 /** 1525 * The abstract may be used to convey article-contained abstracts, externally-created abstracts, or other descriptive summaries. 1526 */ 1527 @Child(name = "abstract", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1528 @Description(shortDefinition="Summary of the article or artifact", formalDefinition="The abstract may be used to convey article-contained abstracts, externally-created abstracts, or other descriptive summaries." ) 1529 protected List<CitationCitedArtifactAbstractComponent> abstract_; 1530 1531 /** 1532 * The component of the article or artifact. 1533 */ 1534 @Child(name = "part", type = {}, order=9, min=0, max=1, modifier=false, summary=false) 1535 @Description(shortDefinition="The component of the article or artifact", formalDefinition="The component of the article or artifact." ) 1536 protected CitationCitedArtifactPartComponent part; 1537 1538 /** 1539 * The artifact related to the cited artifact. 1540 */ 1541 @Child(name = "relatesTo", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1542 @Description(shortDefinition="The artifact related to the cited artifact", formalDefinition="The artifact related to the cited artifact." ) 1543 protected List<CitationCitedArtifactRelatesToComponent> relatesTo; 1544 1545 /** 1546 * If multiple, used to represent alternative forms of the article that are not separate citations. 1547 */ 1548 @Child(name = "publicationForm", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1549 @Description(shortDefinition="If multiple, used to represent alternative forms of the article that are not separate citations", formalDefinition="If multiple, used to represent alternative forms of the article that are not separate citations." ) 1550 protected List<CitationCitedArtifactPublicationFormComponent> publicationForm; 1551 1552 /** 1553 * Used for any URL for the article or artifact cited. 1554 */ 1555 @Child(name = "webLocation", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1556 @Description(shortDefinition="Used for any URL for the article or artifact cited", formalDefinition="Used for any URL for the article or artifact cited." ) 1557 protected List<CitationCitedArtifactWebLocationComponent> webLocation; 1558 1559 /** 1560 * The assignment to an organizing scheme. 1561 */ 1562 @Child(name = "classification", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1563 @Description(shortDefinition="The assignment to an organizing scheme", formalDefinition="The assignment to an organizing scheme." ) 1564 protected List<CitationCitedArtifactClassificationComponent> classification; 1565 1566 /** 1567 * This element is used to list authors and other contributors, their contact information, specific contributions, and summary statements. 1568 */ 1569 @Child(name = "contributorship", type = {}, order=14, min=0, max=1, modifier=false, summary=false) 1570 @Description(shortDefinition="Attribution of authors and other contributors", formalDefinition="This element is used to list authors and other contributors, their contact information, specific contributions, and summary statements." ) 1571 protected CitationCitedArtifactContributorshipComponent contributorship; 1572 1573 /** 1574 * Any additional information or content for the article or artifact. 1575 */ 1576 @Child(name = "note", type = {Annotation.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1577 @Description(shortDefinition="Any additional information or content for the article or artifact", formalDefinition="Any additional information or content for the article or artifact." ) 1578 protected List<Annotation> note; 1579 1580 private static final long serialVersionUID = -1685890486L; 1581 1582 /** 1583 * Constructor 1584 */ 1585 public CitationCitedArtifactComponent() { 1586 super(); 1587 } 1588 1589 /** 1590 * @return {@link #identifier} (A formal identifier that is used to identify the cited artifact when it is represented in other formats, or referenced in a specification, model, design or an instance.) 1591 */ 1592 public List<Identifier> getIdentifier() { 1593 if (this.identifier == null) 1594 this.identifier = new ArrayList<Identifier>(); 1595 return this.identifier; 1596 } 1597 1598 /** 1599 * @return Returns a reference to <code>this</code> for easy method chaining 1600 */ 1601 public CitationCitedArtifactComponent setIdentifier(List<Identifier> theIdentifier) { 1602 this.identifier = theIdentifier; 1603 return this; 1604 } 1605 1606 public boolean hasIdentifier() { 1607 if (this.identifier == null) 1608 return false; 1609 for (Identifier item : this.identifier) 1610 if (!item.isEmpty()) 1611 return true; 1612 return false; 1613 } 1614 1615 public Identifier addIdentifier() { //3 1616 Identifier t = new Identifier(); 1617 if (this.identifier == null) 1618 this.identifier = new ArrayList<Identifier>(); 1619 this.identifier.add(t); 1620 return t; 1621 } 1622 1623 public CitationCitedArtifactComponent addIdentifier(Identifier t) { //3 1624 if (t == null) 1625 return this; 1626 if (this.identifier == null) 1627 this.identifier = new ArrayList<Identifier>(); 1628 this.identifier.add(t); 1629 return this; 1630 } 1631 1632 /** 1633 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 1634 */ 1635 public Identifier getIdentifierFirstRep() { 1636 if (getIdentifier().isEmpty()) { 1637 addIdentifier(); 1638 } 1639 return getIdentifier().get(0); 1640 } 1641 1642 /** 1643 * @return {@link #relatedIdentifier} (A formal identifier that is used to identify things closely related to the cited artifact.) 1644 */ 1645 public List<Identifier> getRelatedIdentifier() { 1646 if (this.relatedIdentifier == null) 1647 this.relatedIdentifier = new ArrayList<Identifier>(); 1648 return this.relatedIdentifier; 1649 } 1650 1651 /** 1652 * @return Returns a reference to <code>this</code> for easy method chaining 1653 */ 1654 public CitationCitedArtifactComponent setRelatedIdentifier(List<Identifier> theRelatedIdentifier) { 1655 this.relatedIdentifier = theRelatedIdentifier; 1656 return this; 1657 } 1658 1659 public boolean hasRelatedIdentifier() { 1660 if (this.relatedIdentifier == null) 1661 return false; 1662 for (Identifier item : this.relatedIdentifier) 1663 if (!item.isEmpty()) 1664 return true; 1665 return false; 1666 } 1667 1668 public Identifier addRelatedIdentifier() { //3 1669 Identifier t = new Identifier(); 1670 if (this.relatedIdentifier == null) 1671 this.relatedIdentifier = new ArrayList<Identifier>(); 1672 this.relatedIdentifier.add(t); 1673 return t; 1674 } 1675 1676 public CitationCitedArtifactComponent addRelatedIdentifier(Identifier t) { //3 1677 if (t == null) 1678 return this; 1679 if (this.relatedIdentifier == null) 1680 this.relatedIdentifier = new ArrayList<Identifier>(); 1681 this.relatedIdentifier.add(t); 1682 return this; 1683 } 1684 1685 /** 1686 * @return The first repetition of repeating field {@link #relatedIdentifier}, creating it if it does not already exist {3} 1687 */ 1688 public Identifier getRelatedIdentifierFirstRep() { 1689 if (getRelatedIdentifier().isEmpty()) { 1690 addRelatedIdentifier(); 1691 } 1692 return getRelatedIdentifier().get(0); 1693 } 1694 1695 /** 1696 * @return {@link #dateAccessed} (When the cited artifact was accessed.). This is the underlying object with id, value and extensions. The accessor "getDateAccessed" gives direct access to the value 1697 */ 1698 public DateTimeType getDateAccessedElement() { 1699 if (this.dateAccessed == null) 1700 if (Configuration.errorOnAutoCreate()) 1701 throw new Error("Attempt to auto-create CitationCitedArtifactComponent.dateAccessed"); 1702 else if (Configuration.doAutoCreate()) 1703 this.dateAccessed = new DateTimeType(); // bb 1704 return this.dateAccessed; 1705 } 1706 1707 public boolean hasDateAccessedElement() { 1708 return this.dateAccessed != null && !this.dateAccessed.isEmpty(); 1709 } 1710 1711 public boolean hasDateAccessed() { 1712 return this.dateAccessed != null && !this.dateAccessed.isEmpty(); 1713 } 1714 1715 /** 1716 * @param value {@link #dateAccessed} (When the cited artifact was accessed.). This is the underlying object with id, value and extensions. The accessor "getDateAccessed" gives direct access to the value 1717 */ 1718 public CitationCitedArtifactComponent setDateAccessedElement(DateTimeType value) { 1719 this.dateAccessed = value; 1720 return this; 1721 } 1722 1723 /** 1724 * @return When the cited artifact was accessed. 1725 */ 1726 public Date getDateAccessed() { 1727 return this.dateAccessed == null ? null : this.dateAccessed.getValue(); 1728 } 1729 1730 /** 1731 * @param value When the cited artifact was accessed. 1732 */ 1733 public CitationCitedArtifactComponent setDateAccessed(Date value) { 1734 if (value == null) 1735 this.dateAccessed = null; 1736 else { 1737 if (this.dateAccessed == null) 1738 this.dateAccessed = new DateTimeType(); 1739 this.dateAccessed.setValue(value); 1740 } 1741 return this; 1742 } 1743 1744 /** 1745 * @return {@link #version} (The defined version of the cited artifact.) 1746 */ 1747 public CitationCitedArtifactVersionComponent getVersion() { 1748 if (this.version == null) 1749 if (Configuration.errorOnAutoCreate()) 1750 throw new Error("Attempt to auto-create CitationCitedArtifactComponent.version"); 1751 else if (Configuration.doAutoCreate()) 1752 this.version = new CitationCitedArtifactVersionComponent(); // cc 1753 return this.version; 1754 } 1755 1756 public boolean hasVersion() { 1757 return this.version != null && !this.version.isEmpty(); 1758 } 1759 1760 /** 1761 * @param value {@link #version} (The defined version of the cited artifact.) 1762 */ 1763 public CitationCitedArtifactComponent setVersion(CitationCitedArtifactVersionComponent value) { 1764 this.version = value; 1765 return this; 1766 } 1767 1768 /** 1769 * @return {@link #currentState} (The status of the cited artifact.) 1770 */ 1771 public List<CodeableConcept> getCurrentState() { 1772 if (this.currentState == null) 1773 this.currentState = new ArrayList<CodeableConcept>(); 1774 return this.currentState; 1775 } 1776 1777 /** 1778 * @return Returns a reference to <code>this</code> for easy method chaining 1779 */ 1780 public CitationCitedArtifactComponent setCurrentState(List<CodeableConcept> theCurrentState) { 1781 this.currentState = theCurrentState; 1782 return this; 1783 } 1784 1785 public boolean hasCurrentState() { 1786 if (this.currentState == null) 1787 return false; 1788 for (CodeableConcept item : this.currentState) 1789 if (!item.isEmpty()) 1790 return true; 1791 return false; 1792 } 1793 1794 public CodeableConcept addCurrentState() { //3 1795 CodeableConcept t = new CodeableConcept(); 1796 if (this.currentState == null) 1797 this.currentState = new ArrayList<CodeableConcept>(); 1798 this.currentState.add(t); 1799 return t; 1800 } 1801 1802 public CitationCitedArtifactComponent addCurrentState(CodeableConcept t) { //3 1803 if (t == null) 1804 return this; 1805 if (this.currentState == null) 1806 this.currentState = new ArrayList<CodeableConcept>(); 1807 this.currentState.add(t); 1808 return this; 1809 } 1810 1811 /** 1812 * @return The first repetition of repeating field {@link #currentState}, creating it if it does not already exist {3} 1813 */ 1814 public CodeableConcept getCurrentStateFirstRep() { 1815 if (getCurrentState().isEmpty()) { 1816 addCurrentState(); 1817 } 1818 return getCurrentState().get(0); 1819 } 1820 1821 /** 1822 * @return {@link #statusDate} (An effective date or period, historical or future, actual or expected, for a status of the cited artifact.) 1823 */ 1824 public List<CitationCitedArtifactStatusDateComponent> getStatusDate() { 1825 if (this.statusDate == null) 1826 this.statusDate = new ArrayList<CitationCitedArtifactStatusDateComponent>(); 1827 return this.statusDate; 1828 } 1829 1830 /** 1831 * @return Returns a reference to <code>this</code> for easy method chaining 1832 */ 1833 public CitationCitedArtifactComponent setStatusDate(List<CitationCitedArtifactStatusDateComponent> theStatusDate) { 1834 this.statusDate = theStatusDate; 1835 return this; 1836 } 1837 1838 public boolean hasStatusDate() { 1839 if (this.statusDate == null) 1840 return false; 1841 for (CitationCitedArtifactStatusDateComponent item : this.statusDate) 1842 if (!item.isEmpty()) 1843 return true; 1844 return false; 1845 } 1846 1847 public CitationCitedArtifactStatusDateComponent addStatusDate() { //3 1848 CitationCitedArtifactStatusDateComponent t = new CitationCitedArtifactStatusDateComponent(); 1849 if (this.statusDate == null) 1850 this.statusDate = new ArrayList<CitationCitedArtifactStatusDateComponent>(); 1851 this.statusDate.add(t); 1852 return t; 1853 } 1854 1855 public CitationCitedArtifactComponent addStatusDate(CitationCitedArtifactStatusDateComponent t) { //3 1856 if (t == null) 1857 return this; 1858 if (this.statusDate == null) 1859 this.statusDate = new ArrayList<CitationCitedArtifactStatusDateComponent>(); 1860 this.statusDate.add(t); 1861 return this; 1862 } 1863 1864 /** 1865 * @return The first repetition of repeating field {@link #statusDate}, creating it if it does not already exist {3} 1866 */ 1867 public CitationCitedArtifactStatusDateComponent getStatusDateFirstRep() { 1868 if (getStatusDate().isEmpty()) { 1869 addStatusDate(); 1870 } 1871 return getStatusDate().get(0); 1872 } 1873 1874 /** 1875 * @return {@link #title} (The title details of the article or artifact.) 1876 */ 1877 public List<CitationCitedArtifactTitleComponent> getTitle() { 1878 if (this.title == null) 1879 this.title = new ArrayList<CitationCitedArtifactTitleComponent>(); 1880 return this.title; 1881 } 1882 1883 /** 1884 * @return Returns a reference to <code>this</code> for easy method chaining 1885 */ 1886 public CitationCitedArtifactComponent setTitle(List<CitationCitedArtifactTitleComponent> theTitle) { 1887 this.title = theTitle; 1888 return this; 1889 } 1890 1891 public boolean hasTitle() { 1892 if (this.title == null) 1893 return false; 1894 for (CitationCitedArtifactTitleComponent item : this.title) 1895 if (!item.isEmpty()) 1896 return true; 1897 return false; 1898 } 1899 1900 public CitationCitedArtifactTitleComponent addTitle() { //3 1901 CitationCitedArtifactTitleComponent t = new CitationCitedArtifactTitleComponent(); 1902 if (this.title == null) 1903 this.title = new ArrayList<CitationCitedArtifactTitleComponent>(); 1904 this.title.add(t); 1905 return t; 1906 } 1907 1908 public CitationCitedArtifactComponent addTitle(CitationCitedArtifactTitleComponent t) { //3 1909 if (t == null) 1910 return this; 1911 if (this.title == null) 1912 this.title = new ArrayList<CitationCitedArtifactTitleComponent>(); 1913 this.title.add(t); 1914 return this; 1915 } 1916 1917 /** 1918 * @return The first repetition of repeating field {@link #title}, creating it if it does not already exist {3} 1919 */ 1920 public CitationCitedArtifactTitleComponent getTitleFirstRep() { 1921 if (getTitle().isEmpty()) { 1922 addTitle(); 1923 } 1924 return getTitle().get(0); 1925 } 1926 1927 /** 1928 * @return {@link #abstract_} (The abstract may be used to convey article-contained abstracts, externally-created abstracts, or other descriptive summaries.) 1929 */ 1930 public List<CitationCitedArtifactAbstractComponent> getAbstract() { 1931 if (this.abstract_ == null) 1932 this.abstract_ = new ArrayList<CitationCitedArtifactAbstractComponent>(); 1933 return this.abstract_; 1934 } 1935 1936 /** 1937 * @return Returns a reference to <code>this</code> for easy method chaining 1938 */ 1939 public CitationCitedArtifactComponent setAbstract(List<CitationCitedArtifactAbstractComponent> theAbstract) { 1940 this.abstract_ = theAbstract; 1941 return this; 1942 } 1943 1944 public boolean hasAbstract() { 1945 if (this.abstract_ == null) 1946 return false; 1947 for (CitationCitedArtifactAbstractComponent item : this.abstract_) 1948 if (!item.isEmpty()) 1949 return true; 1950 return false; 1951 } 1952 1953 public CitationCitedArtifactAbstractComponent addAbstract() { //3 1954 CitationCitedArtifactAbstractComponent t = new CitationCitedArtifactAbstractComponent(); 1955 if (this.abstract_ == null) 1956 this.abstract_ = new ArrayList<CitationCitedArtifactAbstractComponent>(); 1957 this.abstract_.add(t); 1958 return t; 1959 } 1960 1961 public CitationCitedArtifactComponent addAbstract(CitationCitedArtifactAbstractComponent t) { //3 1962 if (t == null) 1963 return this; 1964 if (this.abstract_ == null) 1965 this.abstract_ = new ArrayList<CitationCitedArtifactAbstractComponent>(); 1966 this.abstract_.add(t); 1967 return this; 1968 } 1969 1970 /** 1971 * @return The first repetition of repeating field {@link #abstract_}, creating it if it does not already exist {3} 1972 */ 1973 public CitationCitedArtifactAbstractComponent getAbstractFirstRep() { 1974 if (getAbstract().isEmpty()) { 1975 addAbstract(); 1976 } 1977 return getAbstract().get(0); 1978 } 1979 1980 /** 1981 * @return {@link #part} (The component of the article or artifact.) 1982 */ 1983 public CitationCitedArtifactPartComponent getPart() { 1984 if (this.part == null) 1985 if (Configuration.errorOnAutoCreate()) 1986 throw new Error("Attempt to auto-create CitationCitedArtifactComponent.part"); 1987 else if (Configuration.doAutoCreate()) 1988 this.part = new CitationCitedArtifactPartComponent(); // cc 1989 return this.part; 1990 } 1991 1992 public boolean hasPart() { 1993 return this.part != null && !this.part.isEmpty(); 1994 } 1995 1996 /** 1997 * @param value {@link #part} (The component of the article or artifact.) 1998 */ 1999 public CitationCitedArtifactComponent setPart(CitationCitedArtifactPartComponent value) { 2000 this.part = value; 2001 return this; 2002 } 2003 2004 /** 2005 * @return {@link #relatesTo} (The artifact related to the cited artifact.) 2006 */ 2007 public List<CitationCitedArtifactRelatesToComponent> getRelatesTo() { 2008 if (this.relatesTo == null) 2009 this.relatesTo = new ArrayList<CitationCitedArtifactRelatesToComponent>(); 2010 return this.relatesTo; 2011 } 2012 2013 /** 2014 * @return Returns a reference to <code>this</code> for easy method chaining 2015 */ 2016 public CitationCitedArtifactComponent setRelatesTo(List<CitationCitedArtifactRelatesToComponent> theRelatesTo) { 2017 this.relatesTo = theRelatesTo; 2018 return this; 2019 } 2020 2021 public boolean hasRelatesTo() { 2022 if (this.relatesTo == null) 2023 return false; 2024 for (CitationCitedArtifactRelatesToComponent item : this.relatesTo) 2025 if (!item.isEmpty()) 2026 return true; 2027 return false; 2028 } 2029 2030 public CitationCitedArtifactRelatesToComponent addRelatesTo() { //3 2031 CitationCitedArtifactRelatesToComponent t = new CitationCitedArtifactRelatesToComponent(); 2032 if (this.relatesTo == null) 2033 this.relatesTo = new ArrayList<CitationCitedArtifactRelatesToComponent>(); 2034 this.relatesTo.add(t); 2035 return t; 2036 } 2037 2038 public CitationCitedArtifactComponent addRelatesTo(CitationCitedArtifactRelatesToComponent t) { //3 2039 if (t == null) 2040 return this; 2041 if (this.relatesTo == null) 2042 this.relatesTo = new ArrayList<CitationCitedArtifactRelatesToComponent>(); 2043 this.relatesTo.add(t); 2044 return this; 2045 } 2046 2047 /** 2048 * @return The first repetition of repeating field {@link #relatesTo}, creating it if it does not already exist {3} 2049 */ 2050 public CitationCitedArtifactRelatesToComponent getRelatesToFirstRep() { 2051 if (getRelatesTo().isEmpty()) { 2052 addRelatesTo(); 2053 } 2054 return getRelatesTo().get(0); 2055 } 2056 2057 /** 2058 * @return {@link #publicationForm} (If multiple, used to represent alternative forms of the article that are not separate citations.) 2059 */ 2060 public List<CitationCitedArtifactPublicationFormComponent> getPublicationForm() { 2061 if (this.publicationForm == null) 2062 this.publicationForm = new ArrayList<CitationCitedArtifactPublicationFormComponent>(); 2063 return this.publicationForm; 2064 } 2065 2066 /** 2067 * @return Returns a reference to <code>this</code> for easy method chaining 2068 */ 2069 public CitationCitedArtifactComponent setPublicationForm(List<CitationCitedArtifactPublicationFormComponent> thePublicationForm) { 2070 this.publicationForm = thePublicationForm; 2071 return this; 2072 } 2073 2074 public boolean hasPublicationForm() { 2075 if (this.publicationForm == null) 2076 return false; 2077 for (CitationCitedArtifactPublicationFormComponent item : this.publicationForm) 2078 if (!item.isEmpty()) 2079 return true; 2080 return false; 2081 } 2082 2083 public CitationCitedArtifactPublicationFormComponent addPublicationForm() { //3 2084 CitationCitedArtifactPublicationFormComponent t = new CitationCitedArtifactPublicationFormComponent(); 2085 if (this.publicationForm == null) 2086 this.publicationForm = new ArrayList<CitationCitedArtifactPublicationFormComponent>(); 2087 this.publicationForm.add(t); 2088 return t; 2089 } 2090 2091 public CitationCitedArtifactComponent addPublicationForm(CitationCitedArtifactPublicationFormComponent t) { //3 2092 if (t == null) 2093 return this; 2094 if (this.publicationForm == null) 2095 this.publicationForm = new ArrayList<CitationCitedArtifactPublicationFormComponent>(); 2096 this.publicationForm.add(t); 2097 return this; 2098 } 2099 2100 /** 2101 * @return The first repetition of repeating field {@link #publicationForm}, creating it if it does not already exist {3} 2102 */ 2103 public CitationCitedArtifactPublicationFormComponent getPublicationFormFirstRep() { 2104 if (getPublicationForm().isEmpty()) { 2105 addPublicationForm(); 2106 } 2107 return getPublicationForm().get(0); 2108 } 2109 2110 /** 2111 * @return {@link #webLocation} (Used for any URL for the article or artifact cited.) 2112 */ 2113 public List<CitationCitedArtifactWebLocationComponent> getWebLocation() { 2114 if (this.webLocation == null) 2115 this.webLocation = new ArrayList<CitationCitedArtifactWebLocationComponent>(); 2116 return this.webLocation; 2117 } 2118 2119 /** 2120 * @return Returns a reference to <code>this</code> for easy method chaining 2121 */ 2122 public CitationCitedArtifactComponent setWebLocation(List<CitationCitedArtifactWebLocationComponent> theWebLocation) { 2123 this.webLocation = theWebLocation; 2124 return this; 2125 } 2126 2127 public boolean hasWebLocation() { 2128 if (this.webLocation == null) 2129 return false; 2130 for (CitationCitedArtifactWebLocationComponent item : this.webLocation) 2131 if (!item.isEmpty()) 2132 return true; 2133 return false; 2134 } 2135 2136 public CitationCitedArtifactWebLocationComponent addWebLocation() { //3 2137 CitationCitedArtifactWebLocationComponent t = new CitationCitedArtifactWebLocationComponent(); 2138 if (this.webLocation == null) 2139 this.webLocation = new ArrayList<CitationCitedArtifactWebLocationComponent>(); 2140 this.webLocation.add(t); 2141 return t; 2142 } 2143 2144 public CitationCitedArtifactComponent addWebLocation(CitationCitedArtifactWebLocationComponent t) { //3 2145 if (t == null) 2146 return this; 2147 if (this.webLocation == null) 2148 this.webLocation = new ArrayList<CitationCitedArtifactWebLocationComponent>(); 2149 this.webLocation.add(t); 2150 return this; 2151 } 2152 2153 /** 2154 * @return The first repetition of repeating field {@link #webLocation}, creating it if it does not already exist {3} 2155 */ 2156 public CitationCitedArtifactWebLocationComponent getWebLocationFirstRep() { 2157 if (getWebLocation().isEmpty()) { 2158 addWebLocation(); 2159 } 2160 return getWebLocation().get(0); 2161 } 2162 2163 /** 2164 * @return {@link #classification} (The assignment to an organizing scheme.) 2165 */ 2166 public List<CitationCitedArtifactClassificationComponent> getClassification() { 2167 if (this.classification == null) 2168 this.classification = new ArrayList<CitationCitedArtifactClassificationComponent>(); 2169 return this.classification; 2170 } 2171 2172 /** 2173 * @return Returns a reference to <code>this</code> for easy method chaining 2174 */ 2175 public CitationCitedArtifactComponent setClassification(List<CitationCitedArtifactClassificationComponent> theClassification) { 2176 this.classification = theClassification; 2177 return this; 2178 } 2179 2180 public boolean hasClassification() { 2181 if (this.classification == null) 2182 return false; 2183 for (CitationCitedArtifactClassificationComponent item : this.classification) 2184 if (!item.isEmpty()) 2185 return true; 2186 return false; 2187 } 2188 2189 public CitationCitedArtifactClassificationComponent addClassification() { //3 2190 CitationCitedArtifactClassificationComponent t = new CitationCitedArtifactClassificationComponent(); 2191 if (this.classification == null) 2192 this.classification = new ArrayList<CitationCitedArtifactClassificationComponent>(); 2193 this.classification.add(t); 2194 return t; 2195 } 2196 2197 public CitationCitedArtifactComponent addClassification(CitationCitedArtifactClassificationComponent t) { //3 2198 if (t == null) 2199 return this; 2200 if (this.classification == null) 2201 this.classification = new ArrayList<CitationCitedArtifactClassificationComponent>(); 2202 this.classification.add(t); 2203 return this; 2204 } 2205 2206 /** 2207 * @return The first repetition of repeating field {@link #classification}, creating it if it does not already exist {3} 2208 */ 2209 public CitationCitedArtifactClassificationComponent getClassificationFirstRep() { 2210 if (getClassification().isEmpty()) { 2211 addClassification(); 2212 } 2213 return getClassification().get(0); 2214 } 2215 2216 /** 2217 * @return {@link #contributorship} (This element is used to list authors and other contributors, their contact information, specific contributions, and summary statements.) 2218 */ 2219 public CitationCitedArtifactContributorshipComponent getContributorship() { 2220 if (this.contributorship == null) 2221 if (Configuration.errorOnAutoCreate()) 2222 throw new Error("Attempt to auto-create CitationCitedArtifactComponent.contributorship"); 2223 else if (Configuration.doAutoCreate()) 2224 this.contributorship = new CitationCitedArtifactContributorshipComponent(); // cc 2225 return this.contributorship; 2226 } 2227 2228 public boolean hasContributorship() { 2229 return this.contributorship != null && !this.contributorship.isEmpty(); 2230 } 2231 2232 /** 2233 * @param value {@link #contributorship} (This element is used to list authors and other contributors, their contact information, specific contributions, and summary statements.) 2234 */ 2235 public CitationCitedArtifactComponent setContributorship(CitationCitedArtifactContributorshipComponent value) { 2236 this.contributorship = value; 2237 return this; 2238 } 2239 2240 /** 2241 * @return {@link #note} (Any additional information or content for the article or artifact.) 2242 */ 2243 public List<Annotation> getNote() { 2244 if (this.note == null) 2245 this.note = new ArrayList<Annotation>(); 2246 return this.note; 2247 } 2248 2249 /** 2250 * @return Returns a reference to <code>this</code> for easy method chaining 2251 */ 2252 public CitationCitedArtifactComponent setNote(List<Annotation> theNote) { 2253 this.note = theNote; 2254 return this; 2255 } 2256 2257 public boolean hasNote() { 2258 if (this.note == null) 2259 return false; 2260 for (Annotation item : this.note) 2261 if (!item.isEmpty()) 2262 return true; 2263 return false; 2264 } 2265 2266 public Annotation addNote() { //3 2267 Annotation t = new Annotation(); 2268 if (this.note == null) 2269 this.note = new ArrayList<Annotation>(); 2270 this.note.add(t); 2271 return t; 2272 } 2273 2274 public CitationCitedArtifactComponent addNote(Annotation t) { //3 2275 if (t == null) 2276 return this; 2277 if (this.note == null) 2278 this.note = new ArrayList<Annotation>(); 2279 this.note.add(t); 2280 return this; 2281 } 2282 2283 /** 2284 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3} 2285 */ 2286 public Annotation getNoteFirstRep() { 2287 if (getNote().isEmpty()) { 2288 addNote(); 2289 } 2290 return getNote().get(0); 2291 } 2292 2293 protected void listChildren(List<Property> children) { 2294 super.listChildren(children); 2295 children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify the cited artifact when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2296 children.add(new Property("relatedIdentifier", "Identifier", "A formal identifier that is used to identify things closely related to the cited artifact.", 0, java.lang.Integer.MAX_VALUE, relatedIdentifier)); 2297 children.add(new Property("dateAccessed", "dateTime", "When the cited artifact was accessed.", 0, 1, dateAccessed)); 2298 children.add(new Property("version", "", "The defined version of the cited artifact.", 0, 1, version)); 2299 children.add(new Property("currentState", "CodeableConcept", "The status of the cited artifact.", 0, java.lang.Integer.MAX_VALUE, currentState)); 2300 children.add(new Property("statusDate", "", "An effective date or period, historical or future, actual or expected, for a status of the cited artifact.", 0, java.lang.Integer.MAX_VALUE, statusDate)); 2301 children.add(new Property("title", "", "The title details of the article or artifact.", 0, java.lang.Integer.MAX_VALUE, title)); 2302 children.add(new Property("abstract", "", "The abstract may be used to convey article-contained abstracts, externally-created abstracts, or other descriptive summaries.", 0, java.lang.Integer.MAX_VALUE, abstract_)); 2303 children.add(new Property("part", "", "The component of the article or artifact.", 0, 1, part)); 2304 children.add(new Property("relatesTo", "", "The artifact related to the cited artifact.", 0, java.lang.Integer.MAX_VALUE, relatesTo)); 2305 children.add(new Property("publicationForm", "", "If multiple, used to represent alternative forms of the article that are not separate citations.", 0, java.lang.Integer.MAX_VALUE, publicationForm)); 2306 children.add(new Property("webLocation", "", "Used for any URL for the article or artifact cited.", 0, java.lang.Integer.MAX_VALUE, webLocation)); 2307 children.add(new Property("classification", "", "The assignment to an organizing scheme.", 0, java.lang.Integer.MAX_VALUE, classification)); 2308 children.add(new Property("contributorship", "", "This element is used to list authors and other contributors, their contact information, specific contributions, and summary statements.", 0, 1, contributorship)); 2309 children.add(new Property("note", "Annotation", "Any additional information or content for the article or artifact.", 0, java.lang.Integer.MAX_VALUE, note)); 2310 } 2311 2312 @Override 2313 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2314 switch (_hash) { 2315 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A formal identifier that is used to identify the cited artifact when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier); 2316 case -1007604940: /*relatedIdentifier*/ return new Property("relatedIdentifier", "Identifier", "A formal identifier that is used to identify things closely related to the cited artifact.", 0, java.lang.Integer.MAX_VALUE, relatedIdentifier); 2317 case 540917457: /*dateAccessed*/ return new Property("dateAccessed", "dateTime", "When the cited artifact was accessed.", 0, 1, dateAccessed); 2318 case 351608024: /*version*/ return new Property("version", "", "The defined version of the cited artifact.", 0, 1, version); 2319 case 1457822360: /*currentState*/ return new Property("currentState", "CodeableConcept", "The status of the cited artifact.", 0, java.lang.Integer.MAX_VALUE, currentState); 2320 case 247524032: /*statusDate*/ return new Property("statusDate", "", "An effective date or period, historical or future, actual or expected, for a status of the cited artifact.", 0, java.lang.Integer.MAX_VALUE, statusDate); 2321 case 110371416: /*title*/ return new Property("title", "", "The title details of the article or artifact.", 0, java.lang.Integer.MAX_VALUE, title); 2322 case 1732898850: /*abstract*/ return new Property("abstract", "", "The abstract may be used to convey article-contained abstracts, externally-created abstracts, or other descriptive summaries.", 0, java.lang.Integer.MAX_VALUE, abstract_); 2323 case 3433459: /*part*/ return new Property("part", "", "The component of the article or artifact.", 0, 1, part); 2324 case -7765931: /*relatesTo*/ return new Property("relatesTo", "", "The artifact related to the cited artifact.", 0, java.lang.Integer.MAX_VALUE, relatesTo); 2325 case 1470639376: /*publicationForm*/ return new Property("publicationForm", "", "If multiple, used to represent alternative forms of the article that are not separate citations.", 0, java.lang.Integer.MAX_VALUE, publicationForm); 2326 case -828032215: /*webLocation*/ return new Property("webLocation", "", "Used for any URL for the article or artifact cited.", 0, java.lang.Integer.MAX_VALUE, webLocation); 2327 case 382350310: /*classification*/ return new Property("classification", "", "The assignment to an organizing scheme.", 0, java.lang.Integer.MAX_VALUE, classification); 2328 case 538727831: /*contributorship*/ return new Property("contributorship", "", "This element is used to list authors and other contributors, their contact information, specific contributions, and summary statements.", 0, 1, contributorship); 2329 case 3387378: /*note*/ return new Property("note", "Annotation", "Any additional information or content for the article or artifact.", 0, java.lang.Integer.MAX_VALUE, note); 2330 default: return super.getNamedProperty(_hash, _name, _checkValid); 2331 } 2332 2333 } 2334 2335 @Override 2336 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2337 switch (hash) { 2338 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 2339 case -1007604940: /*relatedIdentifier*/ return this.relatedIdentifier == null ? new Base[0] : this.relatedIdentifier.toArray(new Base[this.relatedIdentifier.size()]); // Identifier 2340 case 540917457: /*dateAccessed*/ return this.dateAccessed == null ? new Base[0] : new Base[] {this.dateAccessed}; // DateTimeType 2341 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // CitationCitedArtifactVersionComponent 2342 case 1457822360: /*currentState*/ return this.currentState == null ? new Base[0] : this.currentState.toArray(new Base[this.currentState.size()]); // CodeableConcept 2343 case 247524032: /*statusDate*/ return this.statusDate == null ? new Base[0] : this.statusDate.toArray(new Base[this.statusDate.size()]); // CitationCitedArtifactStatusDateComponent 2344 case 110371416: /*title*/ return this.title == null ? new Base[0] : this.title.toArray(new Base[this.title.size()]); // CitationCitedArtifactTitleComponent 2345 case 1732898850: /*abstract*/ return this.abstract_ == null ? new Base[0] : this.abstract_.toArray(new Base[this.abstract_.size()]); // CitationCitedArtifactAbstractComponent 2346 case 3433459: /*part*/ return this.part == null ? new Base[0] : new Base[] {this.part}; // CitationCitedArtifactPartComponent 2347 case -7765931: /*relatesTo*/ return this.relatesTo == null ? new Base[0] : this.relatesTo.toArray(new Base[this.relatesTo.size()]); // CitationCitedArtifactRelatesToComponent 2348 case 1470639376: /*publicationForm*/ return this.publicationForm == null ? new Base[0] : this.publicationForm.toArray(new Base[this.publicationForm.size()]); // CitationCitedArtifactPublicationFormComponent 2349 case -828032215: /*webLocation*/ return this.webLocation == null ? new Base[0] : this.webLocation.toArray(new Base[this.webLocation.size()]); // CitationCitedArtifactWebLocationComponent 2350 case 382350310: /*classification*/ return this.classification == null ? new Base[0] : this.classification.toArray(new Base[this.classification.size()]); // CitationCitedArtifactClassificationComponent 2351 case 538727831: /*contributorship*/ return this.contributorship == null ? new Base[0] : new Base[] {this.contributorship}; // CitationCitedArtifactContributorshipComponent 2352 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 2353 default: return super.getProperty(hash, name, checkValid); 2354 } 2355 2356 } 2357 2358 @Override 2359 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2360 switch (hash) { 2361 case -1618432855: // identifier 2362 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 2363 return value; 2364 case -1007604940: // relatedIdentifier 2365 this.getRelatedIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 2366 return value; 2367 case 540917457: // dateAccessed 2368 this.dateAccessed = TypeConvertor.castToDateTime(value); // DateTimeType 2369 return value; 2370 case 351608024: // version 2371 this.version = (CitationCitedArtifactVersionComponent) value; // CitationCitedArtifactVersionComponent 2372 return value; 2373 case 1457822360: // currentState 2374 this.getCurrentState().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 2375 return value; 2376 case 247524032: // statusDate 2377 this.getStatusDate().add((CitationCitedArtifactStatusDateComponent) value); // CitationCitedArtifactStatusDateComponent 2378 return value; 2379 case 110371416: // title 2380 this.getTitle().add((CitationCitedArtifactTitleComponent) value); // CitationCitedArtifactTitleComponent 2381 return value; 2382 case 1732898850: // abstract 2383 this.getAbstract().add((CitationCitedArtifactAbstractComponent) value); // CitationCitedArtifactAbstractComponent 2384 return value; 2385 case 3433459: // part 2386 this.part = (CitationCitedArtifactPartComponent) value; // CitationCitedArtifactPartComponent 2387 return value; 2388 case -7765931: // relatesTo 2389 this.getRelatesTo().add((CitationCitedArtifactRelatesToComponent) value); // CitationCitedArtifactRelatesToComponent 2390 return value; 2391 case 1470639376: // publicationForm 2392 this.getPublicationForm().add((CitationCitedArtifactPublicationFormComponent) value); // CitationCitedArtifactPublicationFormComponent 2393 return value; 2394 case -828032215: // webLocation 2395 this.getWebLocation().add((CitationCitedArtifactWebLocationComponent) value); // CitationCitedArtifactWebLocationComponent 2396 return value; 2397 case 382350310: // classification 2398 this.getClassification().add((CitationCitedArtifactClassificationComponent) value); // CitationCitedArtifactClassificationComponent 2399 return value; 2400 case 538727831: // contributorship 2401 this.contributorship = (CitationCitedArtifactContributorshipComponent) value; // CitationCitedArtifactContributorshipComponent 2402 return value; 2403 case 3387378: // note 2404 this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation 2405 return value; 2406 default: return super.setProperty(hash, name, value); 2407 } 2408 2409 } 2410 2411 @Override 2412 public Base setProperty(String name, Base value) throws FHIRException { 2413 if (name.equals("identifier")) { 2414 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 2415 } else if (name.equals("relatedIdentifier")) { 2416 this.getRelatedIdentifier().add(TypeConvertor.castToIdentifier(value)); 2417 } else if (name.equals("dateAccessed")) { 2418 this.dateAccessed = TypeConvertor.castToDateTime(value); // DateTimeType 2419 } else if (name.equals("version")) { 2420 this.version = (CitationCitedArtifactVersionComponent) value; // CitationCitedArtifactVersionComponent 2421 } else if (name.equals("currentState")) { 2422 this.getCurrentState().add(TypeConvertor.castToCodeableConcept(value)); 2423 } else if (name.equals("statusDate")) { 2424 this.getStatusDate().add((CitationCitedArtifactStatusDateComponent) value); 2425 } else if (name.equals("title")) { 2426 this.getTitle().add((CitationCitedArtifactTitleComponent) value); 2427 } else if (name.equals("abstract")) { 2428 this.getAbstract().add((CitationCitedArtifactAbstractComponent) value); 2429 } else if (name.equals("part")) { 2430 this.part = (CitationCitedArtifactPartComponent) value; // CitationCitedArtifactPartComponent 2431 } else if (name.equals("relatesTo")) { 2432 this.getRelatesTo().add((CitationCitedArtifactRelatesToComponent) value); 2433 } else if (name.equals("publicationForm")) { 2434 this.getPublicationForm().add((CitationCitedArtifactPublicationFormComponent) value); 2435 } else if (name.equals("webLocation")) { 2436 this.getWebLocation().add((CitationCitedArtifactWebLocationComponent) value); 2437 } else if (name.equals("classification")) { 2438 this.getClassification().add((CitationCitedArtifactClassificationComponent) value); 2439 } else if (name.equals("contributorship")) { 2440 this.contributorship = (CitationCitedArtifactContributorshipComponent) value; // CitationCitedArtifactContributorshipComponent 2441 } else if (name.equals("note")) { 2442 this.getNote().add(TypeConvertor.castToAnnotation(value)); 2443 } else 2444 return super.setProperty(name, value); 2445 return value; 2446 } 2447 2448 @Override 2449 public Base makeProperty(int hash, String name) throws FHIRException { 2450 switch (hash) { 2451 case -1618432855: return addIdentifier(); 2452 case -1007604940: return addRelatedIdentifier(); 2453 case 540917457: return getDateAccessedElement(); 2454 case 351608024: return getVersion(); 2455 case 1457822360: return addCurrentState(); 2456 case 247524032: return addStatusDate(); 2457 case 110371416: return addTitle(); 2458 case 1732898850: return addAbstract(); 2459 case 3433459: return getPart(); 2460 case -7765931: return addRelatesTo(); 2461 case 1470639376: return addPublicationForm(); 2462 case -828032215: return addWebLocation(); 2463 case 382350310: return addClassification(); 2464 case 538727831: return getContributorship(); 2465 case 3387378: return addNote(); 2466 default: return super.makeProperty(hash, name); 2467 } 2468 2469 } 2470 2471 @Override 2472 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2473 switch (hash) { 2474 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2475 case -1007604940: /*relatedIdentifier*/ return new String[] {"Identifier"}; 2476 case 540917457: /*dateAccessed*/ return new String[] {"dateTime"}; 2477 case 351608024: /*version*/ return new String[] {}; 2478 case 1457822360: /*currentState*/ return new String[] {"CodeableConcept"}; 2479 case 247524032: /*statusDate*/ return new String[] {}; 2480 case 110371416: /*title*/ return new String[] {}; 2481 case 1732898850: /*abstract*/ return new String[] {}; 2482 case 3433459: /*part*/ return new String[] {}; 2483 case -7765931: /*relatesTo*/ return new String[] {}; 2484 case 1470639376: /*publicationForm*/ return new String[] {}; 2485 case -828032215: /*webLocation*/ return new String[] {}; 2486 case 382350310: /*classification*/ return new String[] {}; 2487 case 538727831: /*contributorship*/ return new String[] {}; 2488 case 3387378: /*note*/ return new String[] {"Annotation"}; 2489 default: return super.getTypesForProperty(hash, name); 2490 } 2491 2492 } 2493 2494 @Override 2495 public Base addChild(String name) throws FHIRException { 2496 if (name.equals("identifier")) { 2497 return addIdentifier(); 2498 } 2499 else if (name.equals("relatedIdentifier")) { 2500 return addRelatedIdentifier(); 2501 } 2502 else if (name.equals("dateAccessed")) { 2503 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.dateAccessed"); 2504 } 2505 else if (name.equals("version")) { 2506 this.version = new CitationCitedArtifactVersionComponent(); 2507 return this.version; 2508 } 2509 else if (name.equals("currentState")) { 2510 return addCurrentState(); 2511 } 2512 else if (name.equals("statusDate")) { 2513 return addStatusDate(); 2514 } 2515 else if (name.equals("title")) { 2516 return addTitle(); 2517 } 2518 else if (name.equals("abstract")) { 2519 return addAbstract(); 2520 } 2521 else if (name.equals("part")) { 2522 this.part = new CitationCitedArtifactPartComponent(); 2523 return this.part; 2524 } 2525 else if (name.equals("relatesTo")) { 2526 return addRelatesTo(); 2527 } 2528 else if (name.equals("publicationForm")) { 2529 return addPublicationForm(); 2530 } 2531 else if (name.equals("webLocation")) { 2532 return addWebLocation(); 2533 } 2534 else if (name.equals("classification")) { 2535 return addClassification(); 2536 } 2537 else if (name.equals("contributorship")) { 2538 this.contributorship = new CitationCitedArtifactContributorshipComponent(); 2539 return this.contributorship; 2540 } 2541 else if (name.equals("note")) { 2542 return addNote(); 2543 } 2544 else 2545 return super.addChild(name); 2546 } 2547 2548 public CitationCitedArtifactComponent copy() { 2549 CitationCitedArtifactComponent dst = new CitationCitedArtifactComponent(); 2550 copyValues(dst); 2551 return dst; 2552 } 2553 2554 public void copyValues(CitationCitedArtifactComponent dst) { 2555 super.copyValues(dst); 2556 if (identifier != null) { 2557 dst.identifier = new ArrayList<Identifier>(); 2558 for (Identifier i : identifier) 2559 dst.identifier.add(i.copy()); 2560 }; 2561 if (relatedIdentifier != null) { 2562 dst.relatedIdentifier = new ArrayList<Identifier>(); 2563 for (Identifier i : relatedIdentifier) 2564 dst.relatedIdentifier.add(i.copy()); 2565 }; 2566 dst.dateAccessed = dateAccessed == null ? null : dateAccessed.copy(); 2567 dst.version = version == null ? null : version.copy(); 2568 if (currentState != null) { 2569 dst.currentState = new ArrayList<CodeableConcept>(); 2570 for (CodeableConcept i : currentState) 2571 dst.currentState.add(i.copy()); 2572 }; 2573 if (statusDate != null) { 2574 dst.statusDate = new ArrayList<CitationCitedArtifactStatusDateComponent>(); 2575 for (CitationCitedArtifactStatusDateComponent i : statusDate) 2576 dst.statusDate.add(i.copy()); 2577 }; 2578 if (title != null) { 2579 dst.title = new ArrayList<CitationCitedArtifactTitleComponent>(); 2580 for (CitationCitedArtifactTitleComponent i : title) 2581 dst.title.add(i.copy()); 2582 }; 2583 if (abstract_ != null) { 2584 dst.abstract_ = new ArrayList<CitationCitedArtifactAbstractComponent>(); 2585 for (CitationCitedArtifactAbstractComponent i : abstract_) 2586 dst.abstract_.add(i.copy()); 2587 }; 2588 dst.part = part == null ? null : part.copy(); 2589 if (relatesTo != null) { 2590 dst.relatesTo = new ArrayList<CitationCitedArtifactRelatesToComponent>(); 2591 for (CitationCitedArtifactRelatesToComponent i : relatesTo) 2592 dst.relatesTo.add(i.copy()); 2593 }; 2594 if (publicationForm != null) { 2595 dst.publicationForm = new ArrayList<CitationCitedArtifactPublicationFormComponent>(); 2596 for (CitationCitedArtifactPublicationFormComponent i : publicationForm) 2597 dst.publicationForm.add(i.copy()); 2598 }; 2599 if (webLocation != null) { 2600 dst.webLocation = new ArrayList<CitationCitedArtifactWebLocationComponent>(); 2601 for (CitationCitedArtifactWebLocationComponent i : webLocation) 2602 dst.webLocation.add(i.copy()); 2603 }; 2604 if (classification != null) { 2605 dst.classification = new ArrayList<CitationCitedArtifactClassificationComponent>(); 2606 for (CitationCitedArtifactClassificationComponent i : classification) 2607 dst.classification.add(i.copy()); 2608 }; 2609 dst.contributorship = contributorship == null ? null : contributorship.copy(); 2610 if (note != null) { 2611 dst.note = new ArrayList<Annotation>(); 2612 for (Annotation i : note) 2613 dst.note.add(i.copy()); 2614 }; 2615 } 2616 2617 @Override 2618 public boolean equalsDeep(Base other_) { 2619 if (!super.equalsDeep(other_)) 2620 return false; 2621 if (!(other_ instanceof CitationCitedArtifactComponent)) 2622 return false; 2623 CitationCitedArtifactComponent o = (CitationCitedArtifactComponent) other_; 2624 return compareDeep(identifier, o.identifier, true) && compareDeep(relatedIdentifier, o.relatedIdentifier, true) 2625 && compareDeep(dateAccessed, o.dateAccessed, true) && compareDeep(version, o.version, true) && compareDeep(currentState, o.currentState, true) 2626 && compareDeep(statusDate, o.statusDate, true) && compareDeep(title, o.title, true) && compareDeep(abstract_, o.abstract_, true) 2627 && compareDeep(part, o.part, true) && compareDeep(relatesTo, o.relatesTo, true) && compareDeep(publicationForm, o.publicationForm, true) 2628 && compareDeep(webLocation, o.webLocation, true) && compareDeep(classification, o.classification, true) 2629 && compareDeep(contributorship, o.contributorship, true) && compareDeep(note, o.note, true); 2630 } 2631 2632 @Override 2633 public boolean equalsShallow(Base other_) { 2634 if (!super.equalsShallow(other_)) 2635 return false; 2636 if (!(other_ instanceof CitationCitedArtifactComponent)) 2637 return false; 2638 CitationCitedArtifactComponent o = (CitationCitedArtifactComponent) other_; 2639 return compareValues(dateAccessed, o.dateAccessed, true); 2640 } 2641 2642 public boolean isEmpty() { 2643 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, relatedIdentifier 2644 , dateAccessed, version, currentState, statusDate, title, abstract_, part, relatesTo 2645 , publicationForm, webLocation, classification, contributorship, note); 2646 } 2647 2648 public String fhirType() { 2649 return "Citation.citedArtifact"; 2650 2651 } 2652 2653 } 2654 2655 @Block() 2656 public static class CitationCitedArtifactVersionComponent extends BackboneElement implements IBaseBackboneElement { 2657 /** 2658 * The version number or other version identifier. 2659 */ 2660 @Child(name = "value", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 2661 @Description(shortDefinition="The version number or other version identifier", formalDefinition="The version number or other version identifier." ) 2662 protected StringType value; 2663 2664 /** 2665 * Citation for the main version of the cited artifact. 2666 */ 2667 @Child(name = "baseCitation", type = {Citation.class}, order=2, min=0, max=1, modifier=false, summary=false) 2668 @Description(shortDefinition="Citation for the main version of the cited artifact", formalDefinition="Citation for the main version of the cited artifact." ) 2669 protected Reference baseCitation; 2670 2671 private static final long serialVersionUID = 1437090319L; 2672 2673 /** 2674 * Constructor 2675 */ 2676 public CitationCitedArtifactVersionComponent() { 2677 super(); 2678 } 2679 2680 /** 2681 * Constructor 2682 */ 2683 public CitationCitedArtifactVersionComponent(String value) { 2684 super(); 2685 this.setValue(value); 2686 } 2687 2688 /** 2689 * @return {@link #value} (The version number or other version identifier.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 2690 */ 2691 public StringType getValueElement() { 2692 if (this.value == null) 2693 if (Configuration.errorOnAutoCreate()) 2694 throw new Error("Attempt to auto-create CitationCitedArtifactVersionComponent.value"); 2695 else if (Configuration.doAutoCreate()) 2696 this.value = new StringType(); // bb 2697 return this.value; 2698 } 2699 2700 public boolean hasValueElement() { 2701 return this.value != null && !this.value.isEmpty(); 2702 } 2703 2704 public boolean hasValue() { 2705 return this.value != null && !this.value.isEmpty(); 2706 } 2707 2708 /** 2709 * @param value {@link #value} (The version number or other version identifier.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 2710 */ 2711 public CitationCitedArtifactVersionComponent setValueElement(StringType value) { 2712 this.value = value; 2713 return this; 2714 } 2715 2716 /** 2717 * @return The version number or other version identifier. 2718 */ 2719 public String getValue() { 2720 return this.value == null ? null : this.value.getValue(); 2721 } 2722 2723 /** 2724 * @param value The version number or other version identifier. 2725 */ 2726 public CitationCitedArtifactVersionComponent setValue(String value) { 2727 if (this.value == null) 2728 this.value = new StringType(); 2729 this.value.setValue(value); 2730 return this; 2731 } 2732 2733 /** 2734 * @return {@link #baseCitation} (Citation for the main version of the cited artifact.) 2735 */ 2736 public Reference getBaseCitation() { 2737 if (this.baseCitation == null) 2738 if (Configuration.errorOnAutoCreate()) 2739 throw new Error("Attempt to auto-create CitationCitedArtifactVersionComponent.baseCitation"); 2740 else if (Configuration.doAutoCreate()) 2741 this.baseCitation = new Reference(); // cc 2742 return this.baseCitation; 2743 } 2744 2745 public boolean hasBaseCitation() { 2746 return this.baseCitation != null && !this.baseCitation.isEmpty(); 2747 } 2748 2749 /** 2750 * @param value {@link #baseCitation} (Citation for the main version of the cited artifact.) 2751 */ 2752 public CitationCitedArtifactVersionComponent setBaseCitation(Reference value) { 2753 this.baseCitation = value; 2754 return this; 2755 } 2756 2757 protected void listChildren(List<Property> children) { 2758 super.listChildren(children); 2759 children.add(new Property("value", "string", "The version number or other version identifier.", 0, 1, value)); 2760 children.add(new Property("baseCitation", "Reference(Citation)", "Citation for the main version of the cited artifact.", 0, 1, baseCitation)); 2761 } 2762 2763 @Override 2764 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2765 switch (_hash) { 2766 case 111972721: /*value*/ return new Property("value", "string", "The version number or other version identifier.", 0, 1, value); 2767 case 1182995672: /*baseCitation*/ return new Property("baseCitation", "Reference(Citation)", "Citation for the main version of the cited artifact.", 0, 1, baseCitation); 2768 default: return super.getNamedProperty(_hash, _name, _checkValid); 2769 } 2770 2771 } 2772 2773 @Override 2774 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2775 switch (hash) { 2776 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 2777 case 1182995672: /*baseCitation*/ return this.baseCitation == null ? new Base[0] : new Base[] {this.baseCitation}; // Reference 2778 default: return super.getProperty(hash, name, checkValid); 2779 } 2780 2781 } 2782 2783 @Override 2784 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2785 switch (hash) { 2786 case 111972721: // value 2787 this.value = TypeConvertor.castToString(value); // StringType 2788 return value; 2789 case 1182995672: // baseCitation 2790 this.baseCitation = TypeConvertor.castToReference(value); // Reference 2791 return value; 2792 default: return super.setProperty(hash, name, value); 2793 } 2794 2795 } 2796 2797 @Override 2798 public Base setProperty(String name, Base value) throws FHIRException { 2799 if (name.equals("value")) { 2800 this.value = TypeConvertor.castToString(value); // StringType 2801 } else if (name.equals("baseCitation")) { 2802 this.baseCitation = TypeConvertor.castToReference(value); // Reference 2803 } else 2804 return super.setProperty(name, value); 2805 return value; 2806 } 2807 2808 @Override 2809 public Base makeProperty(int hash, String name) throws FHIRException { 2810 switch (hash) { 2811 case 111972721: return getValueElement(); 2812 case 1182995672: return getBaseCitation(); 2813 default: return super.makeProperty(hash, name); 2814 } 2815 2816 } 2817 2818 @Override 2819 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2820 switch (hash) { 2821 case 111972721: /*value*/ return new String[] {"string"}; 2822 case 1182995672: /*baseCitation*/ return new String[] {"Reference"}; 2823 default: return super.getTypesForProperty(hash, name); 2824 } 2825 2826 } 2827 2828 @Override 2829 public Base addChild(String name) throws FHIRException { 2830 if (name.equals("value")) { 2831 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.version.value"); 2832 } 2833 else if (name.equals("baseCitation")) { 2834 this.baseCitation = new Reference(); 2835 return this.baseCitation; 2836 } 2837 else 2838 return super.addChild(name); 2839 } 2840 2841 public CitationCitedArtifactVersionComponent copy() { 2842 CitationCitedArtifactVersionComponent dst = new CitationCitedArtifactVersionComponent(); 2843 copyValues(dst); 2844 return dst; 2845 } 2846 2847 public void copyValues(CitationCitedArtifactVersionComponent dst) { 2848 super.copyValues(dst); 2849 dst.value = value == null ? null : value.copy(); 2850 dst.baseCitation = baseCitation == null ? null : baseCitation.copy(); 2851 } 2852 2853 @Override 2854 public boolean equalsDeep(Base other_) { 2855 if (!super.equalsDeep(other_)) 2856 return false; 2857 if (!(other_ instanceof CitationCitedArtifactVersionComponent)) 2858 return false; 2859 CitationCitedArtifactVersionComponent o = (CitationCitedArtifactVersionComponent) other_; 2860 return compareDeep(value, o.value, true) && compareDeep(baseCitation, o.baseCitation, true); 2861 } 2862 2863 @Override 2864 public boolean equalsShallow(Base other_) { 2865 if (!super.equalsShallow(other_)) 2866 return false; 2867 if (!(other_ instanceof CitationCitedArtifactVersionComponent)) 2868 return false; 2869 CitationCitedArtifactVersionComponent o = (CitationCitedArtifactVersionComponent) other_; 2870 return compareValues(value, o.value, true); 2871 } 2872 2873 public boolean isEmpty() { 2874 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(value, baseCitation); 2875 } 2876 2877 public String fhirType() { 2878 return "Citation.citedArtifact.version"; 2879 2880 } 2881 2882 } 2883 2884 @Block() 2885 public static class CitationCitedArtifactStatusDateComponent extends BackboneElement implements IBaseBackboneElement { 2886 /** 2887 * A definition of the status associated with a date or period. 2888 */ 2889 @Child(name = "activity", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 2890 @Description(shortDefinition="Classification of the status", formalDefinition="A definition of the status associated with a date or period." ) 2891 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/cited-artifact-status-type") 2892 protected CodeableConcept activity; 2893 2894 /** 2895 * Either occurred or expected. 2896 */ 2897 @Child(name = "actual", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2898 @Description(shortDefinition="Either occurred or expected", formalDefinition="Either occurred or expected." ) 2899 protected BooleanType actual; 2900 2901 /** 2902 * When the status started and/or ended. 2903 */ 2904 @Child(name = "period", type = {Period.class}, order=3, min=1, max=1, modifier=false, summary=false) 2905 @Description(shortDefinition="When the status started and/or ended", formalDefinition="When the status started and/or ended." ) 2906 protected Period period; 2907 2908 private static final long serialVersionUID = 1123586924L; 2909 2910 /** 2911 * Constructor 2912 */ 2913 public CitationCitedArtifactStatusDateComponent() { 2914 super(); 2915 } 2916 2917 /** 2918 * Constructor 2919 */ 2920 public CitationCitedArtifactStatusDateComponent(CodeableConcept activity, Period period) { 2921 super(); 2922 this.setActivity(activity); 2923 this.setPeriod(period); 2924 } 2925 2926 /** 2927 * @return {@link #activity} (A definition of the status associated with a date or period.) 2928 */ 2929 public CodeableConcept getActivity() { 2930 if (this.activity == null) 2931 if (Configuration.errorOnAutoCreate()) 2932 throw new Error("Attempt to auto-create CitationCitedArtifactStatusDateComponent.activity"); 2933 else if (Configuration.doAutoCreate()) 2934 this.activity = new CodeableConcept(); // cc 2935 return this.activity; 2936 } 2937 2938 public boolean hasActivity() { 2939 return this.activity != null && !this.activity.isEmpty(); 2940 } 2941 2942 /** 2943 * @param value {@link #activity} (A definition of the status associated with a date or period.) 2944 */ 2945 public CitationCitedArtifactStatusDateComponent setActivity(CodeableConcept value) { 2946 this.activity = value; 2947 return this; 2948 } 2949 2950 /** 2951 * @return {@link #actual} (Either occurred or expected.). This is the underlying object with id, value and extensions. The accessor "getActual" gives direct access to the value 2952 */ 2953 public BooleanType getActualElement() { 2954 if (this.actual == null) 2955 if (Configuration.errorOnAutoCreate()) 2956 throw new Error("Attempt to auto-create CitationCitedArtifactStatusDateComponent.actual"); 2957 else if (Configuration.doAutoCreate()) 2958 this.actual = new BooleanType(); // bb 2959 return this.actual; 2960 } 2961 2962 public boolean hasActualElement() { 2963 return this.actual != null && !this.actual.isEmpty(); 2964 } 2965 2966 public boolean hasActual() { 2967 return this.actual != null && !this.actual.isEmpty(); 2968 } 2969 2970 /** 2971 * @param value {@link #actual} (Either occurred or expected.). This is the underlying object with id, value and extensions. The accessor "getActual" gives direct access to the value 2972 */ 2973 public CitationCitedArtifactStatusDateComponent setActualElement(BooleanType value) { 2974 this.actual = value; 2975 return this; 2976 } 2977 2978 /** 2979 * @return Either occurred or expected. 2980 */ 2981 public boolean getActual() { 2982 return this.actual == null || this.actual.isEmpty() ? false : this.actual.getValue(); 2983 } 2984 2985 /** 2986 * @param value Either occurred or expected. 2987 */ 2988 public CitationCitedArtifactStatusDateComponent setActual(boolean value) { 2989 if (this.actual == null) 2990 this.actual = new BooleanType(); 2991 this.actual.setValue(value); 2992 return this; 2993 } 2994 2995 /** 2996 * @return {@link #period} (When the status started and/or ended.) 2997 */ 2998 public Period getPeriod() { 2999 if (this.period == null) 3000 if (Configuration.errorOnAutoCreate()) 3001 throw new Error("Attempt to auto-create CitationCitedArtifactStatusDateComponent.period"); 3002 else if (Configuration.doAutoCreate()) 3003 this.period = new Period(); // cc 3004 return this.period; 3005 } 3006 3007 public boolean hasPeriod() { 3008 return this.period != null && !this.period.isEmpty(); 3009 } 3010 3011 /** 3012 * @param value {@link #period} (When the status started and/or ended.) 3013 */ 3014 public CitationCitedArtifactStatusDateComponent setPeriod(Period value) { 3015 this.period = value; 3016 return this; 3017 } 3018 3019 protected void listChildren(List<Property> children) { 3020 super.listChildren(children); 3021 children.add(new Property("activity", "CodeableConcept", "A definition of the status associated with a date or period.", 0, 1, activity)); 3022 children.add(new Property("actual", "boolean", "Either occurred or expected.", 0, 1, actual)); 3023 children.add(new Property("period", "Period", "When the status started and/or ended.", 0, 1, period)); 3024 } 3025 3026 @Override 3027 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3028 switch (_hash) { 3029 case -1655966961: /*activity*/ return new Property("activity", "CodeableConcept", "A definition of the status associated with a date or period.", 0, 1, activity); 3030 case -1422939762: /*actual*/ return new Property("actual", "boolean", "Either occurred or expected.", 0, 1, actual); 3031 case -991726143: /*period*/ return new Property("period", "Period", "When the status started and/or ended.", 0, 1, period); 3032 default: return super.getNamedProperty(_hash, _name, _checkValid); 3033 } 3034 3035 } 3036 3037 @Override 3038 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3039 switch (hash) { 3040 case -1655966961: /*activity*/ return this.activity == null ? new Base[0] : new Base[] {this.activity}; // CodeableConcept 3041 case -1422939762: /*actual*/ return this.actual == null ? new Base[0] : new Base[] {this.actual}; // BooleanType 3042 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 3043 default: return super.getProperty(hash, name, checkValid); 3044 } 3045 3046 } 3047 3048 @Override 3049 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3050 switch (hash) { 3051 case -1655966961: // activity 3052 this.activity = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3053 return value; 3054 case -1422939762: // actual 3055 this.actual = TypeConvertor.castToBoolean(value); // BooleanType 3056 return value; 3057 case -991726143: // period 3058 this.period = TypeConvertor.castToPeriod(value); // Period 3059 return value; 3060 default: return super.setProperty(hash, name, value); 3061 } 3062 3063 } 3064 3065 @Override 3066 public Base setProperty(String name, Base value) throws FHIRException { 3067 if (name.equals("activity")) { 3068 this.activity = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3069 } else if (name.equals("actual")) { 3070 this.actual = TypeConvertor.castToBoolean(value); // BooleanType 3071 } else if (name.equals("period")) { 3072 this.period = TypeConvertor.castToPeriod(value); // Period 3073 } else 3074 return super.setProperty(name, value); 3075 return value; 3076 } 3077 3078 @Override 3079 public Base makeProperty(int hash, String name) throws FHIRException { 3080 switch (hash) { 3081 case -1655966961: return getActivity(); 3082 case -1422939762: return getActualElement(); 3083 case -991726143: return getPeriod(); 3084 default: return super.makeProperty(hash, name); 3085 } 3086 3087 } 3088 3089 @Override 3090 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3091 switch (hash) { 3092 case -1655966961: /*activity*/ return new String[] {"CodeableConcept"}; 3093 case -1422939762: /*actual*/ return new String[] {"boolean"}; 3094 case -991726143: /*period*/ return new String[] {"Period"}; 3095 default: return super.getTypesForProperty(hash, name); 3096 } 3097 3098 } 3099 3100 @Override 3101 public Base addChild(String name) throws FHIRException { 3102 if (name.equals("activity")) { 3103 this.activity = new CodeableConcept(); 3104 return this.activity; 3105 } 3106 else if (name.equals("actual")) { 3107 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.statusDate.actual"); 3108 } 3109 else if (name.equals("period")) { 3110 this.period = new Period(); 3111 return this.period; 3112 } 3113 else 3114 return super.addChild(name); 3115 } 3116 3117 public CitationCitedArtifactStatusDateComponent copy() { 3118 CitationCitedArtifactStatusDateComponent dst = new CitationCitedArtifactStatusDateComponent(); 3119 copyValues(dst); 3120 return dst; 3121 } 3122 3123 public void copyValues(CitationCitedArtifactStatusDateComponent dst) { 3124 super.copyValues(dst); 3125 dst.activity = activity == null ? null : activity.copy(); 3126 dst.actual = actual == null ? null : actual.copy(); 3127 dst.period = period == null ? null : period.copy(); 3128 } 3129 3130 @Override 3131 public boolean equalsDeep(Base other_) { 3132 if (!super.equalsDeep(other_)) 3133 return false; 3134 if (!(other_ instanceof CitationCitedArtifactStatusDateComponent)) 3135 return false; 3136 CitationCitedArtifactStatusDateComponent o = (CitationCitedArtifactStatusDateComponent) other_; 3137 return compareDeep(activity, o.activity, true) && compareDeep(actual, o.actual, true) && compareDeep(period, o.period, true) 3138 ; 3139 } 3140 3141 @Override 3142 public boolean equalsShallow(Base other_) { 3143 if (!super.equalsShallow(other_)) 3144 return false; 3145 if (!(other_ instanceof CitationCitedArtifactStatusDateComponent)) 3146 return false; 3147 CitationCitedArtifactStatusDateComponent o = (CitationCitedArtifactStatusDateComponent) other_; 3148 return compareValues(actual, o.actual, true); 3149 } 3150 3151 public boolean isEmpty() { 3152 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(activity, actual, period 3153 ); 3154 } 3155 3156 public String fhirType() { 3157 return "Citation.citedArtifact.statusDate"; 3158 3159 } 3160 3161 } 3162 3163 @Block() 3164 public static class CitationCitedArtifactTitleComponent extends BackboneElement implements IBaseBackboneElement { 3165 /** 3166 * Used to express the reason for or classification of the title. 3167 */ 3168 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3169 @Description(shortDefinition="The kind of title", formalDefinition="Used to express the reason for or classification of the title." ) 3170 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/title-type") 3171 protected List<CodeableConcept> type; 3172 3173 /** 3174 * Used to express the specific language of the title. 3175 */ 3176 @Child(name = "language", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 3177 @Description(shortDefinition="Used to express the specific language", formalDefinition="Used to express the specific language of the title." ) 3178 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/languages") 3179 protected CodeableConcept language; 3180 3181 /** 3182 * The title of the article or artifact. 3183 */ 3184 @Child(name = "text", type = {MarkdownType.class}, order=3, min=1, max=1, modifier=false, summary=false) 3185 @Description(shortDefinition="The title of the article or artifact", formalDefinition="The title of the article or artifact." ) 3186 protected MarkdownType text; 3187 3188 private static final long serialVersionUID = 1526221998L; 3189 3190 /** 3191 * Constructor 3192 */ 3193 public CitationCitedArtifactTitleComponent() { 3194 super(); 3195 } 3196 3197 /** 3198 * Constructor 3199 */ 3200 public CitationCitedArtifactTitleComponent(String text) { 3201 super(); 3202 this.setText(text); 3203 } 3204 3205 /** 3206 * @return {@link #type} (Used to express the reason for or classification of the title.) 3207 */ 3208 public List<CodeableConcept> getType() { 3209 if (this.type == null) 3210 this.type = new ArrayList<CodeableConcept>(); 3211 return this.type; 3212 } 3213 3214 /** 3215 * @return Returns a reference to <code>this</code> for easy method chaining 3216 */ 3217 public CitationCitedArtifactTitleComponent setType(List<CodeableConcept> theType) { 3218 this.type = theType; 3219 return this; 3220 } 3221 3222 public boolean hasType() { 3223 if (this.type == null) 3224 return false; 3225 for (CodeableConcept item : this.type) 3226 if (!item.isEmpty()) 3227 return true; 3228 return false; 3229 } 3230 3231 public CodeableConcept addType() { //3 3232 CodeableConcept t = new CodeableConcept(); 3233 if (this.type == null) 3234 this.type = new ArrayList<CodeableConcept>(); 3235 this.type.add(t); 3236 return t; 3237 } 3238 3239 public CitationCitedArtifactTitleComponent addType(CodeableConcept t) { //3 3240 if (t == null) 3241 return this; 3242 if (this.type == null) 3243 this.type = new ArrayList<CodeableConcept>(); 3244 this.type.add(t); 3245 return this; 3246 } 3247 3248 /** 3249 * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} 3250 */ 3251 public CodeableConcept getTypeFirstRep() { 3252 if (getType().isEmpty()) { 3253 addType(); 3254 } 3255 return getType().get(0); 3256 } 3257 3258 /** 3259 * @return {@link #language} (Used to express the specific language of the title.) 3260 */ 3261 public CodeableConcept getLanguage() { 3262 if (this.language == null) 3263 if (Configuration.errorOnAutoCreate()) 3264 throw new Error("Attempt to auto-create CitationCitedArtifactTitleComponent.language"); 3265 else if (Configuration.doAutoCreate()) 3266 this.language = new CodeableConcept(); // cc 3267 return this.language; 3268 } 3269 3270 public boolean hasLanguage() { 3271 return this.language != null && !this.language.isEmpty(); 3272 } 3273 3274 /** 3275 * @param value {@link #language} (Used to express the specific language of the title.) 3276 */ 3277 public CitationCitedArtifactTitleComponent setLanguage(CodeableConcept value) { 3278 this.language = value; 3279 return this; 3280 } 3281 3282 /** 3283 * @return {@link #text} (The title of the article or artifact.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 3284 */ 3285 public MarkdownType getTextElement() { 3286 if (this.text == null) 3287 if (Configuration.errorOnAutoCreate()) 3288 throw new Error("Attempt to auto-create CitationCitedArtifactTitleComponent.text"); 3289 else if (Configuration.doAutoCreate()) 3290 this.text = new MarkdownType(); // bb 3291 return this.text; 3292 } 3293 3294 public boolean hasTextElement() { 3295 return this.text != null && !this.text.isEmpty(); 3296 } 3297 3298 public boolean hasText() { 3299 return this.text != null && !this.text.isEmpty(); 3300 } 3301 3302 /** 3303 * @param value {@link #text} (The title of the article or artifact.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 3304 */ 3305 public CitationCitedArtifactTitleComponent setTextElement(MarkdownType value) { 3306 this.text = value; 3307 return this; 3308 } 3309 3310 /** 3311 * @return The title of the article or artifact. 3312 */ 3313 public String getText() { 3314 return this.text == null ? null : this.text.getValue(); 3315 } 3316 3317 /** 3318 * @param value The title of the article or artifact. 3319 */ 3320 public CitationCitedArtifactTitleComponent setText(String value) { 3321 if (this.text == null) 3322 this.text = new MarkdownType(); 3323 this.text.setValue(value); 3324 return this; 3325 } 3326 3327 protected void listChildren(List<Property> children) { 3328 super.listChildren(children); 3329 children.add(new Property("type", "CodeableConcept", "Used to express the reason for or classification of the title.", 0, java.lang.Integer.MAX_VALUE, type)); 3330 children.add(new Property("language", "CodeableConcept", "Used to express the specific language of the title.", 0, 1, language)); 3331 children.add(new Property("text", "markdown", "The title of the article or artifact.", 0, 1, text)); 3332 } 3333 3334 @Override 3335 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3336 switch (_hash) { 3337 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Used to express the reason for or classification of the title.", 0, java.lang.Integer.MAX_VALUE, type); 3338 case -1613589672: /*language*/ return new Property("language", "CodeableConcept", "Used to express the specific language of the title.", 0, 1, language); 3339 case 3556653: /*text*/ return new Property("text", "markdown", "The title of the article or artifact.", 0, 1, text); 3340 default: return super.getNamedProperty(_hash, _name, _checkValid); 3341 } 3342 3343 } 3344 3345 @Override 3346 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3347 switch (hash) { 3348 case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept 3349 case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeableConcept 3350 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // MarkdownType 3351 default: return super.getProperty(hash, name, checkValid); 3352 } 3353 3354 } 3355 3356 @Override 3357 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3358 switch (hash) { 3359 case 3575610: // type 3360 this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 3361 return value; 3362 case -1613589672: // language 3363 this.language = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3364 return value; 3365 case 3556653: // text 3366 this.text = TypeConvertor.castToMarkdown(value); // MarkdownType 3367 return value; 3368 default: return super.setProperty(hash, name, value); 3369 } 3370 3371 } 3372 3373 @Override 3374 public Base setProperty(String name, Base value) throws FHIRException { 3375 if (name.equals("type")) { 3376 this.getType().add(TypeConvertor.castToCodeableConcept(value)); 3377 } else if (name.equals("language")) { 3378 this.language = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3379 } else if (name.equals("text")) { 3380 this.text = TypeConvertor.castToMarkdown(value); // MarkdownType 3381 } else 3382 return super.setProperty(name, value); 3383 return value; 3384 } 3385 3386 @Override 3387 public Base makeProperty(int hash, String name) throws FHIRException { 3388 switch (hash) { 3389 case 3575610: return addType(); 3390 case -1613589672: return getLanguage(); 3391 case 3556653: return getTextElement(); 3392 default: return super.makeProperty(hash, name); 3393 } 3394 3395 } 3396 3397 @Override 3398 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3399 switch (hash) { 3400 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 3401 case -1613589672: /*language*/ return new String[] {"CodeableConcept"}; 3402 case 3556653: /*text*/ return new String[] {"markdown"}; 3403 default: return super.getTypesForProperty(hash, name); 3404 } 3405 3406 } 3407 3408 @Override 3409 public Base addChild(String name) throws FHIRException { 3410 if (name.equals("type")) { 3411 return addType(); 3412 } 3413 else if (name.equals("language")) { 3414 this.language = new CodeableConcept(); 3415 return this.language; 3416 } 3417 else if (name.equals("text")) { 3418 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.title.text"); 3419 } 3420 else 3421 return super.addChild(name); 3422 } 3423 3424 public CitationCitedArtifactTitleComponent copy() { 3425 CitationCitedArtifactTitleComponent dst = new CitationCitedArtifactTitleComponent(); 3426 copyValues(dst); 3427 return dst; 3428 } 3429 3430 public void copyValues(CitationCitedArtifactTitleComponent dst) { 3431 super.copyValues(dst); 3432 if (type != null) { 3433 dst.type = new ArrayList<CodeableConcept>(); 3434 for (CodeableConcept i : type) 3435 dst.type.add(i.copy()); 3436 }; 3437 dst.language = language == null ? null : language.copy(); 3438 dst.text = text == null ? null : text.copy(); 3439 } 3440 3441 @Override 3442 public boolean equalsDeep(Base other_) { 3443 if (!super.equalsDeep(other_)) 3444 return false; 3445 if (!(other_ instanceof CitationCitedArtifactTitleComponent)) 3446 return false; 3447 CitationCitedArtifactTitleComponent o = (CitationCitedArtifactTitleComponent) other_; 3448 return compareDeep(type, o.type, true) && compareDeep(language, o.language, true) && compareDeep(text, o.text, true) 3449 ; 3450 } 3451 3452 @Override 3453 public boolean equalsShallow(Base other_) { 3454 if (!super.equalsShallow(other_)) 3455 return false; 3456 if (!(other_ instanceof CitationCitedArtifactTitleComponent)) 3457 return false; 3458 CitationCitedArtifactTitleComponent o = (CitationCitedArtifactTitleComponent) other_; 3459 return compareValues(text, o.text, true); 3460 } 3461 3462 public boolean isEmpty() { 3463 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, language, text); 3464 } 3465 3466 public String fhirType() { 3467 return "Citation.citedArtifact.title"; 3468 3469 } 3470 3471 } 3472 3473 @Block() 3474 public static class CitationCitedArtifactAbstractComponent extends BackboneElement implements IBaseBackboneElement { 3475 /** 3476 * Used to express the reason for or classification of the abstract. 3477 */ 3478 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 3479 @Description(shortDefinition="The kind of abstract", formalDefinition="Used to express the reason for or classification of the abstract." ) 3480 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/cited-artifact-abstract-type") 3481 protected CodeableConcept type; 3482 3483 /** 3484 * Used to express the specific language of the abstract. 3485 */ 3486 @Child(name = "language", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 3487 @Description(shortDefinition="Used to express the specific language", formalDefinition="Used to express the specific language of the abstract." ) 3488 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/languages") 3489 protected CodeableConcept language; 3490 3491 /** 3492 * Abstract content. 3493 */ 3494 @Child(name = "text", type = {MarkdownType.class}, order=3, min=1, max=1, modifier=false, summary=false) 3495 @Description(shortDefinition="Abstract content", formalDefinition="Abstract content." ) 3496 protected MarkdownType text; 3497 3498 /** 3499 * Copyright notice for the abstract. 3500 */ 3501 @Child(name = "copyright", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false) 3502 @Description(shortDefinition="Copyright notice for the abstract", formalDefinition="Copyright notice for the abstract." ) 3503 protected MarkdownType copyright; 3504 3505 private static final long serialVersionUID = -1882363442L; 3506 3507 /** 3508 * Constructor 3509 */ 3510 public CitationCitedArtifactAbstractComponent() { 3511 super(); 3512 } 3513 3514 /** 3515 * Constructor 3516 */ 3517 public CitationCitedArtifactAbstractComponent(String text) { 3518 super(); 3519 this.setText(text); 3520 } 3521 3522 /** 3523 * @return {@link #type} (Used to express the reason for or classification of the abstract.) 3524 */ 3525 public CodeableConcept getType() { 3526 if (this.type == null) 3527 if (Configuration.errorOnAutoCreate()) 3528 throw new Error("Attempt to auto-create CitationCitedArtifactAbstractComponent.type"); 3529 else if (Configuration.doAutoCreate()) 3530 this.type = new CodeableConcept(); // cc 3531 return this.type; 3532 } 3533 3534 public boolean hasType() { 3535 return this.type != null && !this.type.isEmpty(); 3536 } 3537 3538 /** 3539 * @param value {@link #type} (Used to express the reason for or classification of the abstract.) 3540 */ 3541 public CitationCitedArtifactAbstractComponent setType(CodeableConcept value) { 3542 this.type = value; 3543 return this; 3544 } 3545 3546 /** 3547 * @return {@link #language} (Used to express the specific language of the abstract.) 3548 */ 3549 public CodeableConcept getLanguage() { 3550 if (this.language == null) 3551 if (Configuration.errorOnAutoCreate()) 3552 throw new Error("Attempt to auto-create CitationCitedArtifactAbstractComponent.language"); 3553 else if (Configuration.doAutoCreate()) 3554 this.language = new CodeableConcept(); // cc 3555 return this.language; 3556 } 3557 3558 public boolean hasLanguage() { 3559 return this.language != null && !this.language.isEmpty(); 3560 } 3561 3562 /** 3563 * @param value {@link #language} (Used to express the specific language of the abstract.) 3564 */ 3565 public CitationCitedArtifactAbstractComponent setLanguage(CodeableConcept value) { 3566 this.language = value; 3567 return this; 3568 } 3569 3570 /** 3571 * @return {@link #text} (Abstract content.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 3572 */ 3573 public MarkdownType getTextElement() { 3574 if (this.text == null) 3575 if (Configuration.errorOnAutoCreate()) 3576 throw new Error("Attempt to auto-create CitationCitedArtifactAbstractComponent.text"); 3577 else if (Configuration.doAutoCreate()) 3578 this.text = new MarkdownType(); // bb 3579 return this.text; 3580 } 3581 3582 public boolean hasTextElement() { 3583 return this.text != null && !this.text.isEmpty(); 3584 } 3585 3586 public boolean hasText() { 3587 return this.text != null && !this.text.isEmpty(); 3588 } 3589 3590 /** 3591 * @param value {@link #text} (Abstract content.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 3592 */ 3593 public CitationCitedArtifactAbstractComponent setTextElement(MarkdownType value) { 3594 this.text = value; 3595 return this; 3596 } 3597 3598 /** 3599 * @return Abstract content. 3600 */ 3601 public String getText() { 3602 return this.text == null ? null : this.text.getValue(); 3603 } 3604 3605 /** 3606 * @param value Abstract content. 3607 */ 3608 public CitationCitedArtifactAbstractComponent setText(String value) { 3609 if (this.text == null) 3610 this.text = new MarkdownType(); 3611 this.text.setValue(value); 3612 return this; 3613 } 3614 3615 /** 3616 * @return {@link #copyright} (Copyright notice for the abstract.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 3617 */ 3618 public MarkdownType getCopyrightElement() { 3619 if (this.copyright == null) 3620 if (Configuration.errorOnAutoCreate()) 3621 throw new Error("Attempt to auto-create CitationCitedArtifactAbstractComponent.copyright"); 3622 else if (Configuration.doAutoCreate()) 3623 this.copyright = new MarkdownType(); // bb 3624 return this.copyright; 3625 } 3626 3627 public boolean hasCopyrightElement() { 3628 return this.copyright != null && !this.copyright.isEmpty(); 3629 } 3630 3631 public boolean hasCopyright() { 3632 return this.copyright != null && !this.copyright.isEmpty(); 3633 } 3634 3635 /** 3636 * @param value {@link #copyright} (Copyright notice for the abstract.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 3637 */ 3638 public CitationCitedArtifactAbstractComponent setCopyrightElement(MarkdownType value) { 3639 this.copyright = value; 3640 return this; 3641 } 3642 3643 /** 3644 * @return Copyright notice for the abstract. 3645 */ 3646 public String getCopyright() { 3647 return this.copyright == null ? null : this.copyright.getValue(); 3648 } 3649 3650 /** 3651 * @param value Copyright notice for the abstract. 3652 */ 3653 public CitationCitedArtifactAbstractComponent setCopyright(String value) { 3654 if (Utilities.noString(value)) 3655 this.copyright = null; 3656 else { 3657 if (this.copyright == null) 3658 this.copyright = new MarkdownType(); 3659 this.copyright.setValue(value); 3660 } 3661 return this; 3662 } 3663 3664 protected void listChildren(List<Property> children) { 3665 super.listChildren(children); 3666 children.add(new Property("type", "CodeableConcept", "Used to express the reason for or classification of the abstract.", 0, 1, type)); 3667 children.add(new Property("language", "CodeableConcept", "Used to express the specific language of the abstract.", 0, 1, language)); 3668 children.add(new Property("text", "markdown", "Abstract content.", 0, 1, text)); 3669 children.add(new Property("copyright", "markdown", "Copyright notice for the abstract.", 0, 1, copyright)); 3670 } 3671 3672 @Override 3673 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3674 switch (_hash) { 3675 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Used to express the reason for or classification of the abstract.", 0, 1, type); 3676 case -1613589672: /*language*/ return new Property("language", "CodeableConcept", "Used to express the specific language of the abstract.", 0, 1, language); 3677 case 3556653: /*text*/ return new Property("text", "markdown", "Abstract content.", 0, 1, text); 3678 case 1522889671: /*copyright*/ return new Property("copyright", "markdown", "Copyright notice for the abstract.", 0, 1, copyright); 3679 default: return super.getNamedProperty(_hash, _name, _checkValid); 3680 } 3681 3682 } 3683 3684 @Override 3685 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3686 switch (hash) { 3687 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 3688 case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeableConcept 3689 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // MarkdownType 3690 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 3691 default: return super.getProperty(hash, name, checkValid); 3692 } 3693 3694 } 3695 3696 @Override 3697 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3698 switch (hash) { 3699 case 3575610: // type 3700 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3701 return value; 3702 case -1613589672: // language 3703 this.language = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3704 return value; 3705 case 3556653: // text 3706 this.text = TypeConvertor.castToMarkdown(value); // MarkdownType 3707 return value; 3708 case 1522889671: // copyright 3709 this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType 3710 return value; 3711 default: return super.setProperty(hash, name, value); 3712 } 3713 3714 } 3715 3716 @Override 3717 public Base setProperty(String name, Base value) throws FHIRException { 3718 if (name.equals("type")) { 3719 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3720 } else if (name.equals("language")) { 3721 this.language = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3722 } else if (name.equals("text")) { 3723 this.text = TypeConvertor.castToMarkdown(value); // MarkdownType 3724 } else if (name.equals("copyright")) { 3725 this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType 3726 } else 3727 return super.setProperty(name, value); 3728 return value; 3729 } 3730 3731 @Override 3732 public Base makeProperty(int hash, String name) throws FHIRException { 3733 switch (hash) { 3734 case 3575610: return getType(); 3735 case -1613589672: return getLanguage(); 3736 case 3556653: return getTextElement(); 3737 case 1522889671: return getCopyrightElement(); 3738 default: return super.makeProperty(hash, name); 3739 } 3740 3741 } 3742 3743 @Override 3744 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3745 switch (hash) { 3746 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 3747 case -1613589672: /*language*/ return new String[] {"CodeableConcept"}; 3748 case 3556653: /*text*/ return new String[] {"markdown"}; 3749 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 3750 default: return super.getTypesForProperty(hash, name); 3751 } 3752 3753 } 3754 3755 @Override 3756 public Base addChild(String name) throws FHIRException { 3757 if (name.equals("type")) { 3758 this.type = new CodeableConcept(); 3759 return this.type; 3760 } 3761 else if (name.equals("language")) { 3762 this.language = new CodeableConcept(); 3763 return this.language; 3764 } 3765 else if (name.equals("text")) { 3766 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.abstract.text"); 3767 } 3768 else if (name.equals("copyright")) { 3769 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.abstract.copyright"); 3770 } 3771 else 3772 return super.addChild(name); 3773 } 3774 3775 public CitationCitedArtifactAbstractComponent copy() { 3776 CitationCitedArtifactAbstractComponent dst = new CitationCitedArtifactAbstractComponent(); 3777 copyValues(dst); 3778 return dst; 3779 } 3780 3781 public void copyValues(CitationCitedArtifactAbstractComponent dst) { 3782 super.copyValues(dst); 3783 dst.type = type == null ? null : type.copy(); 3784 dst.language = language == null ? null : language.copy(); 3785 dst.text = text == null ? null : text.copy(); 3786 dst.copyright = copyright == null ? null : copyright.copy(); 3787 } 3788 3789 @Override 3790 public boolean equalsDeep(Base other_) { 3791 if (!super.equalsDeep(other_)) 3792 return false; 3793 if (!(other_ instanceof CitationCitedArtifactAbstractComponent)) 3794 return false; 3795 CitationCitedArtifactAbstractComponent o = (CitationCitedArtifactAbstractComponent) other_; 3796 return compareDeep(type, o.type, true) && compareDeep(language, o.language, true) && compareDeep(text, o.text, true) 3797 && compareDeep(copyright, o.copyright, true); 3798 } 3799 3800 @Override 3801 public boolean equalsShallow(Base other_) { 3802 if (!super.equalsShallow(other_)) 3803 return false; 3804 if (!(other_ instanceof CitationCitedArtifactAbstractComponent)) 3805 return false; 3806 CitationCitedArtifactAbstractComponent o = (CitationCitedArtifactAbstractComponent) other_; 3807 return compareValues(text, o.text, true) && compareValues(copyright, o.copyright, true); 3808 } 3809 3810 public boolean isEmpty() { 3811 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, language, text, copyright 3812 ); 3813 } 3814 3815 public String fhirType() { 3816 return "Citation.citedArtifact.abstract"; 3817 3818 } 3819 3820 } 3821 3822 @Block() 3823 public static class CitationCitedArtifactPartComponent extends BackboneElement implements IBaseBackboneElement { 3824 /** 3825 * The kind of component. 3826 */ 3827 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 3828 @Description(shortDefinition="The kind of component", formalDefinition="The kind of component." ) 3829 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/cited-artifact-part-type") 3830 protected CodeableConcept type; 3831 3832 /** 3833 * The specification of the component. 3834 */ 3835 @Child(name = "value", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 3836 @Description(shortDefinition="The specification of the component", formalDefinition="The specification of the component." ) 3837 protected StringType value; 3838 3839 /** 3840 * The citation for the full article or artifact. 3841 */ 3842 @Child(name = "baseCitation", type = {Citation.class}, order=3, min=0, max=1, modifier=false, summary=false) 3843 @Description(shortDefinition="The citation for the full article or artifact", formalDefinition="The citation for the full article or artifact." ) 3844 protected Reference baseCitation; 3845 3846 private static final long serialVersionUID = -765350500L; 3847 3848 /** 3849 * Constructor 3850 */ 3851 public CitationCitedArtifactPartComponent() { 3852 super(); 3853 } 3854 3855 /** 3856 * @return {@link #type} (The kind of component.) 3857 */ 3858 public CodeableConcept getType() { 3859 if (this.type == null) 3860 if (Configuration.errorOnAutoCreate()) 3861 throw new Error("Attempt to auto-create CitationCitedArtifactPartComponent.type"); 3862 else if (Configuration.doAutoCreate()) 3863 this.type = new CodeableConcept(); // cc 3864 return this.type; 3865 } 3866 3867 public boolean hasType() { 3868 return this.type != null && !this.type.isEmpty(); 3869 } 3870 3871 /** 3872 * @param value {@link #type} (The kind of component.) 3873 */ 3874 public CitationCitedArtifactPartComponent setType(CodeableConcept value) { 3875 this.type = value; 3876 return this; 3877 } 3878 3879 /** 3880 * @return {@link #value} (The specification of the component.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 3881 */ 3882 public StringType getValueElement() { 3883 if (this.value == null) 3884 if (Configuration.errorOnAutoCreate()) 3885 throw new Error("Attempt to auto-create CitationCitedArtifactPartComponent.value"); 3886 else if (Configuration.doAutoCreate()) 3887 this.value = new StringType(); // bb 3888 return this.value; 3889 } 3890 3891 public boolean hasValueElement() { 3892 return this.value != null && !this.value.isEmpty(); 3893 } 3894 3895 public boolean hasValue() { 3896 return this.value != null && !this.value.isEmpty(); 3897 } 3898 3899 /** 3900 * @param value {@link #value} (The specification of the component.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 3901 */ 3902 public CitationCitedArtifactPartComponent setValueElement(StringType value) { 3903 this.value = value; 3904 return this; 3905 } 3906 3907 /** 3908 * @return The specification of the component. 3909 */ 3910 public String getValue() { 3911 return this.value == null ? null : this.value.getValue(); 3912 } 3913 3914 /** 3915 * @param value The specification of the component. 3916 */ 3917 public CitationCitedArtifactPartComponent setValue(String value) { 3918 if (Utilities.noString(value)) 3919 this.value = null; 3920 else { 3921 if (this.value == null) 3922 this.value = new StringType(); 3923 this.value.setValue(value); 3924 } 3925 return this; 3926 } 3927 3928 /** 3929 * @return {@link #baseCitation} (The citation for the full article or artifact.) 3930 */ 3931 public Reference getBaseCitation() { 3932 if (this.baseCitation == null) 3933 if (Configuration.errorOnAutoCreate()) 3934 throw new Error("Attempt to auto-create CitationCitedArtifactPartComponent.baseCitation"); 3935 else if (Configuration.doAutoCreate()) 3936 this.baseCitation = new Reference(); // cc 3937 return this.baseCitation; 3938 } 3939 3940 public boolean hasBaseCitation() { 3941 return this.baseCitation != null && !this.baseCitation.isEmpty(); 3942 } 3943 3944 /** 3945 * @param value {@link #baseCitation} (The citation for the full article or artifact.) 3946 */ 3947 public CitationCitedArtifactPartComponent setBaseCitation(Reference value) { 3948 this.baseCitation = value; 3949 return this; 3950 } 3951 3952 protected void listChildren(List<Property> children) { 3953 super.listChildren(children); 3954 children.add(new Property("type", "CodeableConcept", "The kind of component.", 0, 1, type)); 3955 children.add(new Property("value", "string", "The specification of the component.", 0, 1, value)); 3956 children.add(new Property("baseCitation", "Reference(Citation)", "The citation for the full article or artifact.", 0, 1, baseCitation)); 3957 } 3958 3959 @Override 3960 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3961 switch (_hash) { 3962 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The kind of component.", 0, 1, type); 3963 case 111972721: /*value*/ return new Property("value", "string", "The specification of the component.", 0, 1, value); 3964 case 1182995672: /*baseCitation*/ return new Property("baseCitation", "Reference(Citation)", "The citation for the full article or artifact.", 0, 1, baseCitation); 3965 default: return super.getNamedProperty(_hash, _name, _checkValid); 3966 } 3967 3968 } 3969 3970 @Override 3971 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3972 switch (hash) { 3973 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 3974 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 3975 case 1182995672: /*baseCitation*/ return this.baseCitation == null ? new Base[0] : new Base[] {this.baseCitation}; // Reference 3976 default: return super.getProperty(hash, name, checkValid); 3977 } 3978 3979 } 3980 3981 @Override 3982 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3983 switch (hash) { 3984 case 3575610: // type 3985 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3986 return value; 3987 case 111972721: // value 3988 this.value = TypeConvertor.castToString(value); // StringType 3989 return value; 3990 case 1182995672: // baseCitation 3991 this.baseCitation = TypeConvertor.castToReference(value); // Reference 3992 return value; 3993 default: return super.setProperty(hash, name, value); 3994 } 3995 3996 } 3997 3998 @Override 3999 public Base setProperty(String name, Base value) throws FHIRException { 4000 if (name.equals("type")) { 4001 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 4002 } else if (name.equals("value")) { 4003 this.value = TypeConvertor.castToString(value); // StringType 4004 } else if (name.equals("baseCitation")) { 4005 this.baseCitation = TypeConvertor.castToReference(value); // Reference 4006 } else 4007 return super.setProperty(name, value); 4008 return value; 4009 } 4010 4011 @Override 4012 public Base makeProperty(int hash, String name) throws FHIRException { 4013 switch (hash) { 4014 case 3575610: return getType(); 4015 case 111972721: return getValueElement(); 4016 case 1182995672: return getBaseCitation(); 4017 default: return super.makeProperty(hash, name); 4018 } 4019 4020 } 4021 4022 @Override 4023 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4024 switch (hash) { 4025 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 4026 case 111972721: /*value*/ return new String[] {"string"}; 4027 case 1182995672: /*baseCitation*/ return new String[] {"Reference"}; 4028 default: return super.getTypesForProperty(hash, name); 4029 } 4030 4031 } 4032 4033 @Override 4034 public Base addChild(String name) throws FHIRException { 4035 if (name.equals("type")) { 4036 this.type = new CodeableConcept(); 4037 return this.type; 4038 } 4039 else if (name.equals("value")) { 4040 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.part.value"); 4041 } 4042 else if (name.equals("baseCitation")) { 4043 this.baseCitation = new Reference(); 4044 return this.baseCitation; 4045 } 4046 else 4047 return super.addChild(name); 4048 } 4049 4050 public CitationCitedArtifactPartComponent copy() { 4051 CitationCitedArtifactPartComponent dst = new CitationCitedArtifactPartComponent(); 4052 copyValues(dst); 4053 return dst; 4054 } 4055 4056 public void copyValues(CitationCitedArtifactPartComponent dst) { 4057 super.copyValues(dst); 4058 dst.type = type == null ? null : type.copy(); 4059 dst.value = value == null ? null : value.copy(); 4060 dst.baseCitation = baseCitation == null ? null : baseCitation.copy(); 4061 } 4062 4063 @Override 4064 public boolean equalsDeep(Base other_) { 4065 if (!super.equalsDeep(other_)) 4066 return false; 4067 if (!(other_ instanceof CitationCitedArtifactPartComponent)) 4068 return false; 4069 CitationCitedArtifactPartComponent o = (CitationCitedArtifactPartComponent) other_; 4070 return compareDeep(type, o.type, true) && compareDeep(value, o.value, true) && compareDeep(baseCitation, o.baseCitation, true) 4071 ; 4072 } 4073 4074 @Override 4075 public boolean equalsShallow(Base other_) { 4076 if (!super.equalsShallow(other_)) 4077 return false; 4078 if (!(other_ instanceof CitationCitedArtifactPartComponent)) 4079 return false; 4080 CitationCitedArtifactPartComponent o = (CitationCitedArtifactPartComponent) other_; 4081 return compareValues(value, o.value, true); 4082 } 4083 4084 public boolean isEmpty() { 4085 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value, baseCitation 4086 ); 4087 } 4088 4089 public String fhirType() { 4090 return "Citation.citedArtifact.part"; 4091 4092 } 4093 4094 } 4095 4096 @Block() 4097 public static class CitationCitedArtifactRelatesToComponent extends BackboneElement implements IBaseBackboneElement { 4098 /** 4099 * The type of relationship to the related artifact. 4100 */ 4101 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4102 @Description(shortDefinition="documentation | justification | citation | predecessor | successor | derived-from | depends-on | composed-of | part-of | amends | amended-with | appends | appended-with | cites | cited-by | comments-on | comment-in | contains | contained-in | corrects | correction-in | replaces | replaced-with | retracts | retracted-by | signs | similar-to | supports | supported-with | transforms | transformed-into | transformed-with | documents | specification-of | created-with | cite-as | reprint | reprint-of", formalDefinition="The type of relationship to the related artifact." ) 4103 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/related-artifact-type-all") 4104 protected Enumeration<RelatedArtifactTypeExpanded> type; 4105 4106 /** 4107 * Provides additional classifiers of the related artifact. 4108 */ 4109 @Child(name = "classifier", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4110 @Description(shortDefinition="Additional classifiers", formalDefinition="Provides additional classifiers of the related artifact." ) 4111 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/citation-artifact-classifier") 4112 protected List<CodeableConcept> classifier; 4113 4114 /** 4115 * A short label that can be used to reference the related artifact from elsewhere in the containing artifact, such as a footnote index. 4116 */ 4117 @Child(name = "label", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 4118 @Description(shortDefinition="Short label", formalDefinition="A short label that can be used to reference the related artifact from elsewhere in the containing artifact, such as a footnote index." ) 4119 protected StringType label; 4120 4121 /** 4122 * A brief description of the document or knowledge resource being referenced, suitable for display to a consumer. 4123 */ 4124 @Child(name = "display", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 4125 @Description(shortDefinition="Brief description of the related artifact", formalDefinition="A brief description of the document or knowledge resource being referenced, suitable for display to a consumer." ) 4126 protected StringType display; 4127 4128 /** 4129 * A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format. 4130 */ 4131 @Child(name = "citation", type = {MarkdownType.class}, order=5, min=0, max=1, modifier=false, summary=false) 4132 @Description(shortDefinition="Bibliographic citation for the artifact", formalDefinition="A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format." ) 4133 protected MarkdownType citation; 4134 4135 /** 4136 * The document being referenced, represented as an attachment. Do not use this element if using the resource element to provide the canonical to the related artifact. 4137 */ 4138 @Child(name = "document", type = {Attachment.class}, order=6, min=0, max=1, modifier=false, summary=false) 4139 @Description(shortDefinition="What document is being referenced", formalDefinition="The document being referenced, represented as an attachment. Do not use this element if using the resource element to provide the canonical to the related artifact." ) 4140 protected Attachment document; 4141 4142 /** 4143 * The related artifact, such as a library, value set, profile, or other knowledge resource. 4144 */ 4145 @Child(name = "resource", type = {CanonicalType.class}, order=7, min=0, max=1, modifier=false, summary=false) 4146 @Description(shortDefinition="What artifact is being referenced", formalDefinition="The related artifact, such as a library, value set, profile, or other knowledge resource." ) 4147 protected CanonicalType resource; 4148 4149 /** 4150 * The related artifact, if the artifact is not a canonical resource, or a resource reference to a canonical resource. 4151 */ 4152 @Child(name = "resourceReference", type = {Reference.class}, order=8, min=0, max=1, modifier=false, summary=false) 4153 @Description(shortDefinition="What artifact, if not a conformance resource", formalDefinition="The related artifact, if the artifact is not a canonical resource, or a resource reference to a canonical resource." ) 4154 protected Reference resourceReference; 4155 4156 private static final long serialVersionUID = 1537406923L; 4157 4158 /** 4159 * Constructor 4160 */ 4161 public CitationCitedArtifactRelatesToComponent() { 4162 super(); 4163 } 4164 4165 /** 4166 * Constructor 4167 */ 4168 public CitationCitedArtifactRelatesToComponent(RelatedArtifactTypeExpanded type) { 4169 super(); 4170 this.setType(type); 4171 } 4172 4173 /** 4174 * @return {@link #type} (The type of relationship to the related artifact.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 4175 */ 4176 public Enumeration<RelatedArtifactTypeExpanded> getTypeElement() { 4177 if (this.type == null) 4178 if (Configuration.errorOnAutoCreate()) 4179 throw new Error("Attempt to auto-create CitationCitedArtifactRelatesToComponent.type"); 4180 else if (Configuration.doAutoCreate()) 4181 this.type = new Enumeration<RelatedArtifactTypeExpanded>(new RelatedArtifactTypeExpandedEnumFactory()); // bb 4182 return this.type; 4183 } 4184 4185 public boolean hasTypeElement() { 4186 return this.type != null && !this.type.isEmpty(); 4187 } 4188 4189 public boolean hasType() { 4190 return this.type != null && !this.type.isEmpty(); 4191 } 4192 4193 /** 4194 * @param value {@link #type} (The type of relationship to the related artifact.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 4195 */ 4196 public CitationCitedArtifactRelatesToComponent setTypeElement(Enumeration<RelatedArtifactTypeExpanded> value) { 4197 this.type = value; 4198 return this; 4199 } 4200 4201 /** 4202 * @return The type of relationship to the related artifact. 4203 */ 4204 public RelatedArtifactTypeExpanded getType() { 4205 return this.type == null ? null : this.type.getValue(); 4206 } 4207 4208 /** 4209 * @param value The type of relationship to the related artifact. 4210 */ 4211 public CitationCitedArtifactRelatesToComponent setType(RelatedArtifactTypeExpanded value) { 4212 if (this.type == null) 4213 this.type = new Enumeration<RelatedArtifactTypeExpanded>(new RelatedArtifactTypeExpandedEnumFactory()); 4214 this.type.setValue(value); 4215 return this; 4216 } 4217 4218 /** 4219 * @return {@link #classifier} (Provides additional classifiers of the related artifact.) 4220 */ 4221 public List<CodeableConcept> getClassifier() { 4222 if (this.classifier == null) 4223 this.classifier = new ArrayList<CodeableConcept>(); 4224 return this.classifier; 4225 } 4226 4227 /** 4228 * @return Returns a reference to <code>this</code> for easy method chaining 4229 */ 4230 public CitationCitedArtifactRelatesToComponent setClassifier(List<CodeableConcept> theClassifier) { 4231 this.classifier = theClassifier; 4232 return this; 4233 } 4234 4235 public boolean hasClassifier() { 4236 if (this.classifier == null) 4237 return false; 4238 for (CodeableConcept item : this.classifier) 4239 if (!item.isEmpty()) 4240 return true; 4241 return false; 4242 } 4243 4244 public CodeableConcept addClassifier() { //3 4245 CodeableConcept t = new CodeableConcept(); 4246 if (this.classifier == null) 4247 this.classifier = new ArrayList<CodeableConcept>(); 4248 this.classifier.add(t); 4249 return t; 4250 } 4251 4252 public CitationCitedArtifactRelatesToComponent addClassifier(CodeableConcept t) { //3 4253 if (t == null) 4254 return this; 4255 if (this.classifier == null) 4256 this.classifier = new ArrayList<CodeableConcept>(); 4257 this.classifier.add(t); 4258 return this; 4259 } 4260 4261 /** 4262 * @return The first repetition of repeating field {@link #classifier}, creating it if it does not already exist {3} 4263 */ 4264 public CodeableConcept getClassifierFirstRep() { 4265 if (getClassifier().isEmpty()) { 4266 addClassifier(); 4267 } 4268 return getClassifier().get(0); 4269 } 4270 4271 /** 4272 * @return {@link #label} (A short label that can be used to reference the related artifact from elsewhere in the containing artifact, such as a footnote index.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value 4273 */ 4274 public StringType getLabelElement() { 4275 if (this.label == null) 4276 if (Configuration.errorOnAutoCreate()) 4277 throw new Error("Attempt to auto-create CitationCitedArtifactRelatesToComponent.label"); 4278 else if (Configuration.doAutoCreate()) 4279 this.label = new StringType(); // bb 4280 return this.label; 4281 } 4282 4283 public boolean hasLabelElement() { 4284 return this.label != null && !this.label.isEmpty(); 4285 } 4286 4287 public boolean hasLabel() { 4288 return this.label != null && !this.label.isEmpty(); 4289 } 4290 4291 /** 4292 * @param value {@link #label} (A short label that can be used to reference the related artifact from elsewhere in the containing artifact, such as a footnote index.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value 4293 */ 4294 public CitationCitedArtifactRelatesToComponent setLabelElement(StringType value) { 4295 this.label = value; 4296 return this; 4297 } 4298 4299 /** 4300 * @return A short label that can be used to reference the related artifact from elsewhere in the containing artifact, such as a footnote index. 4301 */ 4302 public String getLabel() { 4303 return this.label == null ? null : this.label.getValue(); 4304 } 4305 4306 /** 4307 * @param value A short label that can be used to reference the related artifact from elsewhere in the containing artifact, such as a footnote index. 4308 */ 4309 public CitationCitedArtifactRelatesToComponent setLabel(String value) { 4310 if (Utilities.noString(value)) 4311 this.label = null; 4312 else { 4313 if (this.label == null) 4314 this.label = new StringType(); 4315 this.label.setValue(value); 4316 } 4317 return this; 4318 } 4319 4320 /** 4321 * @return {@link #display} (A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value 4322 */ 4323 public StringType getDisplayElement() { 4324 if (this.display == null) 4325 if (Configuration.errorOnAutoCreate()) 4326 throw new Error("Attempt to auto-create CitationCitedArtifactRelatesToComponent.display"); 4327 else if (Configuration.doAutoCreate()) 4328 this.display = new StringType(); // bb 4329 return this.display; 4330 } 4331 4332 public boolean hasDisplayElement() { 4333 return this.display != null && !this.display.isEmpty(); 4334 } 4335 4336 public boolean hasDisplay() { 4337 return this.display != null && !this.display.isEmpty(); 4338 } 4339 4340 /** 4341 * @param value {@link #display} (A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value 4342 */ 4343 public CitationCitedArtifactRelatesToComponent setDisplayElement(StringType value) { 4344 this.display = value; 4345 return this; 4346 } 4347 4348 /** 4349 * @return A brief description of the document or knowledge resource being referenced, suitable for display to a consumer. 4350 */ 4351 public String getDisplay() { 4352 return this.display == null ? null : this.display.getValue(); 4353 } 4354 4355 /** 4356 * @param value A brief description of the document or knowledge resource being referenced, suitable for display to a consumer. 4357 */ 4358 public CitationCitedArtifactRelatesToComponent setDisplay(String value) { 4359 if (Utilities.noString(value)) 4360 this.display = null; 4361 else { 4362 if (this.display == null) 4363 this.display = new StringType(); 4364 this.display.setValue(value); 4365 } 4366 return this; 4367 } 4368 4369 /** 4370 * @return {@link #citation} (A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.). This is the underlying object with id, value and extensions. The accessor "getCitation" gives direct access to the value 4371 */ 4372 public MarkdownType getCitationElement() { 4373 if (this.citation == null) 4374 if (Configuration.errorOnAutoCreate()) 4375 throw new Error("Attempt to auto-create CitationCitedArtifactRelatesToComponent.citation"); 4376 else if (Configuration.doAutoCreate()) 4377 this.citation = new MarkdownType(); // bb 4378 return this.citation; 4379 } 4380 4381 public boolean hasCitationElement() { 4382 return this.citation != null && !this.citation.isEmpty(); 4383 } 4384 4385 public boolean hasCitation() { 4386 return this.citation != null && !this.citation.isEmpty(); 4387 } 4388 4389 /** 4390 * @param value {@link #citation} (A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.). This is the underlying object with id, value and extensions. The accessor "getCitation" gives direct access to the value 4391 */ 4392 public CitationCitedArtifactRelatesToComponent setCitationElement(MarkdownType value) { 4393 this.citation = value; 4394 return this; 4395 } 4396 4397 /** 4398 * @return A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format. 4399 */ 4400 public String getCitation() { 4401 return this.citation == null ? null : this.citation.getValue(); 4402 } 4403 4404 /** 4405 * @param value A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format. 4406 */ 4407 public CitationCitedArtifactRelatesToComponent setCitation(String value) { 4408 if (Utilities.noString(value)) 4409 this.citation = null; 4410 else { 4411 if (this.citation == null) 4412 this.citation = new MarkdownType(); 4413 this.citation.setValue(value); 4414 } 4415 return this; 4416 } 4417 4418 /** 4419 * @return {@link #document} (The document being referenced, represented as an attachment. Do not use this element if using the resource element to provide the canonical to the related artifact.) 4420 */ 4421 public Attachment getDocument() { 4422 if (this.document == null) 4423 if (Configuration.errorOnAutoCreate()) 4424 throw new Error("Attempt to auto-create CitationCitedArtifactRelatesToComponent.document"); 4425 else if (Configuration.doAutoCreate()) 4426 this.document = new Attachment(); // cc 4427 return this.document; 4428 } 4429 4430 public boolean hasDocument() { 4431 return this.document != null && !this.document.isEmpty(); 4432 } 4433 4434 /** 4435 * @param value {@link #document} (The document being referenced, represented as an attachment. Do not use this element if using the resource element to provide the canonical to the related artifact.) 4436 */ 4437 public CitationCitedArtifactRelatesToComponent setDocument(Attachment value) { 4438 this.document = value; 4439 return this; 4440 } 4441 4442 /** 4443 * @return {@link #resource} (The related artifact, such as a library, value set, profile, or other knowledge resource.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value 4444 */ 4445 public CanonicalType getResourceElement() { 4446 if (this.resource == null) 4447 if (Configuration.errorOnAutoCreate()) 4448 throw new Error("Attempt to auto-create CitationCitedArtifactRelatesToComponent.resource"); 4449 else if (Configuration.doAutoCreate()) 4450 this.resource = new CanonicalType(); // bb 4451 return this.resource; 4452 } 4453 4454 public boolean hasResourceElement() { 4455 return this.resource != null && !this.resource.isEmpty(); 4456 } 4457 4458 public boolean hasResource() { 4459 return this.resource != null && !this.resource.isEmpty(); 4460 } 4461 4462 /** 4463 * @param value {@link #resource} (The related artifact, such as a library, value set, profile, or other knowledge resource.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value 4464 */ 4465 public CitationCitedArtifactRelatesToComponent setResourceElement(CanonicalType value) { 4466 this.resource = value; 4467 return this; 4468 } 4469 4470 /** 4471 * @return The related artifact, such as a library, value set, profile, or other knowledge resource. 4472 */ 4473 public String getResource() { 4474 return this.resource == null ? null : this.resource.getValue(); 4475 } 4476 4477 /** 4478 * @param value The related artifact, such as a library, value set, profile, or other knowledge resource. 4479 */ 4480 public CitationCitedArtifactRelatesToComponent setResource(String value) { 4481 if (Utilities.noString(value)) 4482 this.resource = null; 4483 else { 4484 if (this.resource == null) 4485 this.resource = new CanonicalType(); 4486 this.resource.setValue(value); 4487 } 4488 return this; 4489 } 4490 4491 /** 4492 * @return {@link #resourceReference} (The related artifact, if the artifact is not a canonical resource, or a resource reference to a canonical resource.) 4493 */ 4494 public Reference getResourceReference() { 4495 if (this.resourceReference == null) 4496 if (Configuration.errorOnAutoCreate()) 4497 throw new Error("Attempt to auto-create CitationCitedArtifactRelatesToComponent.resourceReference"); 4498 else if (Configuration.doAutoCreate()) 4499 this.resourceReference = new Reference(); // cc 4500 return this.resourceReference; 4501 } 4502 4503 public boolean hasResourceReference() { 4504 return this.resourceReference != null && !this.resourceReference.isEmpty(); 4505 } 4506 4507 /** 4508 * @param value {@link #resourceReference} (The related artifact, if the artifact is not a canonical resource, or a resource reference to a canonical resource.) 4509 */ 4510 public CitationCitedArtifactRelatesToComponent setResourceReference(Reference value) { 4511 this.resourceReference = value; 4512 return this; 4513 } 4514 4515 protected void listChildren(List<Property> children) { 4516 super.listChildren(children); 4517 children.add(new Property("type", "code", "The type of relationship to the related artifact.", 0, 1, type)); 4518 children.add(new Property("classifier", "CodeableConcept", "Provides additional classifiers of the related artifact.", 0, java.lang.Integer.MAX_VALUE, classifier)); 4519 children.add(new Property("label", "string", "A short label that can be used to reference the related artifact from elsewhere in the containing artifact, such as a footnote index.", 0, 1, label)); 4520 children.add(new Property("display", "string", "A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.", 0, 1, display)); 4521 children.add(new Property("citation", "markdown", "A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.", 0, 1, citation)); 4522 children.add(new Property("document", "Attachment", "The document being referenced, represented as an attachment. Do not use this element if using the resource element to provide the canonical to the related artifact.", 0, 1, document)); 4523 children.add(new Property("resource", "canonical", "The related artifact, such as a library, value set, profile, or other knowledge resource.", 0, 1, resource)); 4524 children.add(new Property("resourceReference", "Reference", "The related artifact, if the artifact is not a canonical resource, or a resource reference to a canonical resource.", 0, 1, resourceReference)); 4525 } 4526 4527 @Override 4528 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4529 switch (_hash) { 4530 case 3575610: /*type*/ return new Property("type", "code", "The type of relationship to the related artifact.", 0, 1, type); 4531 case -281470431: /*classifier*/ return new Property("classifier", "CodeableConcept", "Provides additional classifiers of the related artifact.", 0, java.lang.Integer.MAX_VALUE, classifier); 4532 case 102727412: /*label*/ return new Property("label", "string", "A short label that can be used to reference the related artifact from elsewhere in the containing artifact, such as a footnote index.", 0, 1, label); 4533 case 1671764162: /*display*/ return new Property("display", "string", "A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.", 0, 1, display); 4534 case -1442706713: /*citation*/ return new Property("citation", "markdown", "A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.", 0, 1, citation); 4535 case 861720859: /*document*/ return new Property("document", "Attachment", "The document being referenced, represented as an attachment. Do not use this element if using the resource element to provide the canonical to the related artifact.", 0, 1, document); 4536 case -341064690: /*resource*/ return new Property("resource", "canonical", "The related artifact, such as a library, value set, profile, or other knowledge resource.", 0, 1, resource); 4537 case -610120995: /*resourceReference*/ return new Property("resourceReference", "Reference", "The related artifact, if the artifact is not a canonical resource, or a resource reference to a canonical resource.", 0, 1, resourceReference); 4538 default: return super.getNamedProperty(_hash, _name, _checkValid); 4539 } 4540 4541 } 4542 4543 @Override 4544 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4545 switch (hash) { 4546 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<RelatedArtifactTypeExpanded> 4547 case -281470431: /*classifier*/ return this.classifier == null ? new Base[0] : this.classifier.toArray(new Base[this.classifier.size()]); // CodeableConcept 4548 case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType 4549 case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType 4550 case -1442706713: /*citation*/ return this.citation == null ? new Base[0] : new Base[] {this.citation}; // MarkdownType 4551 case 861720859: /*document*/ return this.document == null ? new Base[0] : new Base[] {this.document}; // Attachment 4552 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CanonicalType 4553 case -610120995: /*resourceReference*/ return this.resourceReference == null ? new Base[0] : new Base[] {this.resourceReference}; // Reference 4554 default: return super.getProperty(hash, name, checkValid); 4555 } 4556 4557 } 4558 4559 @Override 4560 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4561 switch (hash) { 4562 case 3575610: // type 4563 value = new RelatedArtifactTypeExpandedEnumFactory().fromType(TypeConvertor.castToCode(value)); 4564 this.type = (Enumeration) value; // Enumeration<RelatedArtifactTypeExpanded> 4565 return value; 4566 case -281470431: // classifier 4567 this.getClassifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 4568 return value; 4569 case 102727412: // label 4570 this.label = TypeConvertor.castToString(value); // StringType 4571 return value; 4572 case 1671764162: // display 4573 this.display = TypeConvertor.castToString(value); // StringType 4574 return value; 4575 case -1442706713: // citation 4576 this.citation = TypeConvertor.castToMarkdown(value); // MarkdownType 4577 return value; 4578 case 861720859: // document 4579 this.document = TypeConvertor.castToAttachment(value); // Attachment 4580 return value; 4581 case -341064690: // resource 4582 this.resource = TypeConvertor.castToCanonical(value); // CanonicalType 4583 return value; 4584 case -610120995: // resourceReference 4585 this.resourceReference = TypeConvertor.castToReference(value); // Reference 4586 return value; 4587 default: return super.setProperty(hash, name, value); 4588 } 4589 4590 } 4591 4592 @Override 4593 public Base setProperty(String name, Base value) throws FHIRException { 4594 if (name.equals("type")) { 4595 value = new RelatedArtifactTypeExpandedEnumFactory().fromType(TypeConvertor.castToCode(value)); 4596 this.type = (Enumeration) value; // Enumeration<RelatedArtifactTypeExpanded> 4597 } else if (name.equals("classifier")) { 4598 this.getClassifier().add(TypeConvertor.castToCodeableConcept(value)); 4599 } else if (name.equals("label")) { 4600 this.label = TypeConvertor.castToString(value); // StringType 4601 } else if (name.equals("display")) { 4602 this.display = TypeConvertor.castToString(value); // StringType 4603 } else if (name.equals("citation")) { 4604 this.citation = TypeConvertor.castToMarkdown(value); // MarkdownType 4605 } else if (name.equals("document")) { 4606 this.document = TypeConvertor.castToAttachment(value); // Attachment 4607 } else if (name.equals("resource")) { 4608 this.resource = TypeConvertor.castToCanonical(value); // CanonicalType 4609 } else if (name.equals("resourceReference")) { 4610 this.resourceReference = TypeConvertor.castToReference(value); // Reference 4611 } else 4612 return super.setProperty(name, value); 4613 return value; 4614 } 4615 4616 @Override 4617 public Base makeProperty(int hash, String name) throws FHIRException { 4618 switch (hash) { 4619 case 3575610: return getTypeElement(); 4620 case -281470431: return addClassifier(); 4621 case 102727412: return getLabelElement(); 4622 case 1671764162: return getDisplayElement(); 4623 case -1442706713: return getCitationElement(); 4624 case 861720859: return getDocument(); 4625 case -341064690: return getResourceElement(); 4626 case -610120995: return getResourceReference(); 4627 default: return super.makeProperty(hash, name); 4628 } 4629 4630 } 4631 4632 @Override 4633 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4634 switch (hash) { 4635 case 3575610: /*type*/ return new String[] {"code"}; 4636 case -281470431: /*classifier*/ return new String[] {"CodeableConcept"}; 4637 case 102727412: /*label*/ return new String[] {"string"}; 4638 case 1671764162: /*display*/ return new String[] {"string"}; 4639 case -1442706713: /*citation*/ return new String[] {"markdown"}; 4640 case 861720859: /*document*/ return new String[] {"Attachment"}; 4641 case -341064690: /*resource*/ return new String[] {"canonical"}; 4642 case -610120995: /*resourceReference*/ return new String[] {"Reference"}; 4643 default: return super.getTypesForProperty(hash, name); 4644 } 4645 4646 } 4647 4648 @Override 4649 public Base addChild(String name) throws FHIRException { 4650 if (name.equals("type")) { 4651 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.relatesTo.type"); 4652 } 4653 else if (name.equals("classifier")) { 4654 return addClassifier(); 4655 } 4656 else if (name.equals("label")) { 4657 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.relatesTo.label"); 4658 } 4659 else if (name.equals("display")) { 4660 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.relatesTo.display"); 4661 } 4662 else if (name.equals("citation")) { 4663 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.relatesTo.citation"); 4664 } 4665 else if (name.equals("document")) { 4666 this.document = new Attachment(); 4667 return this.document; 4668 } 4669 else if (name.equals("resource")) { 4670 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.relatesTo.resource"); 4671 } 4672 else if (name.equals("resourceReference")) { 4673 this.resourceReference = new Reference(); 4674 return this.resourceReference; 4675 } 4676 else 4677 return super.addChild(name); 4678 } 4679 4680 public CitationCitedArtifactRelatesToComponent copy() { 4681 CitationCitedArtifactRelatesToComponent dst = new CitationCitedArtifactRelatesToComponent(); 4682 copyValues(dst); 4683 return dst; 4684 } 4685 4686 public void copyValues(CitationCitedArtifactRelatesToComponent dst) { 4687 super.copyValues(dst); 4688 dst.type = type == null ? null : type.copy(); 4689 if (classifier != null) { 4690 dst.classifier = new ArrayList<CodeableConcept>(); 4691 for (CodeableConcept i : classifier) 4692 dst.classifier.add(i.copy()); 4693 }; 4694 dst.label = label == null ? null : label.copy(); 4695 dst.display = display == null ? null : display.copy(); 4696 dst.citation = citation == null ? null : citation.copy(); 4697 dst.document = document == null ? null : document.copy(); 4698 dst.resource = resource == null ? null : resource.copy(); 4699 dst.resourceReference = resourceReference == null ? null : resourceReference.copy(); 4700 } 4701 4702 @Override 4703 public boolean equalsDeep(Base other_) { 4704 if (!super.equalsDeep(other_)) 4705 return false; 4706 if (!(other_ instanceof CitationCitedArtifactRelatesToComponent)) 4707 return false; 4708 CitationCitedArtifactRelatesToComponent o = (CitationCitedArtifactRelatesToComponent) other_; 4709 return compareDeep(type, o.type, true) && compareDeep(classifier, o.classifier, true) && compareDeep(label, o.label, true) 4710 && compareDeep(display, o.display, true) && compareDeep(citation, o.citation, true) && compareDeep(document, o.document, true) 4711 && compareDeep(resource, o.resource, true) && compareDeep(resourceReference, o.resourceReference, true) 4712 ; 4713 } 4714 4715 @Override 4716 public boolean equalsShallow(Base other_) { 4717 if (!super.equalsShallow(other_)) 4718 return false; 4719 if (!(other_ instanceof CitationCitedArtifactRelatesToComponent)) 4720 return false; 4721 CitationCitedArtifactRelatesToComponent o = (CitationCitedArtifactRelatesToComponent) other_; 4722 return compareValues(type, o.type, true) && compareValues(label, o.label, true) && compareValues(display, o.display, true) 4723 && compareValues(citation, o.citation, true) && compareValues(resource, o.resource, true); 4724 } 4725 4726 public boolean isEmpty() { 4727 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, classifier, label 4728 , display, citation, document, resource, resourceReference); 4729 } 4730 4731 public String fhirType() { 4732 return "Citation.citedArtifact.relatesTo"; 4733 4734 } 4735 4736 } 4737 4738 @Block() 4739 public static class CitationCitedArtifactPublicationFormComponent extends BackboneElement implements IBaseBackboneElement { 4740 /** 4741 * The collection the cited article or artifact is published in. 4742 */ 4743 @Child(name = "publishedIn", type = {}, order=1, min=0, max=1, modifier=false, summary=false) 4744 @Description(shortDefinition="The collection the cited article or artifact is published in", formalDefinition="The collection the cited article or artifact is published in." ) 4745 protected CitationCitedArtifactPublicationFormPublishedInComponent publishedIn; 4746 4747 /** 4748 * Describes the form of the medium cited. Common codes are "Internet" or "Print". The CitedMedium value set has 6 codes. The codes internet, print, and offline-digital-storage are the common codes for a typical publication form, though internet and print are more common for study citations. Three additional codes (each appending one of the primary codes with "-without-issue" are used for situations when a study is published both within an issue (of a periodical release as commonly done for journals) AND is published separately from the issue (as commonly done with early online publication), to represent specific identification of the publication form not associated with the issue. 4749 */ 4750 @Child(name = "citedMedium", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 4751 @Description(shortDefinition="Internet or Print", formalDefinition="Describes the form of the medium cited. Common codes are \"Internet\" or \"Print\". The CitedMedium value set has 6 codes. The codes internet, print, and offline-digital-storage are the common codes for a typical publication form, though internet and print are more common for study citations. Three additional codes (each appending one of the primary codes with \"-without-issue\" are used for situations when a study is published both within an issue (of a periodical release as commonly done for journals) AND is published separately from the issue (as commonly done with early online publication), to represent specific identification of the publication form not associated with the issue." ) 4752 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/cited-medium") 4753 protected CodeableConcept citedMedium; 4754 4755 /** 4756 * Volume number of journal or other collection in which the article is published. 4757 */ 4758 @Child(name = "volume", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 4759 @Description(shortDefinition="Volume number of journal or other collection in which the article is published", formalDefinition="Volume number of journal or other collection in which the article is published." ) 4760 protected StringType volume; 4761 4762 /** 4763 * Issue, part or supplement of journal or other collection in which the article is published. 4764 */ 4765 @Child(name = "issue", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 4766 @Description(shortDefinition="Issue, part or supplement of journal or other collection in which the article is published", formalDefinition="Issue, part or supplement of journal or other collection in which the article is published." ) 4767 protected StringType issue; 4768 4769 /** 4770 * The date the article was added to the database, or the date the article was released. 4771 */ 4772 @Child(name = "articleDate", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=false) 4773 @Description(shortDefinition="The date the article was added to the database, or the date the article was released", formalDefinition="The date the article was added to the database, or the date the article was released." ) 4774 protected DateTimeType articleDate; 4775 4776 /** 4777 * Text representation of the date on which the issue of the cited artifact was published. 4778 */ 4779 @Child(name = "publicationDateText", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 4780 @Description(shortDefinition="Text representation of the date on which the issue of the cited artifact was published", formalDefinition="Text representation of the date on which the issue of the cited artifact was published." ) 4781 protected StringType publicationDateText; 4782 4783 /** 4784 * Spring, Summer, Fall/Autumn, Winter. 4785 */ 4786 @Child(name = "publicationDateSeason", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) 4787 @Description(shortDefinition="Season in which the cited artifact was published", formalDefinition="Spring, Summer, Fall/Autumn, Winter." ) 4788 protected StringType publicationDateSeason; 4789 4790 /** 4791 * The date the article was last revised or updated in the database. 4792 */ 4793 @Child(name = "lastRevisionDate", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=false) 4794 @Description(shortDefinition="The date the article was last revised or updated in the database", formalDefinition="The date the article was last revised or updated in the database." ) 4795 protected DateTimeType lastRevisionDate; 4796 4797 /** 4798 * The language or languages in which this form of the article is published. 4799 */ 4800 @Child(name = "language", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4801 @Description(shortDefinition="Language(s) in which this form of the article is published", formalDefinition="The language or languages in which this form of the article is published." ) 4802 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/languages") 4803 protected List<CodeableConcept> language; 4804 4805 /** 4806 * Entry number or identifier for inclusion in a database. 4807 */ 4808 @Child(name = "accessionNumber", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 4809 @Description(shortDefinition="Entry number or identifier for inclusion in a database", formalDefinition="Entry number or identifier for inclusion in a database." ) 4810 protected StringType accessionNumber; 4811 4812 /** 4813 * Used for full display of pagination. 4814 */ 4815 @Child(name = "pageString", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) 4816 @Description(shortDefinition="Used for full display of pagination", formalDefinition="Used for full display of pagination." ) 4817 protected StringType pageString; 4818 4819 /** 4820 * Used for isolated representation of first page. 4821 */ 4822 @Child(name = "firstPage", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) 4823 @Description(shortDefinition="Used for isolated representation of first page", formalDefinition="Used for isolated representation of first page." ) 4824 protected StringType firstPage; 4825 4826 /** 4827 * Used for isolated representation of last page. 4828 */ 4829 @Child(name = "lastPage", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false) 4830 @Description(shortDefinition="Used for isolated representation of last page", formalDefinition="Used for isolated representation of last page." ) 4831 protected StringType lastPage; 4832 4833 /** 4834 * Actual or approximate number of pages or screens. Distinct from reporting the page numbers. 4835 */ 4836 @Child(name = "pageCount", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false) 4837 @Description(shortDefinition="Number of pages or screens", formalDefinition="Actual or approximate number of pages or screens. Distinct from reporting the page numbers." ) 4838 protected StringType pageCount; 4839 4840 /** 4841 * Copyright notice for the full article or artifact. 4842 */ 4843 @Child(name = "copyright", type = {MarkdownType.class}, order=15, min=0, max=1, modifier=false, summary=false) 4844 @Description(shortDefinition="Copyright notice for the full article or artifact", formalDefinition="Copyright notice for the full article or artifact." ) 4845 protected MarkdownType copyright; 4846 4847 private static final long serialVersionUID = 1791622597L; 4848 4849 /** 4850 * Constructor 4851 */ 4852 public CitationCitedArtifactPublicationFormComponent() { 4853 super(); 4854 } 4855 4856 /** 4857 * @return {@link #publishedIn} (The collection the cited article or artifact is published in.) 4858 */ 4859 public CitationCitedArtifactPublicationFormPublishedInComponent getPublishedIn() { 4860 if (this.publishedIn == null) 4861 if (Configuration.errorOnAutoCreate()) 4862 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormComponent.publishedIn"); 4863 else if (Configuration.doAutoCreate()) 4864 this.publishedIn = new CitationCitedArtifactPublicationFormPublishedInComponent(); // cc 4865 return this.publishedIn; 4866 } 4867 4868 public boolean hasPublishedIn() { 4869 return this.publishedIn != null && !this.publishedIn.isEmpty(); 4870 } 4871 4872 /** 4873 * @param value {@link #publishedIn} (The collection the cited article or artifact is published in.) 4874 */ 4875 public CitationCitedArtifactPublicationFormComponent setPublishedIn(CitationCitedArtifactPublicationFormPublishedInComponent value) { 4876 this.publishedIn = value; 4877 return this; 4878 } 4879 4880 /** 4881 * @return {@link #citedMedium} (Describes the form of the medium cited. Common codes are "Internet" or "Print". The CitedMedium value set has 6 codes. The codes internet, print, and offline-digital-storage are the common codes for a typical publication form, though internet and print are more common for study citations. Three additional codes (each appending one of the primary codes with "-without-issue" are used for situations when a study is published both within an issue (of a periodical release as commonly done for journals) AND is published separately from the issue (as commonly done with early online publication), to represent specific identification of the publication form not associated with the issue.) 4882 */ 4883 public CodeableConcept getCitedMedium() { 4884 if (this.citedMedium == null) 4885 if (Configuration.errorOnAutoCreate()) 4886 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormComponent.citedMedium"); 4887 else if (Configuration.doAutoCreate()) 4888 this.citedMedium = new CodeableConcept(); // cc 4889 return this.citedMedium; 4890 } 4891 4892 public boolean hasCitedMedium() { 4893 return this.citedMedium != null && !this.citedMedium.isEmpty(); 4894 } 4895 4896 /** 4897 * @param value {@link #citedMedium} (Describes the form of the medium cited. Common codes are "Internet" or "Print". The CitedMedium value set has 6 codes. The codes internet, print, and offline-digital-storage are the common codes for a typical publication form, though internet and print are more common for study citations. Three additional codes (each appending one of the primary codes with "-without-issue" are used for situations when a study is published both within an issue (of a periodical release as commonly done for journals) AND is published separately from the issue (as commonly done with early online publication), to represent specific identification of the publication form not associated with the issue.) 4898 */ 4899 public CitationCitedArtifactPublicationFormComponent setCitedMedium(CodeableConcept value) { 4900 this.citedMedium = value; 4901 return this; 4902 } 4903 4904 /** 4905 * @return {@link #volume} (Volume number of journal or other collection in which the article is published.). This is the underlying object with id, value and extensions. The accessor "getVolume" gives direct access to the value 4906 */ 4907 public StringType getVolumeElement() { 4908 if (this.volume == null) 4909 if (Configuration.errorOnAutoCreate()) 4910 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormComponent.volume"); 4911 else if (Configuration.doAutoCreate()) 4912 this.volume = new StringType(); // bb 4913 return this.volume; 4914 } 4915 4916 public boolean hasVolumeElement() { 4917 return this.volume != null && !this.volume.isEmpty(); 4918 } 4919 4920 public boolean hasVolume() { 4921 return this.volume != null && !this.volume.isEmpty(); 4922 } 4923 4924 /** 4925 * @param value {@link #volume} (Volume number of journal or other collection in which the article is published.). This is the underlying object with id, value and extensions. The accessor "getVolume" gives direct access to the value 4926 */ 4927 public CitationCitedArtifactPublicationFormComponent setVolumeElement(StringType value) { 4928 this.volume = value; 4929 return this; 4930 } 4931 4932 /** 4933 * @return Volume number of journal or other collection in which the article is published. 4934 */ 4935 public String getVolume() { 4936 return this.volume == null ? null : this.volume.getValue(); 4937 } 4938 4939 /** 4940 * @param value Volume number of journal or other collection in which the article is published. 4941 */ 4942 public CitationCitedArtifactPublicationFormComponent setVolume(String value) { 4943 if (Utilities.noString(value)) 4944 this.volume = null; 4945 else { 4946 if (this.volume == null) 4947 this.volume = new StringType(); 4948 this.volume.setValue(value); 4949 } 4950 return this; 4951 } 4952 4953 /** 4954 * @return {@link #issue} (Issue, part or supplement of journal or other collection in which the article is published.). This is the underlying object with id, value and extensions. The accessor "getIssue" gives direct access to the value 4955 */ 4956 public StringType getIssueElement() { 4957 if (this.issue == null) 4958 if (Configuration.errorOnAutoCreate()) 4959 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormComponent.issue"); 4960 else if (Configuration.doAutoCreate()) 4961 this.issue = new StringType(); // bb 4962 return this.issue; 4963 } 4964 4965 public boolean hasIssueElement() { 4966 return this.issue != null && !this.issue.isEmpty(); 4967 } 4968 4969 public boolean hasIssue() { 4970 return this.issue != null && !this.issue.isEmpty(); 4971 } 4972 4973 /** 4974 * @param value {@link #issue} (Issue, part or supplement of journal or other collection in which the article is published.). This is the underlying object with id, value and extensions. The accessor "getIssue" gives direct access to the value 4975 */ 4976 public CitationCitedArtifactPublicationFormComponent setIssueElement(StringType value) { 4977 this.issue = value; 4978 return this; 4979 } 4980 4981 /** 4982 * @return Issue, part or supplement of journal or other collection in which the article is published. 4983 */ 4984 public String getIssue() { 4985 return this.issue == null ? null : this.issue.getValue(); 4986 } 4987 4988 /** 4989 * @param value Issue, part or supplement of journal or other collection in which the article is published. 4990 */ 4991 public CitationCitedArtifactPublicationFormComponent setIssue(String value) { 4992 if (Utilities.noString(value)) 4993 this.issue = null; 4994 else { 4995 if (this.issue == null) 4996 this.issue = new StringType(); 4997 this.issue.setValue(value); 4998 } 4999 return this; 5000 } 5001 5002 /** 5003 * @return {@link #articleDate} (The date the article was added to the database, or the date the article was released.). This is the underlying object with id, value and extensions. The accessor "getArticleDate" gives direct access to the value 5004 */ 5005 public DateTimeType getArticleDateElement() { 5006 if (this.articleDate == null) 5007 if (Configuration.errorOnAutoCreate()) 5008 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormComponent.articleDate"); 5009 else if (Configuration.doAutoCreate()) 5010 this.articleDate = new DateTimeType(); // bb 5011 return this.articleDate; 5012 } 5013 5014 public boolean hasArticleDateElement() { 5015 return this.articleDate != null && !this.articleDate.isEmpty(); 5016 } 5017 5018 public boolean hasArticleDate() { 5019 return this.articleDate != null && !this.articleDate.isEmpty(); 5020 } 5021 5022 /** 5023 * @param value {@link #articleDate} (The date the article was added to the database, or the date the article was released.). This is the underlying object with id, value and extensions. The accessor "getArticleDate" gives direct access to the value 5024 */ 5025 public CitationCitedArtifactPublicationFormComponent setArticleDateElement(DateTimeType value) { 5026 this.articleDate = value; 5027 return this; 5028 } 5029 5030 /** 5031 * @return The date the article was added to the database, or the date the article was released. 5032 */ 5033 public Date getArticleDate() { 5034 return this.articleDate == null ? null : this.articleDate.getValue(); 5035 } 5036 5037 /** 5038 * @param value The date the article was added to the database, or the date the article was released. 5039 */ 5040 public CitationCitedArtifactPublicationFormComponent setArticleDate(Date value) { 5041 if (value == null) 5042 this.articleDate = null; 5043 else { 5044 if (this.articleDate == null) 5045 this.articleDate = new DateTimeType(); 5046 this.articleDate.setValue(value); 5047 } 5048 return this; 5049 } 5050 5051 /** 5052 * @return {@link #publicationDateText} (Text representation of the date on which the issue of the cited artifact was published.). This is the underlying object with id, value and extensions. The accessor "getPublicationDateText" gives direct access to the value 5053 */ 5054 public StringType getPublicationDateTextElement() { 5055 if (this.publicationDateText == null) 5056 if (Configuration.errorOnAutoCreate()) 5057 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormComponent.publicationDateText"); 5058 else if (Configuration.doAutoCreate()) 5059 this.publicationDateText = new StringType(); // bb 5060 return this.publicationDateText; 5061 } 5062 5063 public boolean hasPublicationDateTextElement() { 5064 return this.publicationDateText != null && !this.publicationDateText.isEmpty(); 5065 } 5066 5067 public boolean hasPublicationDateText() { 5068 return this.publicationDateText != null && !this.publicationDateText.isEmpty(); 5069 } 5070 5071 /** 5072 * @param value {@link #publicationDateText} (Text representation of the date on which the issue of the cited artifact was published.). This is the underlying object with id, value and extensions. The accessor "getPublicationDateText" gives direct access to the value 5073 */ 5074 public CitationCitedArtifactPublicationFormComponent setPublicationDateTextElement(StringType value) { 5075 this.publicationDateText = value; 5076 return this; 5077 } 5078 5079 /** 5080 * @return Text representation of the date on which the issue of the cited artifact was published. 5081 */ 5082 public String getPublicationDateText() { 5083 return this.publicationDateText == null ? null : this.publicationDateText.getValue(); 5084 } 5085 5086 /** 5087 * @param value Text representation of the date on which the issue of the cited artifact was published. 5088 */ 5089 public CitationCitedArtifactPublicationFormComponent setPublicationDateText(String value) { 5090 if (Utilities.noString(value)) 5091 this.publicationDateText = null; 5092 else { 5093 if (this.publicationDateText == null) 5094 this.publicationDateText = new StringType(); 5095 this.publicationDateText.setValue(value); 5096 } 5097 return this; 5098 } 5099 5100 /** 5101 * @return {@link #publicationDateSeason} (Spring, Summer, Fall/Autumn, Winter.). This is the underlying object with id, value and extensions. The accessor "getPublicationDateSeason" gives direct access to the value 5102 */ 5103 public StringType getPublicationDateSeasonElement() { 5104 if (this.publicationDateSeason == null) 5105 if (Configuration.errorOnAutoCreate()) 5106 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormComponent.publicationDateSeason"); 5107 else if (Configuration.doAutoCreate()) 5108 this.publicationDateSeason = new StringType(); // bb 5109 return this.publicationDateSeason; 5110 } 5111 5112 public boolean hasPublicationDateSeasonElement() { 5113 return this.publicationDateSeason != null && !this.publicationDateSeason.isEmpty(); 5114 } 5115 5116 public boolean hasPublicationDateSeason() { 5117 return this.publicationDateSeason != null && !this.publicationDateSeason.isEmpty(); 5118 } 5119 5120 /** 5121 * @param value {@link #publicationDateSeason} (Spring, Summer, Fall/Autumn, Winter.). This is the underlying object with id, value and extensions. The accessor "getPublicationDateSeason" gives direct access to the value 5122 */ 5123 public CitationCitedArtifactPublicationFormComponent setPublicationDateSeasonElement(StringType value) { 5124 this.publicationDateSeason = value; 5125 return this; 5126 } 5127 5128 /** 5129 * @return Spring, Summer, Fall/Autumn, Winter. 5130 */ 5131 public String getPublicationDateSeason() { 5132 return this.publicationDateSeason == null ? null : this.publicationDateSeason.getValue(); 5133 } 5134 5135 /** 5136 * @param value Spring, Summer, Fall/Autumn, Winter. 5137 */ 5138 public CitationCitedArtifactPublicationFormComponent setPublicationDateSeason(String value) { 5139 if (Utilities.noString(value)) 5140 this.publicationDateSeason = null; 5141 else { 5142 if (this.publicationDateSeason == null) 5143 this.publicationDateSeason = new StringType(); 5144 this.publicationDateSeason.setValue(value); 5145 } 5146 return this; 5147 } 5148 5149 /** 5150 * @return {@link #lastRevisionDate} (The date the article was last revised or updated in the database.). This is the underlying object with id, value and extensions. The accessor "getLastRevisionDate" gives direct access to the value 5151 */ 5152 public DateTimeType getLastRevisionDateElement() { 5153 if (this.lastRevisionDate == null) 5154 if (Configuration.errorOnAutoCreate()) 5155 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormComponent.lastRevisionDate"); 5156 else if (Configuration.doAutoCreate()) 5157 this.lastRevisionDate = new DateTimeType(); // bb 5158 return this.lastRevisionDate; 5159 } 5160 5161 public boolean hasLastRevisionDateElement() { 5162 return this.lastRevisionDate != null && !this.lastRevisionDate.isEmpty(); 5163 } 5164 5165 public boolean hasLastRevisionDate() { 5166 return this.lastRevisionDate != null && !this.lastRevisionDate.isEmpty(); 5167 } 5168 5169 /** 5170 * @param value {@link #lastRevisionDate} (The date the article was last revised or updated in the database.). This is the underlying object with id, value and extensions. The accessor "getLastRevisionDate" gives direct access to the value 5171 */ 5172 public CitationCitedArtifactPublicationFormComponent setLastRevisionDateElement(DateTimeType value) { 5173 this.lastRevisionDate = value; 5174 return this; 5175 } 5176 5177 /** 5178 * @return The date the article was last revised or updated in the database. 5179 */ 5180 public Date getLastRevisionDate() { 5181 return this.lastRevisionDate == null ? null : this.lastRevisionDate.getValue(); 5182 } 5183 5184 /** 5185 * @param value The date the article was last revised or updated in the database. 5186 */ 5187 public CitationCitedArtifactPublicationFormComponent setLastRevisionDate(Date value) { 5188 if (value == null) 5189 this.lastRevisionDate = null; 5190 else { 5191 if (this.lastRevisionDate == null) 5192 this.lastRevisionDate = new DateTimeType(); 5193 this.lastRevisionDate.setValue(value); 5194 } 5195 return this; 5196 } 5197 5198 /** 5199 * @return {@link #language} (The language or languages in which this form of the article is published.) 5200 */ 5201 public List<CodeableConcept> getLanguage() { 5202 if (this.language == null) 5203 this.language = new ArrayList<CodeableConcept>(); 5204 return this.language; 5205 } 5206 5207 /** 5208 * @return Returns a reference to <code>this</code> for easy method chaining 5209 */ 5210 public CitationCitedArtifactPublicationFormComponent setLanguage(List<CodeableConcept> theLanguage) { 5211 this.language = theLanguage; 5212 return this; 5213 } 5214 5215 public boolean hasLanguage() { 5216 if (this.language == null) 5217 return false; 5218 for (CodeableConcept item : this.language) 5219 if (!item.isEmpty()) 5220 return true; 5221 return false; 5222 } 5223 5224 public CodeableConcept addLanguage() { //3 5225 CodeableConcept t = new CodeableConcept(); 5226 if (this.language == null) 5227 this.language = new ArrayList<CodeableConcept>(); 5228 this.language.add(t); 5229 return t; 5230 } 5231 5232 public CitationCitedArtifactPublicationFormComponent addLanguage(CodeableConcept t) { //3 5233 if (t == null) 5234 return this; 5235 if (this.language == null) 5236 this.language = new ArrayList<CodeableConcept>(); 5237 this.language.add(t); 5238 return this; 5239 } 5240 5241 /** 5242 * @return The first repetition of repeating field {@link #language}, creating it if it does not already exist {3} 5243 */ 5244 public CodeableConcept getLanguageFirstRep() { 5245 if (getLanguage().isEmpty()) { 5246 addLanguage(); 5247 } 5248 return getLanguage().get(0); 5249 } 5250 5251 /** 5252 * @return {@link #accessionNumber} (Entry number or identifier for inclusion in a database.). This is the underlying object with id, value and extensions. The accessor "getAccessionNumber" gives direct access to the value 5253 */ 5254 public StringType getAccessionNumberElement() { 5255 if (this.accessionNumber == null) 5256 if (Configuration.errorOnAutoCreate()) 5257 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormComponent.accessionNumber"); 5258 else if (Configuration.doAutoCreate()) 5259 this.accessionNumber = new StringType(); // bb 5260 return this.accessionNumber; 5261 } 5262 5263 public boolean hasAccessionNumberElement() { 5264 return this.accessionNumber != null && !this.accessionNumber.isEmpty(); 5265 } 5266 5267 public boolean hasAccessionNumber() { 5268 return this.accessionNumber != null && !this.accessionNumber.isEmpty(); 5269 } 5270 5271 /** 5272 * @param value {@link #accessionNumber} (Entry number or identifier for inclusion in a database.). This is the underlying object with id, value and extensions. The accessor "getAccessionNumber" gives direct access to the value 5273 */ 5274 public CitationCitedArtifactPublicationFormComponent setAccessionNumberElement(StringType value) { 5275 this.accessionNumber = value; 5276 return this; 5277 } 5278 5279 /** 5280 * @return Entry number or identifier for inclusion in a database. 5281 */ 5282 public String getAccessionNumber() { 5283 return this.accessionNumber == null ? null : this.accessionNumber.getValue(); 5284 } 5285 5286 /** 5287 * @param value Entry number or identifier for inclusion in a database. 5288 */ 5289 public CitationCitedArtifactPublicationFormComponent setAccessionNumber(String value) { 5290 if (Utilities.noString(value)) 5291 this.accessionNumber = null; 5292 else { 5293 if (this.accessionNumber == null) 5294 this.accessionNumber = new StringType(); 5295 this.accessionNumber.setValue(value); 5296 } 5297 return this; 5298 } 5299 5300 /** 5301 * @return {@link #pageString} (Used for full display of pagination.). This is the underlying object with id, value and extensions. The accessor "getPageString" gives direct access to the value 5302 */ 5303 public StringType getPageStringElement() { 5304 if (this.pageString == null) 5305 if (Configuration.errorOnAutoCreate()) 5306 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormComponent.pageString"); 5307 else if (Configuration.doAutoCreate()) 5308 this.pageString = new StringType(); // bb 5309 return this.pageString; 5310 } 5311 5312 public boolean hasPageStringElement() { 5313 return this.pageString != null && !this.pageString.isEmpty(); 5314 } 5315 5316 public boolean hasPageString() { 5317 return this.pageString != null && !this.pageString.isEmpty(); 5318 } 5319 5320 /** 5321 * @param value {@link #pageString} (Used for full display of pagination.). This is the underlying object with id, value and extensions. The accessor "getPageString" gives direct access to the value 5322 */ 5323 public CitationCitedArtifactPublicationFormComponent setPageStringElement(StringType value) { 5324 this.pageString = value; 5325 return this; 5326 } 5327 5328 /** 5329 * @return Used for full display of pagination. 5330 */ 5331 public String getPageString() { 5332 return this.pageString == null ? null : this.pageString.getValue(); 5333 } 5334 5335 /** 5336 * @param value Used for full display of pagination. 5337 */ 5338 public CitationCitedArtifactPublicationFormComponent setPageString(String value) { 5339 if (Utilities.noString(value)) 5340 this.pageString = null; 5341 else { 5342 if (this.pageString == null) 5343 this.pageString = new StringType(); 5344 this.pageString.setValue(value); 5345 } 5346 return this; 5347 } 5348 5349 /** 5350 * @return {@link #firstPage} (Used for isolated representation of first page.). This is the underlying object with id, value and extensions. The accessor "getFirstPage" gives direct access to the value 5351 */ 5352 public StringType getFirstPageElement() { 5353 if (this.firstPage == null) 5354 if (Configuration.errorOnAutoCreate()) 5355 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormComponent.firstPage"); 5356 else if (Configuration.doAutoCreate()) 5357 this.firstPage = new StringType(); // bb 5358 return this.firstPage; 5359 } 5360 5361 public boolean hasFirstPageElement() { 5362 return this.firstPage != null && !this.firstPage.isEmpty(); 5363 } 5364 5365 public boolean hasFirstPage() { 5366 return this.firstPage != null && !this.firstPage.isEmpty(); 5367 } 5368 5369 /** 5370 * @param value {@link #firstPage} (Used for isolated representation of first page.). This is the underlying object with id, value and extensions. The accessor "getFirstPage" gives direct access to the value 5371 */ 5372 public CitationCitedArtifactPublicationFormComponent setFirstPageElement(StringType value) { 5373 this.firstPage = value; 5374 return this; 5375 } 5376 5377 /** 5378 * @return Used for isolated representation of first page. 5379 */ 5380 public String getFirstPage() { 5381 return this.firstPage == null ? null : this.firstPage.getValue(); 5382 } 5383 5384 /** 5385 * @param value Used for isolated representation of first page. 5386 */ 5387 public CitationCitedArtifactPublicationFormComponent setFirstPage(String value) { 5388 if (Utilities.noString(value)) 5389 this.firstPage = null; 5390 else { 5391 if (this.firstPage == null) 5392 this.firstPage = new StringType(); 5393 this.firstPage.setValue(value); 5394 } 5395 return this; 5396 } 5397 5398 /** 5399 * @return {@link #lastPage} (Used for isolated representation of last page.). This is the underlying object with id, value and extensions. The accessor "getLastPage" gives direct access to the value 5400 */ 5401 public StringType getLastPageElement() { 5402 if (this.lastPage == null) 5403 if (Configuration.errorOnAutoCreate()) 5404 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormComponent.lastPage"); 5405 else if (Configuration.doAutoCreate()) 5406 this.lastPage = new StringType(); // bb 5407 return this.lastPage; 5408 } 5409 5410 public boolean hasLastPageElement() { 5411 return this.lastPage != null && !this.lastPage.isEmpty(); 5412 } 5413 5414 public boolean hasLastPage() { 5415 return this.lastPage != null && !this.lastPage.isEmpty(); 5416 } 5417 5418 /** 5419 * @param value {@link #lastPage} (Used for isolated representation of last page.). This is the underlying object with id, value and extensions. The accessor "getLastPage" gives direct access to the value 5420 */ 5421 public CitationCitedArtifactPublicationFormComponent setLastPageElement(StringType value) { 5422 this.lastPage = value; 5423 return this; 5424 } 5425 5426 /** 5427 * @return Used for isolated representation of last page. 5428 */ 5429 public String getLastPage() { 5430 return this.lastPage == null ? null : this.lastPage.getValue(); 5431 } 5432 5433 /** 5434 * @param value Used for isolated representation of last page. 5435 */ 5436 public CitationCitedArtifactPublicationFormComponent setLastPage(String value) { 5437 if (Utilities.noString(value)) 5438 this.lastPage = null; 5439 else { 5440 if (this.lastPage == null) 5441 this.lastPage = new StringType(); 5442 this.lastPage.setValue(value); 5443 } 5444 return this; 5445 } 5446 5447 /** 5448 * @return {@link #pageCount} (Actual or approximate number of pages or screens. Distinct from reporting the page numbers.). This is the underlying object with id, value and extensions. The accessor "getPageCount" gives direct access to the value 5449 */ 5450 public StringType getPageCountElement() { 5451 if (this.pageCount == null) 5452 if (Configuration.errorOnAutoCreate()) 5453 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormComponent.pageCount"); 5454 else if (Configuration.doAutoCreate()) 5455 this.pageCount = new StringType(); // bb 5456 return this.pageCount; 5457 } 5458 5459 public boolean hasPageCountElement() { 5460 return this.pageCount != null && !this.pageCount.isEmpty(); 5461 } 5462 5463 public boolean hasPageCount() { 5464 return this.pageCount != null && !this.pageCount.isEmpty(); 5465 } 5466 5467 /** 5468 * @param value {@link #pageCount} (Actual or approximate number of pages or screens. Distinct from reporting the page numbers.). This is the underlying object with id, value and extensions. The accessor "getPageCount" gives direct access to the value 5469 */ 5470 public CitationCitedArtifactPublicationFormComponent setPageCountElement(StringType value) { 5471 this.pageCount = value; 5472 return this; 5473 } 5474 5475 /** 5476 * @return Actual or approximate number of pages or screens. Distinct from reporting the page numbers. 5477 */ 5478 public String getPageCount() { 5479 return this.pageCount == null ? null : this.pageCount.getValue(); 5480 } 5481 5482 /** 5483 * @param value Actual or approximate number of pages or screens. Distinct from reporting the page numbers. 5484 */ 5485 public CitationCitedArtifactPublicationFormComponent setPageCount(String value) { 5486 if (Utilities.noString(value)) 5487 this.pageCount = null; 5488 else { 5489 if (this.pageCount == null) 5490 this.pageCount = new StringType(); 5491 this.pageCount.setValue(value); 5492 } 5493 return this; 5494 } 5495 5496 /** 5497 * @return {@link #copyright} (Copyright notice for the full article or artifact.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 5498 */ 5499 public MarkdownType getCopyrightElement() { 5500 if (this.copyright == null) 5501 if (Configuration.errorOnAutoCreate()) 5502 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormComponent.copyright"); 5503 else if (Configuration.doAutoCreate()) 5504 this.copyright = new MarkdownType(); // bb 5505 return this.copyright; 5506 } 5507 5508 public boolean hasCopyrightElement() { 5509 return this.copyright != null && !this.copyright.isEmpty(); 5510 } 5511 5512 public boolean hasCopyright() { 5513 return this.copyright != null && !this.copyright.isEmpty(); 5514 } 5515 5516 /** 5517 * @param value {@link #copyright} (Copyright notice for the full article or artifact.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 5518 */ 5519 public CitationCitedArtifactPublicationFormComponent setCopyrightElement(MarkdownType value) { 5520 this.copyright = value; 5521 return this; 5522 } 5523 5524 /** 5525 * @return Copyright notice for the full article or artifact. 5526 */ 5527 public String getCopyright() { 5528 return this.copyright == null ? null : this.copyright.getValue(); 5529 } 5530 5531 /** 5532 * @param value Copyright notice for the full article or artifact. 5533 */ 5534 public CitationCitedArtifactPublicationFormComponent setCopyright(String value) { 5535 if (Utilities.noString(value)) 5536 this.copyright = null; 5537 else { 5538 if (this.copyright == null) 5539 this.copyright = new MarkdownType(); 5540 this.copyright.setValue(value); 5541 } 5542 return this; 5543 } 5544 5545 protected void listChildren(List<Property> children) { 5546 super.listChildren(children); 5547 children.add(new Property("publishedIn", "", "The collection the cited article or artifact is published in.", 0, 1, publishedIn)); 5548 children.add(new Property("citedMedium", "CodeableConcept", "Describes the form of the medium cited. Common codes are \"Internet\" or \"Print\". The CitedMedium value set has 6 codes. The codes internet, print, and offline-digital-storage are the common codes for a typical publication form, though internet and print are more common for study citations. Three additional codes (each appending one of the primary codes with \"-without-issue\" are used for situations when a study is published both within an issue (of a periodical release as commonly done for journals) AND is published separately from the issue (as commonly done with early online publication), to represent specific identification of the publication form not associated with the issue.", 0, 1, citedMedium)); 5549 children.add(new Property("volume", "string", "Volume number of journal or other collection in which the article is published.", 0, 1, volume)); 5550 children.add(new Property("issue", "string", "Issue, part or supplement of journal or other collection in which the article is published.", 0, 1, issue)); 5551 children.add(new Property("articleDate", "dateTime", "The date the article was added to the database, or the date the article was released.", 0, 1, articleDate)); 5552 children.add(new Property("publicationDateText", "string", "Text representation of the date on which the issue of the cited artifact was published.", 0, 1, publicationDateText)); 5553 children.add(new Property("publicationDateSeason", "string", "Spring, Summer, Fall/Autumn, Winter.", 0, 1, publicationDateSeason)); 5554 children.add(new Property("lastRevisionDate", "dateTime", "The date the article was last revised or updated in the database.", 0, 1, lastRevisionDate)); 5555 children.add(new Property("language", "CodeableConcept", "The language or languages in which this form of the article is published.", 0, java.lang.Integer.MAX_VALUE, language)); 5556 children.add(new Property("accessionNumber", "string", "Entry number or identifier for inclusion in a database.", 0, 1, accessionNumber)); 5557 children.add(new Property("pageString", "string", "Used for full display of pagination.", 0, 1, pageString)); 5558 children.add(new Property("firstPage", "string", "Used for isolated representation of first page.", 0, 1, firstPage)); 5559 children.add(new Property("lastPage", "string", "Used for isolated representation of last page.", 0, 1, lastPage)); 5560 children.add(new Property("pageCount", "string", "Actual or approximate number of pages or screens. Distinct from reporting the page numbers.", 0, 1, pageCount)); 5561 children.add(new Property("copyright", "markdown", "Copyright notice for the full article or artifact.", 0, 1, copyright)); 5562 } 5563 5564 @Override 5565 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 5566 switch (_hash) { 5567 case -614144077: /*publishedIn*/ return new Property("publishedIn", "", "The collection the cited article or artifact is published in.", 0, 1, publishedIn); 5568 case 612116418: /*citedMedium*/ return new Property("citedMedium", "CodeableConcept", "Describes the form of the medium cited. Common codes are \"Internet\" or \"Print\". The CitedMedium value set has 6 codes. The codes internet, print, and offline-digital-storage are the common codes for a typical publication form, though internet and print are more common for study citations. Three additional codes (each appending one of the primary codes with \"-without-issue\" are used for situations when a study is published both within an issue (of a periodical release as commonly done for journals) AND is published separately from the issue (as commonly done with early online publication), to represent specific identification of the publication form not associated with the issue.", 0, 1, citedMedium); 5569 case -810883302: /*volume*/ return new Property("volume", "string", "Volume number of journal or other collection in which the article is published.", 0, 1, volume); 5570 case 100509913: /*issue*/ return new Property("issue", "string", "Issue, part or supplement of journal or other collection in which the article is published.", 0, 1, issue); 5571 case 817743300: /*articleDate*/ return new Property("articleDate", "dateTime", "The date the article was added to the database, or the date the article was released.", 0, 1, articleDate); 5572 case 225590343: /*publicationDateText*/ return new Property("publicationDateText", "string", "Text representation of the date on which the issue of the cited artifact was published.", 0, 1, publicationDateText); 5573 case 2014643069: /*publicationDateSeason*/ return new Property("publicationDateSeason", "string", "Spring, Summer, Fall/Autumn, Winter.", 0, 1, publicationDateSeason); 5574 case 2129161183: /*lastRevisionDate*/ return new Property("lastRevisionDate", "dateTime", "The date the article was last revised or updated in the database.", 0, 1, lastRevisionDate); 5575 case -1613589672: /*language*/ return new Property("language", "CodeableConcept", "The language or languages in which this form of the article is published.", 0, java.lang.Integer.MAX_VALUE, language); 5576 case 1807963277: /*accessionNumber*/ return new Property("accessionNumber", "string", "Entry number or identifier for inclusion in a database.", 0, 1, accessionNumber); 5577 case 1287145344: /*pageString*/ return new Property("pageString", "string", "Used for full display of pagination.", 0, 1, pageString); 5578 case 132895071: /*firstPage*/ return new Property("firstPage", "string", "Used for isolated representation of first page.", 0, 1, firstPage); 5579 case -1459540411: /*lastPage*/ return new Property("lastPage", "string", "Used for isolated representation of last page.", 0, 1, lastPage); 5580 case 857882560: /*pageCount*/ return new Property("pageCount", "string", "Actual or approximate number of pages or screens. Distinct from reporting the page numbers.", 0, 1, pageCount); 5581 case 1522889671: /*copyright*/ return new Property("copyright", "markdown", "Copyright notice for the full article or artifact.", 0, 1, copyright); 5582 default: return super.getNamedProperty(_hash, _name, _checkValid); 5583 } 5584 5585 } 5586 5587 @Override 5588 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5589 switch (hash) { 5590 case -614144077: /*publishedIn*/ return this.publishedIn == null ? new Base[0] : new Base[] {this.publishedIn}; // CitationCitedArtifactPublicationFormPublishedInComponent 5591 case 612116418: /*citedMedium*/ return this.citedMedium == null ? new Base[0] : new Base[] {this.citedMedium}; // CodeableConcept 5592 case -810883302: /*volume*/ return this.volume == null ? new Base[0] : new Base[] {this.volume}; // StringType 5593 case 100509913: /*issue*/ return this.issue == null ? new Base[0] : new Base[] {this.issue}; // StringType 5594 case 817743300: /*articleDate*/ return this.articleDate == null ? new Base[0] : new Base[] {this.articleDate}; // DateTimeType 5595 case 225590343: /*publicationDateText*/ return this.publicationDateText == null ? new Base[0] : new Base[] {this.publicationDateText}; // StringType 5596 case 2014643069: /*publicationDateSeason*/ return this.publicationDateSeason == null ? new Base[0] : new Base[] {this.publicationDateSeason}; // StringType 5597 case 2129161183: /*lastRevisionDate*/ return this.lastRevisionDate == null ? new Base[0] : new Base[] {this.lastRevisionDate}; // DateTimeType 5598 case -1613589672: /*language*/ return this.language == null ? new Base[0] : this.language.toArray(new Base[this.language.size()]); // CodeableConcept 5599 case 1807963277: /*accessionNumber*/ return this.accessionNumber == null ? new Base[0] : new Base[] {this.accessionNumber}; // StringType 5600 case 1287145344: /*pageString*/ return this.pageString == null ? new Base[0] : new Base[] {this.pageString}; // StringType 5601 case 132895071: /*firstPage*/ return this.firstPage == null ? new Base[0] : new Base[] {this.firstPage}; // StringType 5602 case -1459540411: /*lastPage*/ return this.lastPage == null ? new Base[0] : new Base[] {this.lastPage}; // StringType 5603 case 857882560: /*pageCount*/ return this.pageCount == null ? new Base[0] : new Base[] {this.pageCount}; // StringType 5604 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 5605 default: return super.getProperty(hash, name, checkValid); 5606 } 5607 5608 } 5609 5610 @Override 5611 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5612 switch (hash) { 5613 case -614144077: // publishedIn 5614 this.publishedIn = (CitationCitedArtifactPublicationFormPublishedInComponent) value; // CitationCitedArtifactPublicationFormPublishedInComponent 5615 return value; 5616 case 612116418: // citedMedium 5617 this.citedMedium = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 5618 return value; 5619 case -810883302: // volume 5620 this.volume = TypeConvertor.castToString(value); // StringType 5621 return value; 5622 case 100509913: // issue 5623 this.issue = TypeConvertor.castToString(value); // StringType 5624 return value; 5625 case 817743300: // articleDate 5626 this.articleDate = TypeConvertor.castToDateTime(value); // DateTimeType 5627 return value; 5628 case 225590343: // publicationDateText 5629 this.publicationDateText = TypeConvertor.castToString(value); // StringType 5630 return value; 5631 case 2014643069: // publicationDateSeason 5632 this.publicationDateSeason = TypeConvertor.castToString(value); // StringType 5633 return value; 5634 case 2129161183: // lastRevisionDate 5635 this.lastRevisionDate = TypeConvertor.castToDateTime(value); // DateTimeType 5636 return value; 5637 case -1613589672: // language 5638 this.getLanguage().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 5639 return value; 5640 case 1807963277: // accessionNumber 5641 this.accessionNumber = TypeConvertor.castToString(value); // StringType 5642 return value; 5643 case 1287145344: // pageString 5644 this.pageString = TypeConvertor.castToString(value); // StringType 5645 return value; 5646 case 132895071: // firstPage 5647 this.firstPage = TypeConvertor.castToString(value); // StringType 5648 return value; 5649 case -1459540411: // lastPage 5650 this.lastPage = TypeConvertor.castToString(value); // StringType 5651 return value; 5652 case 857882560: // pageCount 5653 this.pageCount = TypeConvertor.castToString(value); // StringType 5654 return value; 5655 case 1522889671: // copyright 5656 this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType 5657 return value; 5658 default: return super.setProperty(hash, name, value); 5659 } 5660 5661 } 5662 5663 @Override 5664 public Base setProperty(String name, Base value) throws FHIRException { 5665 if (name.equals("publishedIn")) { 5666 this.publishedIn = (CitationCitedArtifactPublicationFormPublishedInComponent) value; // CitationCitedArtifactPublicationFormPublishedInComponent 5667 } else if (name.equals("citedMedium")) { 5668 this.citedMedium = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 5669 } else if (name.equals("volume")) { 5670 this.volume = TypeConvertor.castToString(value); // StringType 5671 } else if (name.equals("issue")) { 5672 this.issue = TypeConvertor.castToString(value); // StringType 5673 } else if (name.equals("articleDate")) { 5674 this.articleDate = TypeConvertor.castToDateTime(value); // DateTimeType 5675 } else if (name.equals("publicationDateText")) { 5676 this.publicationDateText = TypeConvertor.castToString(value); // StringType 5677 } else if (name.equals("publicationDateSeason")) { 5678 this.publicationDateSeason = TypeConvertor.castToString(value); // StringType 5679 } else if (name.equals("lastRevisionDate")) { 5680 this.lastRevisionDate = TypeConvertor.castToDateTime(value); // DateTimeType 5681 } else if (name.equals("language")) { 5682 this.getLanguage().add(TypeConvertor.castToCodeableConcept(value)); 5683 } else if (name.equals("accessionNumber")) { 5684 this.accessionNumber = TypeConvertor.castToString(value); // StringType 5685 } else if (name.equals("pageString")) { 5686 this.pageString = TypeConvertor.castToString(value); // StringType 5687 } else if (name.equals("firstPage")) { 5688 this.firstPage = TypeConvertor.castToString(value); // StringType 5689 } else if (name.equals("lastPage")) { 5690 this.lastPage = TypeConvertor.castToString(value); // StringType 5691 } else if (name.equals("pageCount")) { 5692 this.pageCount = TypeConvertor.castToString(value); // StringType 5693 } else if (name.equals("copyright")) { 5694 this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType 5695 } else 5696 return super.setProperty(name, value); 5697 return value; 5698 } 5699 5700 @Override 5701 public Base makeProperty(int hash, String name) throws FHIRException { 5702 switch (hash) { 5703 case -614144077: return getPublishedIn(); 5704 case 612116418: return getCitedMedium(); 5705 case -810883302: return getVolumeElement(); 5706 case 100509913: return getIssueElement(); 5707 case 817743300: return getArticleDateElement(); 5708 case 225590343: return getPublicationDateTextElement(); 5709 case 2014643069: return getPublicationDateSeasonElement(); 5710 case 2129161183: return getLastRevisionDateElement(); 5711 case -1613589672: return addLanguage(); 5712 case 1807963277: return getAccessionNumberElement(); 5713 case 1287145344: return getPageStringElement(); 5714 case 132895071: return getFirstPageElement(); 5715 case -1459540411: return getLastPageElement(); 5716 case 857882560: return getPageCountElement(); 5717 case 1522889671: return getCopyrightElement(); 5718 default: return super.makeProperty(hash, name); 5719 } 5720 5721 } 5722 5723 @Override 5724 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5725 switch (hash) { 5726 case -614144077: /*publishedIn*/ return new String[] {}; 5727 case 612116418: /*citedMedium*/ return new String[] {"CodeableConcept"}; 5728 case -810883302: /*volume*/ return new String[] {"string"}; 5729 case 100509913: /*issue*/ return new String[] {"string"}; 5730 case 817743300: /*articleDate*/ return new String[] {"dateTime"}; 5731 case 225590343: /*publicationDateText*/ return new String[] {"string"}; 5732 case 2014643069: /*publicationDateSeason*/ return new String[] {"string"}; 5733 case 2129161183: /*lastRevisionDate*/ return new String[] {"dateTime"}; 5734 case -1613589672: /*language*/ return new String[] {"CodeableConcept"}; 5735 case 1807963277: /*accessionNumber*/ return new String[] {"string"}; 5736 case 1287145344: /*pageString*/ return new String[] {"string"}; 5737 case 132895071: /*firstPage*/ return new String[] {"string"}; 5738 case -1459540411: /*lastPage*/ return new String[] {"string"}; 5739 case 857882560: /*pageCount*/ return new String[] {"string"}; 5740 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 5741 default: return super.getTypesForProperty(hash, name); 5742 } 5743 5744 } 5745 5746 @Override 5747 public Base addChild(String name) throws FHIRException { 5748 if (name.equals("publishedIn")) { 5749 this.publishedIn = new CitationCitedArtifactPublicationFormPublishedInComponent(); 5750 return this.publishedIn; 5751 } 5752 else if (name.equals("citedMedium")) { 5753 this.citedMedium = new CodeableConcept(); 5754 return this.citedMedium; 5755 } 5756 else if (name.equals("volume")) { 5757 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.publicationForm.volume"); 5758 } 5759 else if (name.equals("issue")) { 5760 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.publicationForm.issue"); 5761 } 5762 else if (name.equals("articleDate")) { 5763 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.publicationForm.articleDate"); 5764 } 5765 else if (name.equals("publicationDateText")) { 5766 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.publicationForm.publicationDateText"); 5767 } 5768 else if (name.equals("publicationDateSeason")) { 5769 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.publicationForm.publicationDateSeason"); 5770 } 5771 else if (name.equals("lastRevisionDate")) { 5772 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.publicationForm.lastRevisionDate"); 5773 } 5774 else if (name.equals("language")) { 5775 return addLanguage(); 5776 } 5777 else if (name.equals("accessionNumber")) { 5778 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.publicationForm.accessionNumber"); 5779 } 5780 else if (name.equals("pageString")) { 5781 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.publicationForm.pageString"); 5782 } 5783 else if (name.equals("firstPage")) { 5784 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.publicationForm.firstPage"); 5785 } 5786 else if (name.equals("lastPage")) { 5787 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.publicationForm.lastPage"); 5788 } 5789 else if (name.equals("pageCount")) { 5790 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.publicationForm.pageCount"); 5791 } 5792 else if (name.equals("copyright")) { 5793 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.publicationForm.copyright"); 5794 } 5795 else 5796 return super.addChild(name); 5797 } 5798 5799 public CitationCitedArtifactPublicationFormComponent copy() { 5800 CitationCitedArtifactPublicationFormComponent dst = new CitationCitedArtifactPublicationFormComponent(); 5801 copyValues(dst); 5802 return dst; 5803 } 5804 5805 public void copyValues(CitationCitedArtifactPublicationFormComponent dst) { 5806 super.copyValues(dst); 5807 dst.publishedIn = publishedIn == null ? null : publishedIn.copy(); 5808 dst.citedMedium = citedMedium == null ? null : citedMedium.copy(); 5809 dst.volume = volume == null ? null : volume.copy(); 5810 dst.issue = issue == null ? null : issue.copy(); 5811 dst.articleDate = articleDate == null ? null : articleDate.copy(); 5812 dst.publicationDateText = publicationDateText == null ? null : publicationDateText.copy(); 5813 dst.publicationDateSeason = publicationDateSeason == null ? null : publicationDateSeason.copy(); 5814 dst.lastRevisionDate = lastRevisionDate == null ? null : lastRevisionDate.copy(); 5815 if (language != null) { 5816 dst.language = new ArrayList<CodeableConcept>(); 5817 for (CodeableConcept i : language) 5818 dst.language.add(i.copy()); 5819 }; 5820 dst.accessionNumber = accessionNumber == null ? null : accessionNumber.copy(); 5821 dst.pageString = pageString == null ? null : pageString.copy(); 5822 dst.firstPage = firstPage == null ? null : firstPage.copy(); 5823 dst.lastPage = lastPage == null ? null : lastPage.copy(); 5824 dst.pageCount = pageCount == null ? null : pageCount.copy(); 5825 dst.copyright = copyright == null ? null : copyright.copy(); 5826 } 5827 5828 @Override 5829 public boolean equalsDeep(Base other_) { 5830 if (!super.equalsDeep(other_)) 5831 return false; 5832 if (!(other_ instanceof CitationCitedArtifactPublicationFormComponent)) 5833 return false; 5834 CitationCitedArtifactPublicationFormComponent o = (CitationCitedArtifactPublicationFormComponent) other_; 5835 return compareDeep(publishedIn, o.publishedIn, true) && compareDeep(citedMedium, o.citedMedium, true) 5836 && compareDeep(volume, o.volume, true) && compareDeep(issue, o.issue, true) && compareDeep(articleDate, o.articleDate, true) 5837 && compareDeep(publicationDateText, o.publicationDateText, true) && compareDeep(publicationDateSeason, o.publicationDateSeason, true) 5838 && compareDeep(lastRevisionDate, o.lastRevisionDate, true) && compareDeep(language, o.language, true) 5839 && compareDeep(accessionNumber, o.accessionNumber, true) && compareDeep(pageString, o.pageString, true) 5840 && compareDeep(firstPage, o.firstPage, true) && compareDeep(lastPage, o.lastPage, true) && compareDeep(pageCount, o.pageCount, true) 5841 && compareDeep(copyright, o.copyright, true); 5842 } 5843 5844 @Override 5845 public boolean equalsShallow(Base other_) { 5846 if (!super.equalsShallow(other_)) 5847 return false; 5848 if (!(other_ instanceof CitationCitedArtifactPublicationFormComponent)) 5849 return false; 5850 CitationCitedArtifactPublicationFormComponent o = (CitationCitedArtifactPublicationFormComponent) other_; 5851 return compareValues(volume, o.volume, true) && compareValues(issue, o.issue, true) && compareValues(articleDate, o.articleDate, true) 5852 && compareValues(publicationDateText, o.publicationDateText, true) && compareValues(publicationDateSeason, o.publicationDateSeason, true) 5853 && compareValues(lastRevisionDate, o.lastRevisionDate, true) && compareValues(accessionNumber, o.accessionNumber, true) 5854 && compareValues(pageString, o.pageString, true) && compareValues(firstPage, o.firstPage, true) && compareValues(lastPage, o.lastPage, true) 5855 && compareValues(pageCount, o.pageCount, true) && compareValues(copyright, o.copyright, true); 5856 } 5857 5858 public boolean isEmpty() { 5859 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(publishedIn, citedMedium, volume 5860 , issue, articleDate, publicationDateText, publicationDateSeason, lastRevisionDate 5861 , language, accessionNumber, pageString, firstPage, lastPage, pageCount, copyright 5862 ); 5863 } 5864 5865 public String fhirType() { 5866 return "Citation.citedArtifact.publicationForm"; 5867 5868 } 5869 5870 } 5871 5872 @Block() 5873 public static class CitationCitedArtifactPublicationFormPublishedInComponent extends BackboneElement implements IBaseBackboneElement { 5874 /** 5875 * Kind of container (e.g. Periodical, database, or book). 5876 */ 5877 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 5878 @Description(shortDefinition="Kind of container (e.g. Periodical, database, or book)", formalDefinition="Kind of container (e.g. Periodical, database, or book)." ) 5879 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/published-in-type") 5880 protected CodeableConcept type; 5881 5882 /** 5883 * Journal identifiers include ISSN, ISO Abbreviation and NLMuniqueID; Book identifiers include ISBN. 5884 */ 5885 @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5886 @Description(shortDefinition="Journal identifiers include ISSN, ISO Abbreviation and NLMuniqueID; Book identifiers include ISBN", formalDefinition="Journal identifiers include ISSN, ISO Abbreviation and NLMuniqueID; Book identifiers include ISBN." ) 5887 protected List<Identifier> identifier; 5888 5889 /** 5890 * Name of the database or title of the book or journal. 5891 */ 5892 @Child(name = "title", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 5893 @Description(shortDefinition="Name of the database or title of the book or journal", formalDefinition="Name of the database or title of the book or journal." ) 5894 protected StringType title; 5895 5896 /** 5897 * Name of or resource describing the publisher. 5898 */ 5899 @Child(name = "publisher", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=false) 5900 @Description(shortDefinition="Name of or resource describing the publisher", formalDefinition="Name of or resource describing the publisher." ) 5901 protected Reference publisher; 5902 5903 /** 5904 * Geographic location of the publisher. 5905 */ 5906 @Child(name = "publisherLocation", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 5907 @Description(shortDefinition="Geographic location of the publisher", formalDefinition="Geographic location of the publisher." ) 5908 protected StringType publisherLocation; 5909 5910 private static final long serialVersionUID = 1440066953L; 5911 5912 /** 5913 * Constructor 5914 */ 5915 public CitationCitedArtifactPublicationFormPublishedInComponent() { 5916 super(); 5917 } 5918 5919 /** 5920 * @return {@link #type} (Kind of container (e.g. Periodical, database, or book).) 5921 */ 5922 public CodeableConcept getType() { 5923 if (this.type == null) 5924 if (Configuration.errorOnAutoCreate()) 5925 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormPublishedInComponent.type"); 5926 else if (Configuration.doAutoCreate()) 5927 this.type = new CodeableConcept(); // cc 5928 return this.type; 5929 } 5930 5931 public boolean hasType() { 5932 return this.type != null && !this.type.isEmpty(); 5933 } 5934 5935 /** 5936 * @param value {@link #type} (Kind of container (e.g. Periodical, database, or book).) 5937 */ 5938 public CitationCitedArtifactPublicationFormPublishedInComponent setType(CodeableConcept value) { 5939 this.type = value; 5940 return this; 5941 } 5942 5943 /** 5944 * @return {@link #identifier} (Journal identifiers include ISSN, ISO Abbreviation and NLMuniqueID; Book identifiers include ISBN.) 5945 */ 5946 public List<Identifier> getIdentifier() { 5947 if (this.identifier == null) 5948 this.identifier = new ArrayList<Identifier>(); 5949 return this.identifier; 5950 } 5951 5952 /** 5953 * @return Returns a reference to <code>this</code> for easy method chaining 5954 */ 5955 public CitationCitedArtifactPublicationFormPublishedInComponent setIdentifier(List<Identifier> theIdentifier) { 5956 this.identifier = theIdentifier; 5957 return this; 5958 } 5959 5960 public boolean hasIdentifier() { 5961 if (this.identifier == null) 5962 return false; 5963 for (Identifier item : this.identifier) 5964 if (!item.isEmpty()) 5965 return true; 5966 return false; 5967 } 5968 5969 public Identifier addIdentifier() { //3 5970 Identifier t = new Identifier(); 5971 if (this.identifier == null) 5972 this.identifier = new ArrayList<Identifier>(); 5973 this.identifier.add(t); 5974 return t; 5975 } 5976 5977 public CitationCitedArtifactPublicationFormPublishedInComponent addIdentifier(Identifier t) { //3 5978 if (t == null) 5979 return this; 5980 if (this.identifier == null) 5981 this.identifier = new ArrayList<Identifier>(); 5982 this.identifier.add(t); 5983 return this; 5984 } 5985 5986 /** 5987 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 5988 */ 5989 public Identifier getIdentifierFirstRep() { 5990 if (getIdentifier().isEmpty()) { 5991 addIdentifier(); 5992 } 5993 return getIdentifier().get(0); 5994 } 5995 5996 /** 5997 * @return {@link #title} (Name of the database or title of the book or journal.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 5998 */ 5999 public StringType getTitleElement() { 6000 if (this.title == null) 6001 if (Configuration.errorOnAutoCreate()) 6002 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormPublishedInComponent.title"); 6003 else if (Configuration.doAutoCreate()) 6004 this.title = new StringType(); // bb 6005 return this.title; 6006 } 6007 6008 public boolean hasTitleElement() { 6009 return this.title != null && !this.title.isEmpty(); 6010 } 6011 6012 public boolean hasTitle() { 6013 return this.title != null && !this.title.isEmpty(); 6014 } 6015 6016 /** 6017 * @param value {@link #title} (Name of the database or title of the book or journal.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 6018 */ 6019 public CitationCitedArtifactPublicationFormPublishedInComponent setTitleElement(StringType value) { 6020 this.title = value; 6021 return this; 6022 } 6023 6024 /** 6025 * @return Name of the database or title of the book or journal. 6026 */ 6027 public String getTitle() { 6028 return this.title == null ? null : this.title.getValue(); 6029 } 6030 6031 /** 6032 * @param value Name of the database or title of the book or journal. 6033 */ 6034 public CitationCitedArtifactPublicationFormPublishedInComponent setTitle(String value) { 6035 if (Utilities.noString(value)) 6036 this.title = null; 6037 else { 6038 if (this.title == null) 6039 this.title = new StringType(); 6040 this.title.setValue(value); 6041 } 6042 return this; 6043 } 6044 6045 /** 6046 * @return {@link #publisher} (Name of or resource describing the publisher.) 6047 */ 6048 public Reference getPublisher() { 6049 if (this.publisher == null) 6050 if (Configuration.errorOnAutoCreate()) 6051 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormPublishedInComponent.publisher"); 6052 else if (Configuration.doAutoCreate()) 6053 this.publisher = new Reference(); // cc 6054 return this.publisher; 6055 } 6056 6057 public boolean hasPublisher() { 6058 return this.publisher != null && !this.publisher.isEmpty(); 6059 } 6060 6061 /** 6062 * @param value {@link #publisher} (Name of or resource describing the publisher.) 6063 */ 6064 public CitationCitedArtifactPublicationFormPublishedInComponent setPublisher(Reference value) { 6065 this.publisher = value; 6066 return this; 6067 } 6068 6069 /** 6070 * @return {@link #publisherLocation} (Geographic location of the publisher.). This is the underlying object with id, value and extensions. The accessor "getPublisherLocation" gives direct access to the value 6071 */ 6072 public StringType getPublisherLocationElement() { 6073 if (this.publisherLocation == null) 6074 if (Configuration.errorOnAutoCreate()) 6075 throw new Error("Attempt to auto-create CitationCitedArtifactPublicationFormPublishedInComponent.publisherLocation"); 6076 else if (Configuration.doAutoCreate()) 6077 this.publisherLocation = new StringType(); // bb 6078 return this.publisherLocation; 6079 } 6080 6081 public boolean hasPublisherLocationElement() { 6082 return this.publisherLocation != null && !this.publisherLocation.isEmpty(); 6083 } 6084 6085 public boolean hasPublisherLocation() { 6086 return this.publisherLocation != null && !this.publisherLocation.isEmpty(); 6087 } 6088 6089 /** 6090 * @param value {@link #publisherLocation} (Geographic location of the publisher.). This is the underlying object with id, value and extensions. The accessor "getPublisherLocation" gives direct access to the value 6091 */ 6092 public CitationCitedArtifactPublicationFormPublishedInComponent setPublisherLocationElement(StringType value) { 6093 this.publisherLocation = value; 6094 return this; 6095 } 6096 6097 /** 6098 * @return Geographic location of the publisher. 6099 */ 6100 public String getPublisherLocation() { 6101 return this.publisherLocation == null ? null : this.publisherLocation.getValue(); 6102 } 6103 6104 /** 6105 * @param value Geographic location of the publisher. 6106 */ 6107 public CitationCitedArtifactPublicationFormPublishedInComponent setPublisherLocation(String value) { 6108 if (Utilities.noString(value)) 6109 this.publisherLocation = null; 6110 else { 6111 if (this.publisherLocation == null) 6112 this.publisherLocation = new StringType(); 6113 this.publisherLocation.setValue(value); 6114 } 6115 return this; 6116 } 6117 6118 protected void listChildren(List<Property> children) { 6119 super.listChildren(children); 6120 children.add(new Property("type", "CodeableConcept", "Kind of container (e.g. Periodical, database, or book).", 0, 1, type)); 6121 children.add(new Property("identifier", "Identifier", "Journal identifiers include ISSN, ISO Abbreviation and NLMuniqueID; Book identifiers include ISBN.", 0, java.lang.Integer.MAX_VALUE, identifier)); 6122 children.add(new Property("title", "string", "Name of the database or title of the book or journal.", 0, 1, title)); 6123 children.add(new Property("publisher", "Reference(Organization)", "Name of or resource describing the publisher.", 0, 1, publisher)); 6124 children.add(new Property("publisherLocation", "string", "Geographic location of the publisher.", 0, 1, publisherLocation)); 6125 } 6126 6127 @Override 6128 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 6129 switch (_hash) { 6130 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Kind of container (e.g. Periodical, database, or book).", 0, 1, type); 6131 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Journal identifiers include ISSN, ISO Abbreviation and NLMuniqueID; Book identifiers include ISBN.", 0, java.lang.Integer.MAX_VALUE, identifier); 6132 case 110371416: /*title*/ return new Property("title", "string", "Name of the database or title of the book or journal.", 0, 1, title); 6133 case 1447404028: /*publisher*/ return new Property("publisher", "Reference(Organization)", "Name of or resource describing the publisher.", 0, 1, publisher); 6134 case -1281627695: /*publisherLocation*/ return new Property("publisherLocation", "string", "Geographic location of the publisher.", 0, 1, publisherLocation); 6135 default: return super.getNamedProperty(_hash, _name, _checkValid); 6136 } 6137 6138 } 6139 6140 @Override 6141 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6142 switch (hash) { 6143 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 6144 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 6145 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 6146 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // Reference 6147 case -1281627695: /*publisherLocation*/ return this.publisherLocation == null ? new Base[0] : new Base[] {this.publisherLocation}; // StringType 6148 default: return super.getProperty(hash, name, checkValid); 6149 } 6150 6151 } 6152 6153 @Override 6154 public Base setProperty(int hash, String name, Base value) throws FHIRException { 6155 switch (hash) { 6156 case 3575610: // type 6157 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 6158 return value; 6159 case -1618432855: // identifier 6160 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 6161 return value; 6162 case 110371416: // title 6163 this.title = TypeConvertor.castToString(value); // StringType 6164 return value; 6165 case 1447404028: // publisher 6166 this.publisher = TypeConvertor.castToReference(value); // Reference 6167 return value; 6168 case -1281627695: // publisherLocation 6169 this.publisherLocation = TypeConvertor.castToString(value); // StringType 6170 return value; 6171 default: return super.setProperty(hash, name, value); 6172 } 6173 6174 } 6175 6176 @Override 6177 public Base setProperty(String name, Base value) throws FHIRException { 6178 if (name.equals("type")) { 6179 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 6180 } else if (name.equals("identifier")) { 6181 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 6182 } else if (name.equals("title")) { 6183 this.title = TypeConvertor.castToString(value); // StringType 6184 } else if (name.equals("publisher")) { 6185 this.publisher = TypeConvertor.castToReference(value); // Reference 6186 } else if (name.equals("publisherLocation")) { 6187 this.publisherLocation = TypeConvertor.castToString(value); // StringType 6188 } else 6189 return super.setProperty(name, value); 6190 return value; 6191 } 6192 6193 @Override 6194 public Base makeProperty(int hash, String name) throws FHIRException { 6195 switch (hash) { 6196 case 3575610: return getType(); 6197 case -1618432855: return addIdentifier(); 6198 case 110371416: return getTitleElement(); 6199 case 1447404028: return getPublisher(); 6200 case -1281627695: return getPublisherLocationElement(); 6201 default: return super.makeProperty(hash, name); 6202 } 6203 6204 } 6205 6206 @Override 6207 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6208 switch (hash) { 6209 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 6210 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 6211 case 110371416: /*title*/ return new String[] {"string"}; 6212 case 1447404028: /*publisher*/ return new String[] {"Reference"}; 6213 case -1281627695: /*publisherLocation*/ return new String[] {"string"}; 6214 default: return super.getTypesForProperty(hash, name); 6215 } 6216 6217 } 6218 6219 @Override 6220 public Base addChild(String name) throws FHIRException { 6221 if (name.equals("type")) { 6222 this.type = new CodeableConcept(); 6223 return this.type; 6224 } 6225 else if (name.equals("identifier")) { 6226 return addIdentifier(); 6227 } 6228 else if (name.equals("title")) { 6229 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.publicationForm.publishedIn.title"); 6230 } 6231 else if (name.equals("publisher")) { 6232 this.publisher = new Reference(); 6233 return this.publisher; 6234 } 6235 else if (name.equals("publisherLocation")) { 6236 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.publicationForm.publishedIn.publisherLocation"); 6237 } 6238 else 6239 return super.addChild(name); 6240 } 6241 6242 public CitationCitedArtifactPublicationFormPublishedInComponent copy() { 6243 CitationCitedArtifactPublicationFormPublishedInComponent dst = new CitationCitedArtifactPublicationFormPublishedInComponent(); 6244 copyValues(dst); 6245 return dst; 6246 } 6247 6248 public void copyValues(CitationCitedArtifactPublicationFormPublishedInComponent dst) { 6249 super.copyValues(dst); 6250 dst.type = type == null ? null : type.copy(); 6251 if (identifier != null) { 6252 dst.identifier = new ArrayList<Identifier>(); 6253 for (Identifier i : identifier) 6254 dst.identifier.add(i.copy()); 6255 }; 6256 dst.title = title == null ? null : title.copy(); 6257 dst.publisher = publisher == null ? null : publisher.copy(); 6258 dst.publisherLocation = publisherLocation == null ? null : publisherLocation.copy(); 6259 } 6260 6261 @Override 6262 public boolean equalsDeep(Base other_) { 6263 if (!super.equalsDeep(other_)) 6264 return false; 6265 if (!(other_ instanceof CitationCitedArtifactPublicationFormPublishedInComponent)) 6266 return false; 6267 CitationCitedArtifactPublicationFormPublishedInComponent o = (CitationCitedArtifactPublicationFormPublishedInComponent) other_; 6268 return compareDeep(type, o.type, true) && compareDeep(identifier, o.identifier, true) && compareDeep(title, o.title, true) 6269 && compareDeep(publisher, o.publisher, true) && compareDeep(publisherLocation, o.publisherLocation, true) 6270 ; 6271 } 6272 6273 @Override 6274 public boolean equalsShallow(Base other_) { 6275 if (!super.equalsShallow(other_)) 6276 return false; 6277 if (!(other_ instanceof CitationCitedArtifactPublicationFormPublishedInComponent)) 6278 return false; 6279 CitationCitedArtifactPublicationFormPublishedInComponent o = (CitationCitedArtifactPublicationFormPublishedInComponent) other_; 6280 return compareValues(title, o.title, true) && compareValues(publisherLocation, o.publisherLocation, true) 6281 ; 6282 } 6283 6284 public boolean isEmpty() { 6285 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, identifier, title 6286 , publisher, publisherLocation); 6287 } 6288 6289 public String fhirType() { 6290 return "Citation.citedArtifact.publicationForm.publishedIn"; 6291 6292 } 6293 6294 } 6295 6296 @Block() 6297 public static class CitationCitedArtifactWebLocationComponent extends BackboneElement implements IBaseBackboneElement { 6298 /** 6299 * A characterization of the object expected at the web location. 6300 */ 6301 @Child(name = "classifier", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6302 @Description(shortDefinition="Code the reason for different URLs, e.g. abstract and full-text", formalDefinition="A characterization of the object expected at the web location." ) 6303 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/artifact-url-classifier") 6304 protected List<CodeableConcept> classifier; 6305 6306 /** 6307 * The specific URL. 6308 */ 6309 @Child(name = "url", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false) 6310 @Description(shortDefinition="The specific URL", formalDefinition="The specific URL." ) 6311 protected UriType url; 6312 6313 private static final long serialVersionUID = -1300703403L; 6314 6315 /** 6316 * Constructor 6317 */ 6318 public CitationCitedArtifactWebLocationComponent() { 6319 super(); 6320 } 6321 6322 /** 6323 * @return {@link #classifier} (A characterization of the object expected at the web location.) 6324 */ 6325 public List<CodeableConcept> getClassifier() { 6326 if (this.classifier == null) 6327 this.classifier = new ArrayList<CodeableConcept>(); 6328 return this.classifier; 6329 } 6330 6331 /** 6332 * @return Returns a reference to <code>this</code> for easy method chaining 6333 */ 6334 public CitationCitedArtifactWebLocationComponent setClassifier(List<CodeableConcept> theClassifier) { 6335 this.classifier = theClassifier; 6336 return this; 6337 } 6338 6339 public boolean hasClassifier() { 6340 if (this.classifier == null) 6341 return false; 6342 for (CodeableConcept item : this.classifier) 6343 if (!item.isEmpty()) 6344 return true; 6345 return false; 6346 } 6347 6348 public CodeableConcept addClassifier() { //3 6349 CodeableConcept t = new CodeableConcept(); 6350 if (this.classifier == null) 6351 this.classifier = new ArrayList<CodeableConcept>(); 6352 this.classifier.add(t); 6353 return t; 6354 } 6355 6356 public CitationCitedArtifactWebLocationComponent addClassifier(CodeableConcept t) { //3 6357 if (t == null) 6358 return this; 6359 if (this.classifier == null) 6360 this.classifier = new ArrayList<CodeableConcept>(); 6361 this.classifier.add(t); 6362 return this; 6363 } 6364 6365 /** 6366 * @return The first repetition of repeating field {@link #classifier}, creating it if it does not already exist {3} 6367 */ 6368 public CodeableConcept getClassifierFirstRep() { 6369 if (getClassifier().isEmpty()) { 6370 addClassifier(); 6371 } 6372 return getClassifier().get(0); 6373 } 6374 6375 /** 6376 * @return {@link #url} (The specific URL.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 6377 */ 6378 public UriType getUrlElement() { 6379 if (this.url == null) 6380 if (Configuration.errorOnAutoCreate()) 6381 throw new Error("Attempt to auto-create CitationCitedArtifactWebLocationComponent.url"); 6382 else if (Configuration.doAutoCreate()) 6383 this.url = new UriType(); // bb 6384 return this.url; 6385 } 6386 6387 public boolean hasUrlElement() { 6388 return this.url != null && !this.url.isEmpty(); 6389 } 6390 6391 public boolean hasUrl() { 6392 return this.url != null && !this.url.isEmpty(); 6393 } 6394 6395 /** 6396 * @param value {@link #url} (The specific URL.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 6397 */ 6398 public CitationCitedArtifactWebLocationComponent setUrlElement(UriType value) { 6399 this.url = value; 6400 return this; 6401 } 6402 6403 /** 6404 * @return The specific URL. 6405 */ 6406 public String getUrl() { 6407 return this.url == null ? null : this.url.getValue(); 6408 } 6409 6410 /** 6411 * @param value The specific URL. 6412 */ 6413 public CitationCitedArtifactWebLocationComponent setUrl(String value) { 6414 if (Utilities.noString(value)) 6415 this.url = null; 6416 else { 6417 if (this.url == null) 6418 this.url = new UriType(); 6419 this.url.setValue(value); 6420 } 6421 return this; 6422 } 6423 6424 protected void listChildren(List<Property> children) { 6425 super.listChildren(children); 6426 children.add(new Property("classifier", "CodeableConcept", "A characterization of the object expected at the web location.", 0, java.lang.Integer.MAX_VALUE, classifier)); 6427 children.add(new Property("url", "uri", "The specific URL.", 0, 1, url)); 6428 } 6429 6430 @Override 6431 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 6432 switch (_hash) { 6433 case -281470431: /*classifier*/ return new Property("classifier", "CodeableConcept", "A characterization of the object expected at the web location.", 0, java.lang.Integer.MAX_VALUE, classifier); 6434 case 116079: /*url*/ return new Property("url", "uri", "The specific URL.", 0, 1, url); 6435 default: return super.getNamedProperty(_hash, _name, _checkValid); 6436 } 6437 6438 } 6439 6440 @Override 6441 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6442 switch (hash) { 6443 case -281470431: /*classifier*/ return this.classifier == null ? new Base[0] : this.classifier.toArray(new Base[this.classifier.size()]); // CodeableConcept 6444 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 6445 default: return super.getProperty(hash, name, checkValid); 6446 } 6447 6448 } 6449 6450 @Override 6451 public Base setProperty(int hash, String name, Base value) throws FHIRException { 6452 switch (hash) { 6453 case -281470431: // classifier 6454 this.getClassifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 6455 return value; 6456 case 116079: // url 6457 this.url = TypeConvertor.castToUri(value); // UriType 6458 return value; 6459 default: return super.setProperty(hash, name, value); 6460 } 6461 6462 } 6463 6464 @Override 6465 public Base setProperty(String name, Base value) throws FHIRException { 6466 if (name.equals("classifier")) { 6467 this.getClassifier().add(TypeConvertor.castToCodeableConcept(value)); 6468 } else if (name.equals("url")) { 6469 this.url = TypeConvertor.castToUri(value); // UriType 6470 } else 6471 return super.setProperty(name, value); 6472 return value; 6473 } 6474 6475 @Override 6476 public Base makeProperty(int hash, String name) throws FHIRException { 6477 switch (hash) { 6478 case -281470431: return addClassifier(); 6479 case 116079: return getUrlElement(); 6480 default: return super.makeProperty(hash, name); 6481 } 6482 6483 } 6484 6485 @Override 6486 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6487 switch (hash) { 6488 case -281470431: /*classifier*/ return new String[] {"CodeableConcept"}; 6489 case 116079: /*url*/ return new String[] {"uri"}; 6490 default: return super.getTypesForProperty(hash, name); 6491 } 6492 6493 } 6494 6495 @Override 6496 public Base addChild(String name) throws FHIRException { 6497 if (name.equals("classifier")) { 6498 return addClassifier(); 6499 } 6500 else if (name.equals("url")) { 6501 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.webLocation.url"); 6502 } 6503 else 6504 return super.addChild(name); 6505 } 6506 6507 public CitationCitedArtifactWebLocationComponent copy() { 6508 CitationCitedArtifactWebLocationComponent dst = new CitationCitedArtifactWebLocationComponent(); 6509 copyValues(dst); 6510 return dst; 6511 } 6512 6513 public void copyValues(CitationCitedArtifactWebLocationComponent dst) { 6514 super.copyValues(dst); 6515 if (classifier != null) { 6516 dst.classifier = new ArrayList<CodeableConcept>(); 6517 for (CodeableConcept i : classifier) 6518 dst.classifier.add(i.copy()); 6519 }; 6520 dst.url = url == null ? null : url.copy(); 6521 } 6522 6523 @Override 6524 public boolean equalsDeep(Base other_) { 6525 if (!super.equalsDeep(other_)) 6526 return false; 6527 if (!(other_ instanceof CitationCitedArtifactWebLocationComponent)) 6528 return false; 6529 CitationCitedArtifactWebLocationComponent o = (CitationCitedArtifactWebLocationComponent) other_; 6530 return compareDeep(classifier, o.classifier, true) && compareDeep(url, o.url, true); 6531 } 6532 6533 @Override 6534 public boolean equalsShallow(Base other_) { 6535 if (!super.equalsShallow(other_)) 6536 return false; 6537 if (!(other_ instanceof CitationCitedArtifactWebLocationComponent)) 6538 return false; 6539 CitationCitedArtifactWebLocationComponent o = (CitationCitedArtifactWebLocationComponent) other_; 6540 return compareValues(url, o.url, true); 6541 } 6542 6543 public boolean isEmpty() { 6544 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(classifier, url); 6545 } 6546 6547 public String fhirType() { 6548 return "Citation.citedArtifact.webLocation"; 6549 6550 } 6551 6552 } 6553 6554 @Block() 6555 public static class CitationCitedArtifactClassificationComponent extends BackboneElement implements IBaseBackboneElement { 6556 /** 6557 * The kind of classifier (e.g. publication type, keyword). 6558 */ 6559 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 6560 @Description(shortDefinition="The kind of classifier (e.g. publication type, keyword)", formalDefinition="The kind of classifier (e.g. publication type, keyword)." ) 6561 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/cited-artifact-classification-type") 6562 protected CodeableConcept type; 6563 6564 /** 6565 * The specific classification value. 6566 */ 6567 @Child(name = "classifier", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6568 @Description(shortDefinition="The specific classification value", formalDefinition="The specific classification value." ) 6569 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/citation-artifact-classifier") 6570 protected List<CodeableConcept> classifier; 6571 6572 /** 6573 * Complex or externally created classification. 6574 */ 6575 @Child(name = "artifactAssessment", type = {ArtifactAssessment.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6576 @Description(shortDefinition="Complex or externally created classification", formalDefinition="Complex or externally created classification." ) 6577 protected List<Reference> artifactAssessment; 6578 6579 private static final long serialVersionUID = 394554928L; 6580 6581 /** 6582 * Constructor 6583 */ 6584 public CitationCitedArtifactClassificationComponent() { 6585 super(); 6586 } 6587 6588 /** 6589 * @return {@link #type} (The kind of classifier (e.g. publication type, keyword).) 6590 */ 6591 public CodeableConcept getType() { 6592 if (this.type == null) 6593 if (Configuration.errorOnAutoCreate()) 6594 throw new Error("Attempt to auto-create CitationCitedArtifactClassificationComponent.type"); 6595 else if (Configuration.doAutoCreate()) 6596 this.type = new CodeableConcept(); // cc 6597 return this.type; 6598 } 6599 6600 public boolean hasType() { 6601 return this.type != null && !this.type.isEmpty(); 6602 } 6603 6604 /** 6605 * @param value {@link #type} (The kind of classifier (e.g. publication type, keyword).) 6606 */ 6607 public CitationCitedArtifactClassificationComponent setType(CodeableConcept value) { 6608 this.type = value; 6609 return this; 6610 } 6611 6612 /** 6613 * @return {@link #classifier} (The specific classification value.) 6614 */ 6615 public List<CodeableConcept> getClassifier() { 6616 if (this.classifier == null) 6617 this.classifier = new ArrayList<CodeableConcept>(); 6618 return this.classifier; 6619 } 6620 6621 /** 6622 * @return Returns a reference to <code>this</code> for easy method chaining 6623 */ 6624 public CitationCitedArtifactClassificationComponent setClassifier(List<CodeableConcept> theClassifier) { 6625 this.classifier = theClassifier; 6626 return this; 6627 } 6628 6629 public boolean hasClassifier() { 6630 if (this.classifier == null) 6631 return false; 6632 for (CodeableConcept item : this.classifier) 6633 if (!item.isEmpty()) 6634 return true; 6635 return false; 6636 } 6637 6638 public CodeableConcept addClassifier() { //3 6639 CodeableConcept t = new CodeableConcept(); 6640 if (this.classifier == null) 6641 this.classifier = new ArrayList<CodeableConcept>(); 6642 this.classifier.add(t); 6643 return t; 6644 } 6645 6646 public CitationCitedArtifactClassificationComponent addClassifier(CodeableConcept t) { //3 6647 if (t == null) 6648 return this; 6649 if (this.classifier == null) 6650 this.classifier = new ArrayList<CodeableConcept>(); 6651 this.classifier.add(t); 6652 return this; 6653 } 6654 6655 /** 6656 * @return The first repetition of repeating field {@link #classifier}, creating it if it does not already exist {3} 6657 */ 6658 public CodeableConcept getClassifierFirstRep() { 6659 if (getClassifier().isEmpty()) { 6660 addClassifier(); 6661 } 6662 return getClassifier().get(0); 6663 } 6664 6665 /** 6666 * @return {@link #artifactAssessment} (Complex or externally created classification.) 6667 */ 6668 public List<Reference> getArtifactAssessment() { 6669 if (this.artifactAssessment == null) 6670 this.artifactAssessment = new ArrayList<Reference>(); 6671 return this.artifactAssessment; 6672 } 6673 6674 /** 6675 * @return Returns a reference to <code>this</code> for easy method chaining 6676 */ 6677 public CitationCitedArtifactClassificationComponent setArtifactAssessment(List<Reference> theArtifactAssessment) { 6678 this.artifactAssessment = theArtifactAssessment; 6679 return this; 6680 } 6681 6682 public boolean hasArtifactAssessment() { 6683 if (this.artifactAssessment == null) 6684 return false; 6685 for (Reference item : this.artifactAssessment) 6686 if (!item.isEmpty()) 6687 return true; 6688 return false; 6689 } 6690 6691 public Reference addArtifactAssessment() { //3 6692 Reference t = new Reference(); 6693 if (this.artifactAssessment == null) 6694 this.artifactAssessment = new ArrayList<Reference>(); 6695 this.artifactAssessment.add(t); 6696 return t; 6697 } 6698 6699 public CitationCitedArtifactClassificationComponent addArtifactAssessment(Reference t) { //3 6700 if (t == null) 6701 return this; 6702 if (this.artifactAssessment == null) 6703 this.artifactAssessment = new ArrayList<Reference>(); 6704 this.artifactAssessment.add(t); 6705 return this; 6706 } 6707 6708 /** 6709 * @return The first repetition of repeating field {@link #artifactAssessment}, creating it if it does not already exist {3} 6710 */ 6711 public Reference getArtifactAssessmentFirstRep() { 6712 if (getArtifactAssessment().isEmpty()) { 6713 addArtifactAssessment(); 6714 } 6715 return getArtifactAssessment().get(0); 6716 } 6717 6718 protected void listChildren(List<Property> children) { 6719 super.listChildren(children); 6720 children.add(new Property("type", "CodeableConcept", "The kind of classifier (e.g. publication type, keyword).", 0, 1, type)); 6721 children.add(new Property("classifier", "CodeableConcept", "The specific classification value.", 0, java.lang.Integer.MAX_VALUE, classifier)); 6722 children.add(new Property("artifactAssessment", "Reference(ArtifactAssessment)", "Complex or externally created classification.", 0, java.lang.Integer.MAX_VALUE, artifactAssessment)); 6723 } 6724 6725 @Override 6726 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 6727 switch (_hash) { 6728 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The kind of classifier (e.g. publication type, keyword).", 0, 1, type); 6729 case -281470431: /*classifier*/ return new Property("classifier", "CodeableConcept", "The specific classification value.", 0, java.lang.Integer.MAX_VALUE, classifier); 6730 case 1014987316: /*artifactAssessment*/ return new Property("artifactAssessment", "Reference(ArtifactAssessment)", "Complex or externally created classification.", 0, java.lang.Integer.MAX_VALUE, artifactAssessment); 6731 default: return super.getNamedProperty(_hash, _name, _checkValid); 6732 } 6733 6734 } 6735 6736 @Override 6737 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6738 switch (hash) { 6739 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 6740 case -281470431: /*classifier*/ return this.classifier == null ? new Base[0] : this.classifier.toArray(new Base[this.classifier.size()]); // CodeableConcept 6741 case 1014987316: /*artifactAssessment*/ return this.artifactAssessment == null ? new Base[0] : this.artifactAssessment.toArray(new Base[this.artifactAssessment.size()]); // Reference 6742 default: return super.getProperty(hash, name, checkValid); 6743 } 6744 6745 } 6746 6747 @Override 6748 public Base setProperty(int hash, String name, Base value) throws FHIRException { 6749 switch (hash) { 6750 case 3575610: // type 6751 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 6752 return value; 6753 case -281470431: // classifier 6754 this.getClassifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 6755 return value; 6756 case 1014987316: // artifactAssessment 6757 this.getArtifactAssessment().add(TypeConvertor.castToReference(value)); // Reference 6758 return value; 6759 default: return super.setProperty(hash, name, value); 6760 } 6761 6762 } 6763 6764 @Override 6765 public Base setProperty(String name, Base value) throws FHIRException { 6766 if (name.equals("type")) { 6767 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 6768 } else if (name.equals("classifier")) { 6769 this.getClassifier().add(TypeConvertor.castToCodeableConcept(value)); 6770 } else if (name.equals("artifactAssessment")) { 6771 this.getArtifactAssessment().add(TypeConvertor.castToReference(value)); 6772 } else 6773 return super.setProperty(name, value); 6774 return value; 6775 } 6776 6777 @Override 6778 public Base makeProperty(int hash, String name) throws FHIRException { 6779 switch (hash) { 6780 case 3575610: return getType(); 6781 case -281470431: return addClassifier(); 6782 case 1014987316: return addArtifactAssessment(); 6783 default: return super.makeProperty(hash, name); 6784 } 6785 6786 } 6787 6788 @Override 6789 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6790 switch (hash) { 6791 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 6792 case -281470431: /*classifier*/ return new String[] {"CodeableConcept"}; 6793 case 1014987316: /*artifactAssessment*/ return new String[] {"Reference"}; 6794 default: return super.getTypesForProperty(hash, name); 6795 } 6796 6797 } 6798 6799 @Override 6800 public Base addChild(String name) throws FHIRException { 6801 if (name.equals("type")) { 6802 this.type = new CodeableConcept(); 6803 return this.type; 6804 } 6805 else if (name.equals("classifier")) { 6806 return addClassifier(); 6807 } 6808 else if (name.equals("artifactAssessment")) { 6809 return addArtifactAssessment(); 6810 } 6811 else 6812 return super.addChild(name); 6813 } 6814 6815 public CitationCitedArtifactClassificationComponent copy() { 6816 CitationCitedArtifactClassificationComponent dst = new CitationCitedArtifactClassificationComponent(); 6817 copyValues(dst); 6818 return dst; 6819 } 6820 6821 public void copyValues(CitationCitedArtifactClassificationComponent dst) { 6822 super.copyValues(dst); 6823 dst.type = type == null ? null : type.copy(); 6824 if (classifier != null) { 6825 dst.classifier = new ArrayList<CodeableConcept>(); 6826 for (CodeableConcept i : classifier) 6827 dst.classifier.add(i.copy()); 6828 }; 6829 if (artifactAssessment != null) { 6830 dst.artifactAssessment = new ArrayList<Reference>(); 6831 for (Reference i : artifactAssessment) 6832 dst.artifactAssessment.add(i.copy()); 6833 }; 6834 } 6835 6836 @Override 6837 public boolean equalsDeep(Base other_) { 6838 if (!super.equalsDeep(other_)) 6839 return false; 6840 if (!(other_ instanceof CitationCitedArtifactClassificationComponent)) 6841 return false; 6842 CitationCitedArtifactClassificationComponent o = (CitationCitedArtifactClassificationComponent) other_; 6843 return compareDeep(type, o.type, true) && compareDeep(classifier, o.classifier, true) && compareDeep(artifactAssessment, o.artifactAssessment, true) 6844 ; 6845 } 6846 6847 @Override 6848 public boolean equalsShallow(Base other_) { 6849 if (!super.equalsShallow(other_)) 6850 return false; 6851 if (!(other_ instanceof CitationCitedArtifactClassificationComponent)) 6852 return false; 6853 CitationCitedArtifactClassificationComponent o = (CitationCitedArtifactClassificationComponent) other_; 6854 return true; 6855 } 6856 6857 public boolean isEmpty() { 6858 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, classifier, artifactAssessment 6859 ); 6860 } 6861 6862 public String fhirType() { 6863 return "Citation.citedArtifact.classification"; 6864 6865 } 6866 6867 } 6868 6869 @Block() 6870 public static class CitationCitedArtifactContributorshipComponent extends BackboneElement implements IBaseBackboneElement { 6871 /** 6872 * Indicates if the list includes all authors and/or contributors. 6873 */ 6874 @Child(name = "complete", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) 6875 @Description(shortDefinition="Indicates if the list includes all authors and/or contributors", formalDefinition="Indicates if the list includes all authors and/or contributors." ) 6876 protected BooleanType complete; 6877 6878 /** 6879 * An individual entity named as a contributor, for example in the author list or contributor list. 6880 */ 6881 @Child(name = "entry", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6882 @Description(shortDefinition="An individual entity named as a contributor", formalDefinition="An individual entity named as a contributor, for example in the author list or contributor list." ) 6883 protected List<CitationCitedArtifactContributorshipEntryComponent> entry; 6884 6885 /** 6886 * Used to record a display of the author/contributor list without separate data element for each list member. 6887 */ 6888 @Child(name = "summary", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6889 @Description(shortDefinition="Used to record a display of the author/contributor list without separate data element for each list member", formalDefinition="Used to record a display of the author/contributor list without separate data element for each list member." ) 6890 protected List<ContributorshipSummaryComponent> summary; 6891 6892 private static final long serialVersionUID = 662810405L; 6893 6894 /** 6895 * Constructor 6896 */ 6897 public CitationCitedArtifactContributorshipComponent() { 6898 super(); 6899 } 6900 6901 /** 6902 * @return {@link #complete} (Indicates if the list includes all authors and/or contributors.). This is the underlying object with id, value and extensions. The accessor "getComplete" gives direct access to the value 6903 */ 6904 public BooleanType getCompleteElement() { 6905 if (this.complete == null) 6906 if (Configuration.errorOnAutoCreate()) 6907 throw new Error("Attempt to auto-create CitationCitedArtifactContributorshipComponent.complete"); 6908 else if (Configuration.doAutoCreate()) 6909 this.complete = new BooleanType(); // bb 6910 return this.complete; 6911 } 6912 6913 public boolean hasCompleteElement() { 6914 return this.complete != null && !this.complete.isEmpty(); 6915 } 6916 6917 public boolean hasComplete() { 6918 return this.complete != null && !this.complete.isEmpty(); 6919 } 6920 6921 /** 6922 * @param value {@link #complete} (Indicates if the list includes all authors and/or contributors.). This is the underlying object with id, value and extensions. The accessor "getComplete" gives direct access to the value 6923 */ 6924 public CitationCitedArtifactContributorshipComponent setCompleteElement(BooleanType value) { 6925 this.complete = value; 6926 return this; 6927 } 6928 6929 /** 6930 * @return Indicates if the list includes all authors and/or contributors. 6931 */ 6932 public boolean getComplete() { 6933 return this.complete == null || this.complete.isEmpty() ? false : this.complete.getValue(); 6934 } 6935 6936 /** 6937 * @param value Indicates if the list includes all authors and/or contributors. 6938 */ 6939 public CitationCitedArtifactContributorshipComponent setComplete(boolean value) { 6940 if (this.complete == null) 6941 this.complete = new BooleanType(); 6942 this.complete.setValue(value); 6943 return this; 6944 } 6945 6946 /** 6947 * @return {@link #entry} (An individual entity named as a contributor, for example in the author list or contributor list.) 6948 */ 6949 public List<CitationCitedArtifactContributorshipEntryComponent> getEntry() { 6950 if (this.entry == null) 6951 this.entry = new ArrayList<CitationCitedArtifactContributorshipEntryComponent>(); 6952 return this.entry; 6953 } 6954 6955 /** 6956 * @return Returns a reference to <code>this</code> for easy method chaining 6957 */ 6958 public CitationCitedArtifactContributorshipComponent setEntry(List<CitationCitedArtifactContributorshipEntryComponent> theEntry) { 6959 this.entry = theEntry; 6960 return this; 6961 } 6962 6963 public boolean hasEntry() { 6964 if (this.entry == null) 6965 return false; 6966 for (CitationCitedArtifactContributorshipEntryComponent item : this.entry) 6967 if (!item.isEmpty()) 6968 return true; 6969 return false; 6970 } 6971 6972 public CitationCitedArtifactContributorshipEntryComponent addEntry() { //3 6973 CitationCitedArtifactContributorshipEntryComponent t = new CitationCitedArtifactContributorshipEntryComponent(); 6974 if (this.entry == null) 6975 this.entry = new ArrayList<CitationCitedArtifactContributorshipEntryComponent>(); 6976 this.entry.add(t); 6977 return t; 6978 } 6979 6980 public CitationCitedArtifactContributorshipComponent addEntry(CitationCitedArtifactContributorshipEntryComponent t) { //3 6981 if (t == null) 6982 return this; 6983 if (this.entry == null) 6984 this.entry = new ArrayList<CitationCitedArtifactContributorshipEntryComponent>(); 6985 this.entry.add(t); 6986 return this; 6987 } 6988 6989 /** 6990 * @return The first repetition of repeating field {@link #entry}, creating it if it does not already exist {3} 6991 */ 6992 public CitationCitedArtifactContributorshipEntryComponent getEntryFirstRep() { 6993 if (getEntry().isEmpty()) { 6994 addEntry(); 6995 } 6996 return getEntry().get(0); 6997 } 6998 6999 /** 7000 * @return {@link #summary} (Used to record a display of the author/contributor list without separate data element for each list member.) 7001 */ 7002 public List<ContributorshipSummaryComponent> getSummary() { 7003 if (this.summary == null) 7004 this.summary = new ArrayList<ContributorshipSummaryComponent>(); 7005 return this.summary; 7006 } 7007 7008 /** 7009 * @return Returns a reference to <code>this</code> for easy method chaining 7010 */ 7011 public CitationCitedArtifactContributorshipComponent setSummary(List<ContributorshipSummaryComponent> theSummary) { 7012 this.summary = theSummary; 7013 return this; 7014 } 7015 7016 public boolean hasSummary() { 7017 if (this.summary == null) 7018 return false; 7019 for (ContributorshipSummaryComponent item : this.summary) 7020 if (!item.isEmpty()) 7021 return true; 7022 return false; 7023 } 7024 7025 public ContributorshipSummaryComponent addSummary() { //3 7026 ContributorshipSummaryComponent t = new ContributorshipSummaryComponent(); 7027 if (this.summary == null) 7028 this.summary = new ArrayList<ContributorshipSummaryComponent>(); 7029 this.summary.add(t); 7030 return t; 7031 } 7032 7033 public CitationCitedArtifactContributorshipComponent addSummary(ContributorshipSummaryComponent t) { //3 7034 if (t == null) 7035 return this; 7036 if (this.summary == null) 7037 this.summary = new ArrayList<ContributorshipSummaryComponent>(); 7038 this.summary.add(t); 7039 return this; 7040 } 7041 7042 /** 7043 * @return The first repetition of repeating field {@link #summary}, creating it if it does not already exist {3} 7044 */ 7045 public ContributorshipSummaryComponent getSummaryFirstRep() { 7046 if (getSummary().isEmpty()) { 7047 addSummary(); 7048 } 7049 return getSummary().get(0); 7050 } 7051 7052 protected void listChildren(List<Property> children) { 7053 super.listChildren(children); 7054 children.add(new Property("complete", "boolean", "Indicates if the list includes all authors and/or contributors.", 0, 1, complete)); 7055 children.add(new Property("entry", "", "An individual entity named as a contributor, for example in the author list or contributor list.", 0, java.lang.Integer.MAX_VALUE, entry)); 7056 children.add(new Property("summary", "", "Used to record a display of the author/contributor list without separate data element for each list member.", 0, java.lang.Integer.MAX_VALUE, summary)); 7057 } 7058 7059 @Override 7060 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 7061 switch (_hash) { 7062 case -599445191: /*complete*/ return new Property("complete", "boolean", "Indicates if the list includes all authors and/or contributors.", 0, 1, complete); 7063 case 96667762: /*entry*/ return new Property("entry", "", "An individual entity named as a contributor, for example in the author list or contributor list.", 0, java.lang.Integer.MAX_VALUE, entry); 7064 case -1857640538: /*summary*/ return new Property("summary", "", "Used to record a display of the author/contributor list without separate data element for each list member.", 0, java.lang.Integer.MAX_VALUE, summary); 7065 default: return super.getNamedProperty(_hash, _name, _checkValid); 7066 } 7067 7068 } 7069 7070 @Override 7071 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7072 switch (hash) { 7073 case -599445191: /*complete*/ return this.complete == null ? new Base[0] : new Base[] {this.complete}; // BooleanType 7074 case 96667762: /*entry*/ return this.entry == null ? new Base[0] : this.entry.toArray(new Base[this.entry.size()]); // CitationCitedArtifactContributorshipEntryComponent 7075 case -1857640538: /*summary*/ return this.summary == null ? new Base[0] : this.summary.toArray(new Base[this.summary.size()]); // ContributorshipSummaryComponent 7076 default: return super.getProperty(hash, name, checkValid); 7077 } 7078 7079 } 7080 7081 @Override 7082 public Base setProperty(int hash, String name, Base value) throws FHIRException { 7083 switch (hash) { 7084 case -599445191: // complete 7085 this.complete = TypeConvertor.castToBoolean(value); // BooleanType 7086 return value; 7087 case 96667762: // entry 7088 this.getEntry().add((CitationCitedArtifactContributorshipEntryComponent) value); // CitationCitedArtifactContributorshipEntryComponent 7089 return value; 7090 case -1857640538: // summary 7091 this.getSummary().add((ContributorshipSummaryComponent) value); // ContributorshipSummaryComponent 7092 return value; 7093 default: return super.setProperty(hash, name, value); 7094 } 7095 7096 } 7097 7098 @Override 7099 public Base setProperty(String name, Base value) throws FHIRException { 7100 if (name.equals("complete")) { 7101 this.complete = TypeConvertor.castToBoolean(value); // BooleanType 7102 } else if (name.equals("entry")) { 7103 this.getEntry().add((CitationCitedArtifactContributorshipEntryComponent) value); 7104 } else if (name.equals("summary")) { 7105 this.getSummary().add((ContributorshipSummaryComponent) value); 7106 } else 7107 return super.setProperty(name, value); 7108 return value; 7109 } 7110 7111 @Override 7112 public Base makeProperty(int hash, String name) throws FHIRException { 7113 switch (hash) { 7114 case -599445191: return getCompleteElement(); 7115 case 96667762: return addEntry(); 7116 case -1857640538: return addSummary(); 7117 default: return super.makeProperty(hash, name); 7118 } 7119 7120 } 7121 7122 @Override 7123 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 7124 switch (hash) { 7125 case -599445191: /*complete*/ return new String[] {"boolean"}; 7126 case 96667762: /*entry*/ return new String[] {}; 7127 case -1857640538: /*summary*/ return new String[] {}; 7128 default: return super.getTypesForProperty(hash, name); 7129 } 7130 7131 } 7132 7133 @Override 7134 public Base addChild(String name) throws FHIRException { 7135 if (name.equals("complete")) { 7136 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.contributorship.complete"); 7137 } 7138 else if (name.equals("entry")) { 7139 return addEntry(); 7140 } 7141 else if (name.equals("summary")) { 7142 return addSummary(); 7143 } 7144 else 7145 return super.addChild(name); 7146 } 7147 7148 public CitationCitedArtifactContributorshipComponent copy() { 7149 CitationCitedArtifactContributorshipComponent dst = new CitationCitedArtifactContributorshipComponent(); 7150 copyValues(dst); 7151 return dst; 7152 } 7153 7154 public void copyValues(CitationCitedArtifactContributorshipComponent dst) { 7155 super.copyValues(dst); 7156 dst.complete = complete == null ? null : complete.copy(); 7157 if (entry != null) { 7158 dst.entry = new ArrayList<CitationCitedArtifactContributorshipEntryComponent>(); 7159 for (CitationCitedArtifactContributorshipEntryComponent i : entry) 7160 dst.entry.add(i.copy()); 7161 }; 7162 if (summary != null) { 7163 dst.summary = new ArrayList<ContributorshipSummaryComponent>(); 7164 for (ContributorshipSummaryComponent i : summary) 7165 dst.summary.add(i.copy()); 7166 }; 7167 } 7168 7169 @Override 7170 public boolean equalsDeep(Base other_) { 7171 if (!super.equalsDeep(other_)) 7172 return false; 7173 if (!(other_ instanceof CitationCitedArtifactContributorshipComponent)) 7174 return false; 7175 CitationCitedArtifactContributorshipComponent o = (CitationCitedArtifactContributorshipComponent) other_; 7176 return compareDeep(complete, o.complete, true) && compareDeep(entry, o.entry, true) && compareDeep(summary, o.summary, true) 7177 ; 7178 } 7179 7180 @Override 7181 public boolean equalsShallow(Base other_) { 7182 if (!super.equalsShallow(other_)) 7183 return false; 7184 if (!(other_ instanceof CitationCitedArtifactContributorshipComponent)) 7185 return false; 7186 CitationCitedArtifactContributorshipComponent o = (CitationCitedArtifactContributorshipComponent) other_; 7187 return compareValues(complete, o.complete, true); 7188 } 7189 7190 public boolean isEmpty() { 7191 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(complete, entry, summary 7192 ); 7193 } 7194 7195 public String fhirType() { 7196 return "Citation.citedArtifact.contributorship"; 7197 7198 } 7199 7200 } 7201 7202 @Block() 7203 public static class CitationCitedArtifactContributorshipEntryComponent extends BackboneElement implements IBaseBackboneElement { 7204 /** 7205 * The identity of the individual contributor. 7206 */ 7207 @Child(name = "contributor", type = {Practitioner.class, Organization.class}, order=1, min=1, max=1, modifier=false, summary=false) 7208 @Description(shortDefinition="The identity of the individual contributor", formalDefinition="The identity of the individual contributor." ) 7209 protected Reference contributor; 7210 7211 /** 7212 * For citation styles that use initials. 7213 */ 7214 @Child(name = "forenameInitials", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 7215 @Description(shortDefinition="For citation styles that use initials", formalDefinition="For citation styles that use initials." ) 7216 protected StringType forenameInitials; 7217 7218 /** 7219 * Organization affiliated with the contributor. 7220 */ 7221 @Child(name = "affiliation", type = {Organization.class, PractitionerRole.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 7222 @Description(shortDefinition="Organizational affiliation", formalDefinition="Organization affiliated with the contributor." ) 7223 protected List<Reference> affiliation; 7224 7225 /** 7226 * This element identifies the specific nature of an individual?s contribution with respect to the cited work. 7227 */ 7228 @Child(name = "contributionType", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 7229 @Description(shortDefinition="The specific contribution", formalDefinition="This element identifies the specific nature of an individual?s contribution with respect to the cited work." ) 7230 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/artifact-contribution-type") 7231 protected List<CodeableConcept> contributionType; 7232 7233 /** 7234 * The role of the contributor (e.g. author, editor, reviewer, funder). 7235 */ 7236 @Child(name = "role", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) 7237 @Description(shortDefinition="The role of the contributor (e.g. author, editor, reviewer, funder)", formalDefinition="The role of the contributor (e.g. author, editor, reviewer, funder)." ) 7238 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contributor-role") 7239 protected CodeableConcept role; 7240 7241 /** 7242 * Contributions with accounting for time or number. 7243 */ 7244 @Child(name = "contributionInstance", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 7245 @Description(shortDefinition="Contributions with accounting for time or number", formalDefinition="Contributions with accounting for time or number." ) 7246 protected List<CitationCitedArtifactContributorshipEntryContributionInstanceComponent> contributionInstance; 7247 7248 /** 7249 * Whether the contributor is the corresponding contributor for the role. 7250 */ 7251 @Child(name = "correspondingContact", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=false) 7252 @Description(shortDefinition="Whether the contributor is the corresponding contributor for the role", formalDefinition="Whether the contributor is the corresponding contributor for the role." ) 7253 protected BooleanType correspondingContact; 7254 7255 /** 7256 * Provides a numerical ranking to represent the degree of contributorship relative to other contributors, such as 1 for first author and 2 for second author. 7257 */ 7258 @Child(name = "rankingOrder", type = {PositiveIntType.class}, order=8, min=0, max=1, modifier=false, summary=false) 7259 @Description(shortDefinition="Ranked order of contribution", formalDefinition="Provides a numerical ranking to represent the degree of contributorship relative to other contributors, such as 1 for first author and 2 for second author." ) 7260 protected PositiveIntType rankingOrder; 7261 7262 private static final long serialVersionUID = 1654594857L; 7263 7264 /** 7265 * Constructor 7266 */ 7267 public CitationCitedArtifactContributorshipEntryComponent() { 7268 super(); 7269 } 7270 7271 /** 7272 * Constructor 7273 */ 7274 public CitationCitedArtifactContributorshipEntryComponent(Reference contributor) { 7275 super(); 7276 this.setContributor(contributor); 7277 } 7278 7279 /** 7280 * @return {@link #contributor} (The identity of the individual contributor.) 7281 */ 7282 public Reference getContributor() { 7283 if (this.contributor == null) 7284 if (Configuration.errorOnAutoCreate()) 7285 throw new Error("Attempt to auto-create CitationCitedArtifactContributorshipEntryComponent.contributor"); 7286 else if (Configuration.doAutoCreate()) 7287 this.contributor = new Reference(); // cc 7288 return this.contributor; 7289 } 7290 7291 public boolean hasContributor() { 7292 return this.contributor != null && !this.contributor.isEmpty(); 7293 } 7294 7295 /** 7296 * @param value {@link #contributor} (The identity of the individual contributor.) 7297 */ 7298 public CitationCitedArtifactContributorshipEntryComponent setContributor(Reference value) { 7299 this.contributor = value; 7300 return this; 7301 } 7302 7303 /** 7304 * @return {@link #forenameInitials} (For citation styles that use initials.). This is the underlying object with id, value and extensions. The accessor "getForenameInitials" gives direct access to the value 7305 */ 7306 public StringType getForenameInitialsElement() { 7307 if (this.forenameInitials == null) 7308 if (Configuration.errorOnAutoCreate()) 7309 throw new Error("Attempt to auto-create CitationCitedArtifactContributorshipEntryComponent.forenameInitials"); 7310 else if (Configuration.doAutoCreate()) 7311 this.forenameInitials = new StringType(); // bb 7312 return this.forenameInitials; 7313 } 7314 7315 public boolean hasForenameInitialsElement() { 7316 return this.forenameInitials != null && !this.forenameInitials.isEmpty(); 7317 } 7318 7319 public boolean hasForenameInitials() { 7320 return this.forenameInitials != null && !this.forenameInitials.isEmpty(); 7321 } 7322 7323 /** 7324 * @param value {@link #forenameInitials} (For citation styles that use initials.). This is the underlying object with id, value and extensions. The accessor "getForenameInitials" gives direct access to the value 7325 */ 7326 public CitationCitedArtifactContributorshipEntryComponent setForenameInitialsElement(StringType value) { 7327 this.forenameInitials = value; 7328 return this; 7329 } 7330 7331 /** 7332 * @return For citation styles that use initials. 7333 */ 7334 public String getForenameInitials() { 7335 return this.forenameInitials == null ? null : this.forenameInitials.getValue(); 7336 } 7337 7338 /** 7339 * @param value For citation styles that use initials. 7340 */ 7341 public CitationCitedArtifactContributorshipEntryComponent setForenameInitials(String value) { 7342 if (Utilities.noString(value)) 7343 this.forenameInitials = null; 7344 else { 7345 if (this.forenameInitials == null) 7346 this.forenameInitials = new StringType(); 7347 this.forenameInitials.setValue(value); 7348 } 7349 return this; 7350 } 7351 7352 /** 7353 * @return {@link #affiliation} (Organization affiliated with the contributor.) 7354 */ 7355 public List<Reference> getAffiliation() { 7356 if (this.affiliation == null) 7357 this.affiliation = new ArrayList<Reference>(); 7358 return this.affiliation; 7359 } 7360 7361 /** 7362 * @return Returns a reference to <code>this</code> for easy method chaining 7363 */ 7364 public CitationCitedArtifactContributorshipEntryComponent setAffiliation(List<Reference> theAffiliation) { 7365 this.affiliation = theAffiliation; 7366 return this; 7367 } 7368 7369 public boolean hasAffiliation() { 7370 if (this.affiliation == null) 7371 return false; 7372 for (Reference item : this.affiliation) 7373 if (!item.isEmpty()) 7374 return true; 7375 return false; 7376 } 7377 7378 public Reference addAffiliation() { //3 7379 Reference t = new Reference(); 7380 if (this.affiliation == null) 7381 this.affiliation = new ArrayList<Reference>(); 7382 this.affiliation.add(t); 7383 return t; 7384 } 7385 7386 public CitationCitedArtifactContributorshipEntryComponent addAffiliation(Reference t) { //3 7387 if (t == null) 7388 return this; 7389 if (this.affiliation == null) 7390 this.affiliation = new ArrayList<Reference>(); 7391 this.affiliation.add(t); 7392 return this; 7393 } 7394 7395 /** 7396 * @return The first repetition of repeating field {@link #affiliation}, creating it if it does not already exist {3} 7397 */ 7398 public Reference getAffiliationFirstRep() { 7399 if (getAffiliation().isEmpty()) { 7400 addAffiliation(); 7401 } 7402 return getAffiliation().get(0); 7403 } 7404 7405 /** 7406 * @return {@link #contributionType} (This element identifies the specific nature of an individual?s contribution with respect to the cited work.) 7407 */ 7408 public List<CodeableConcept> getContributionType() { 7409 if (this.contributionType == null) 7410 this.contributionType = new ArrayList<CodeableConcept>(); 7411 return this.contributionType; 7412 } 7413 7414 /** 7415 * @return Returns a reference to <code>this</code> for easy method chaining 7416 */ 7417 public CitationCitedArtifactContributorshipEntryComponent setContributionType(List<CodeableConcept> theContributionType) { 7418 this.contributionType = theContributionType; 7419 return this; 7420 } 7421 7422 public boolean hasContributionType() { 7423 if (this.contributionType == null) 7424 return false; 7425 for (CodeableConcept item : this.contributionType) 7426 if (!item.isEmpty()) 7427 return true; 7428 return false; 7429 } 7430 7431 public CodeableConcept addContributionType() { //3 7432 CodeableConcept t = new CodeableConcept(); 7433 if (this.contributionType == null) 7434 this.contributionType = new ArrayList<CodeableConcept>(); 7435 this.contributionType.add(t); 7436 return t; 7437 } 7438 7439 public CitationCitedArtifactContributorshipEntryComponent addContributionType(CodeableConcept t) { //3 7440 if (t == null) 7441 return this; 7442 if (this.contributionType == null) 7443 this.contributionType = new ArrayList<CodeableConcept>(); 7444 this.contributionType.add(t); 7445 return this; 7446 } 7447 7448 /** 7449 * @return The first repetition of repeating field {@link #contributionType}, creating it if it does not already exist {3} 7450 */ 7451 public CodeableConcept getContributionTypeFirstRep() { 7452 if (getContributionType().isEmpty()) { 7453 addContributionType(); 7454 } 7455 return getContributionType().get(0); 7456 } 7457 7458 /** 7459 * @return {@link #role} (The role of the contributor (e.g. author, editor, reviewer, funder).) 7460 */ 7461 public CodeableConcept getRole() { 7462 if (this.role == null) 7463 if (Configuration.errorOnAutoCreate()) 7464 throw new Error("Attempt to auto-create CitationCitedArtifactContributorshipEntryComponent.role"); 7465 else if (Configuration.doAutoCreate()) 7466 this.role = new CodeableConcept(); // cc 7467 return this.role; 7468 } 7469 7470 public boolean hasRole() { 7471 return this.role != null && !this.role.isEmpty(); 7472 } 7473 7474 /** 7475 * @param value {@link #role} (The role of the contributor (e.g. author, editor, reviewer, funder).) 7476 */ 7477 public CitationCitedArtifactContributorshipEntryComponent setRole(CodeableConcept value) { 7478 this.role = value; 7479 return this; 7480 } 7481 7482 /** 7483 * @return {@link #contributionInstance} (Contributions with accounting for time or number.) 7484 */ 7485 public List<CitationCitedArtifactContributorshipEntryContributionInstanceComponent> getContributionInstance() { 7486 if (this.contributionInstance == null) 7487 this.contributionInstance = new ArrayList<CitationCitedArtifactContributorshipEntryContributionInstanceComponent>(); 7488 return this.contributionInstance; 7489 } 7490 7491 /** 7492 * @return Returns a reference to <code>this</code> for easy method chaining 7493 */ 7494 public CitationCitedArtifactContributorshipEntryComponent setContributionInstance(List<CitationCitedArtifactContributorshipEntryContributionInstanceComponent> theContributionInstance) { 7495 this.contributionInstance = theContributionInstance; 7496 return this; 7497 } 7498 7499 public boolean hasContributionInstance() { 7500 if (this.contributionInstance == null) 7501 return false; 7502 for (CitationCitedArtifactContributorshipEntryContributionInstanceComponent item : this.contributionInstance) 7503 if (!item.isEmpty()) 7504 return true; 7505 return false; 7506 } 7507 7508 public CitationCitedArtifactContributorshipEntryContributionInstanceComponent addContributionInstance() { //3 7509 CitationCitedArtifactContributorshipEntryContributionInstanceComponent t = new CitationCitedArtifactContributorshipEntryContributionInstanceComponent(); 7510 if (this.contributionInstance == null) 7511 this.contributionInstance = new ArrayList<CitationCitedArtifactContributorshipEntryContributionInstanceComponent>(); 7512 this.contributionInstance.add(t); 7513 return t; 7514 } 7515 7516 public CitationCitedArtifactContributorshipEntryComponent addContributionInstance(CitationCitedArtifactContributorshipEntryContributionInstanceComponent t) { //3 7517 if (t == null) 7518 return this; 7519 if (this.contributionInstance == null) 7520 this.contributionInstance = new ArrayList<CitationCitedArtifactContributorshipEntryContributionInstanceComponent>(); 7521 this.contributionInstance.add(t); 7522 return this; 7523 } 7524 7525 /** 7526 * @return The first repetition of repeating field {@link #contributionInstance}, creating it if it does not already exist {3} 7527 */ 7528 public CitationCitedArtifactContributorshipEntryContributionInstanceComponent getContributionInstanceFirstRep() { 7529 if (getContributionInstance().isEmpty()) { 7530 addContributionInstance(); 7531 } 7532 return getContributionInstance().get(0); 7533 } 7534 7535 /** 7536 * @return {@link #correspondingContact} (Whether the contributor is the corresponding contributor for the role.). This is the underlying object with id, value and extensions. The accessor "getCorrespondingContact" gives direct access to the value 7537 */ 7538 public BooleanType getCorrespondingContactElement() { 7539 if (this.correspondingContact == null) 7540 if (Configuration.errorOnAutoCreate()) 7541 throw new Error("Attempt to auto-create CitationCitedArtifactContributorshipEntryComponent.correspondingContact"); 7542 else if (Configuration.doAutoCreate()) 7543 this.correspondingContact = new BooleanType(); // bb 7544 return this.correspondingContact; 7545 } 7546 7547 public boolean hasCorrespondingContactElement() { 7548 return this.correspondingContact != null && !this.correspondingContact.isEmpty(); 7549 } 7550 7551 public boolean hasCorrespondingContact() { 7552 return this.correspondingContact != null && !this.correspondingContact.isEmpty(); 7553 } 7554 7555 /** 7556 * @param value {@link #correspondingContact} (Whether the contributor is the corresponding contributor for the role.). This is the underlying object with id, value and extensions. The accessor "getCorrespondingContact" gives direct access to the value 7557 */ 7558 public CitationCitedArtifactContributorshipEntryComponent setCorrespondingContactElement(BooleanType value) { 7559 this.correspondingContact = value; 7560 return this; 7561 } 7562 7563 /** 7564 * @return Whether the contributor is the corresponding contributor for the role. 7565 */ 7566 public boolean getCorrespondingContact() { 7567 return this.correspondingContact == null || this.correspondingContact.isEmpty() ? false : this.correspondingContact.getValue(); 7568 } 7569 7570 /** 7571 * @param value Whether the contributor is the corresponding contributor for the role. 7572 */ 7573 public CitationCitedArtifactContributorshipEntryComponent setCorrespondingContact(boolean value) { 7574 if (this.correspondingContact == null) 7575 this.correspondingContact = new BooleanType(); 7576 this.correspondingContact.setValue(value); 7577 return this; 7578 } 7579 7580 /** 7581 * @return {@link #rankingOrder} (Provides a numerical ranking to represent the degree of contributorship relative to other contributors, such as 1 for first author and 2 for second author.). This is the underlying object with id, value and extensions. The accessor "getRankingOrder" gives direct access to the value 7582 */ 7583 public PositiveIntType getRankingOrderElement() { 7584 if (this.rankingOrder == null) 7585 if (Configuration.errorOnAutoCreate()) 7586 throw new Error("Attempt to auto-create CitationCitedArtifactContributorshipEntryComponent.rankingOrder"); 7587 else if (Configuration.doAutoCreate()) 7588 this.rankingOrder = new PositiveIntType(); // bb 7589 return this.rankingOrder; 7590 } 7591 7592 public boolean hasRankingOrderElement() { 7593 return this.rankingOrder != null && !this.rankingOrder.isEmpty(); 7594 } 7595 7596 public boolean hasRankingOrder() { 7597 return this.rankingOrder != null && !this.rankingOrder.isEmpty(); 7598 } 7599 7600 /** 7601 * @param value {@link #rankingOrder} (Provides a numerical ranking to represent the degree of contributorship relative to other contributors, such as 1 for first author and 2 for second author.). This is the underlying object with id, value and extensions. The accessor "getRankingOrder" gives direct access to the value 7602 */ 7603 public CitationCitedArtifactContributorshipEntryComponent setRankingOrderElement(PositiveIntType value) { 7604 this.rankingOrder = value; 7605 return this; 7606 } 7607 7608 /** 7609 * @return Provides a numerical ranking to represent the degree of contributorship relative to other contributors, such as 1 for first author and 2 for second author. 7610 */ 7611 public int getRankingOrder() { 7612 return this.rankingOrder == null || this.rankingOrder.isEmpty() ? 0 : this.rankingOrder.getValue(); 7613 } 7614 7615 /** 7616 * @param value Provides a numerical ranking to represent the degree of contributorship relative to other contributors, such as 1 for first author and 2 for second author. 7617 */ 7618 public CitationCitedArtifactContributorshipEntryComponent setRankingOrder(int value) { 7619 if (this.rankingOrder == null) 7620 this.rankingOrder = new PositiveIntType(); 7621 this.rankingOrder.setValue(value); 7622 return this; 7623 } 7624 7625 protected void listChildren(List<Property> children) { 7626 super.listChildren(children); 7627 children.add(new Property("contributor", "Reference(Practitioner|Organization)", "The identity of the individual contributor.", 0, 1, contributor)); 7628 children.add(new Property("forenameInitials", "string", "For citation styles that use initials.", 0, 1, forenameInitials)); 7629 children.add(new Property("affiliation", "Reference(Organization|PractitionerRole)", "Organization affiliated with the contributor.", 0, java.lang.Integer.MAX_VALUE, affiliation)); 7630 children.add(new Property("contributionType", "CodeableConcept", "This element identifies the specific nature of an individual?s contribution with respect to the cited work.", 0, java.lang.Integer.MAX_VALUE, contributionType)); 7631 children.add(new Property("role", "CodeableConcept", "The role of the contributor (e.g. author, editor, reviewer, funder).", 0, 1, role)); 7632 children.add(new Property("contributionInstance", "", "Contributions with accounting for time or number.", 0, java.lang.Integer.MAX_VALUE, contributionInstance)); 7633 children.add(new Property("correspondingContact", "boolean", "Whether the contributor is the corresponding contributor for the role.", 0, 1, correspondingContact)); 7634 children.add(new Property("rankingOrder", "positiveInt", "Provides a numerical ranking to represent the degree of contributorship relative to other contributors, such as 1 for first author and 2 for second author.", 0, 1, rankingOrder)); 7635 } 7636 7637 @Override 7638 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 7639 switch (_hash) { 7640 case -1895276325: /*contributor*/ return new Property("contributor", "Reference(Practitioner|Organization)", "The identity of the individual contributor.", 0, 1, contributor); 7641 case -740521962: /*forenameInitials*/ return new Property("forenameInitials", "string", "For citation styles that use initials.", 0, 1, forenameInitials); 7642 case 2019918576: /*affiliation*/ return new Property("affiliation", "Reference(Organization|PractitionerRole)", "Organization affiliated with the contributor.", 0, java.lang.Integer.MAX_VALUE, affiliation); 7643 case -1600446614: /*contributionType*/ return new Property("contributionType", "CodeableConcept", "This element identifies the specific nature of an individual?s contribution with respect to the cited work.", 0, java.lang.Integer.MAX_VALUE, contributionType); 7644 case 3506294: /*role*/ return new Property("role", "CodeableConcept", "The role of the contributor (e.g. author, editor, reviewer, funder).", 0, 1, role); 7645 case -547910459: /*contributionInstance*/ return new Property("contributionInstance", "", "Contributions with accounting for time or number.", 0, java.lang.Integer.MAX_VALUE, contributionInstance); 7646 case -1816008851: /*correspondingContact*/ return new Property("correspondingContact", "boolean", "Whether the contributor is the corresponding contributor for the role.", 0, 1, correspondingContact); 7647 case -762905416: /*rankingOrder*/ return new Property("rankingOrder", "positiveInt", "Provides a numerical ranking to represent the degree of contributorship relative to other contributors, such as 1 for first author and 2 for second author.", 0, 1, rankingOrder); 7648 default: return super.getNamedProperty(_hash, _name, _checkValid); 7649 } 7650 7651 } 7652 7653 @Override 7654 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7655 switch (hash) { 7656 case -1895276325: /*contributor*/ return this.contributor == null ? new Base[0] : new Base[] {this.contributor}; // Reference 7657 case -740521962: /*forenameInitials*/ return this.forenameInitials == null ? new Base[0] : new Base[] {this.forenameInitials}; // StringType 7658 case 2019918576: /*affiliation*/ return this.affiliation == null ? new Base[0] : this.affiliation.toArray(new Base[this.affiliation.size()]); // Reference 7659 case -1600446614: /*contributionType*/ return this.contributionType == null ? new Base[0] : this.contributionType.toArray(new Base[this.contributionType.size()]); // CodeableConcept 7660 case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept 7661 case -547910459: /*contributionInstance*/ return this.contributionInstance == null ? new Base[0] : this.contributionInstance.toArray(new Base[this.contributionInstance.size()]); // CitationCitedArtifactContributorshipEntryContributionInstanceComponent 7662 case -1816008851: /*correspondingContact*/ return this.correspondingContact == null ? new Base[0] : new Base[] {this.correspondingContact}; // BooleanType 7663 case -762905416: /*rankingOrder*/ return this.rankingOrder == null ? new Base[0] : new Base[] {this.rankingOrder}; // PositiveIntType 7664 default: return super.getProperty(hash, name, checkValid); 7665 } 7666 7667 } 7668 7669 @Override 7670 public Base setProperty(int hash, String name, Base value) throws FHIRException { 7671 switch (hash) { 7672 case -1895276325: // contributor 7673 this.contributor = TypeConvertor.castToReference(value); // Reference 7674 return value; 7675 case -740521962: // forenameInitials 7676 this.forenameInitials = TypeConvertor.castToString(value); // StringType 7677 return value; 7678 case 2019918576: // affiliation 7679 this.getAffiliation().add(TypeConvertor.castToReference(value)); // Reference 7680 return value; 7681 case -1600446614: // contributionType 7682 this.getContributionType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 7683 return value; 7684 case 3506294: // role 7685 this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 7686 return value; 7687 case -547910459: // contributionInstance 7688 this.getContributionInstance().add((CitationCitedArtifactContributorshipEntryContributionInstanceComponent) value); // CitationCitedArtifactContributorshipEntryContributionInstanceComponent 7689 return value; 7690 case -1816008851: // correspondingContact 7691 this.correspondingContact = TypeConvertor.castToBoolean(value); // BooleanType 7692 return value; 7693 case -762905416: // rankingOrder 7694 this.rankingOrder = TypeConvertor.castToPositiveInt(value); // PositiveIntType 7695 return value; 7696 default: return super.setProperty(hash, name, value); 7697 } 7698 7699 } 7700 7701 @Override 7702 public Base setProperty(String name, Base value) throws FHIRException { 7703 if (name.equals("contributor")) { 7704 this.contributor = TypeConvertor.castToReference(value); // Reference 7705 } else if (name.equals("forenameInitials")) { 7706 this.forenameInitials = TypeConvertor.castToString(value); // StringType 7707 } else if (name.equals("affiliation")) { 7708 this.getAffiliation().add(TypeConvertor.castToReference(value)); 7709 } else if (name.equals("contributionType")) { 7710 this.getContributionType().add(TypeConvertor.castToCodeableConcept(value)); 7711 } else if (name.equals("role")) { 7712 this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 7713 } else if (name.equals("contributionInstance")) { 7714 this.getContributionInstance().add((CitationCitedArtifactContributorshipEntryContributionInstanceComponent) value); 7715 } else if (name.equals("correspondingContact")) { 7716 this.correspondingContact = TypeConvertor.castToBoolean(value); // BooleanType 7717 } else if (name.equals("rankingOrder")) { 7718 this.rankingOrder = TypeConvertor.castToPositiveInt(value); // PositiveIntType 7719 } else 7720 return super.setProperty(name, value); 7721 return value; 7722 } 7723 7724 @Override 7725 public Base makeProperty(int hash, String name) throws FHIRException { 7726 switch (hash) { 7727 case -1895276325: return getContributor(); 7728 case -740521962: return getForenameInitialsElement(); 7729 case 2019918576: return addAffiliation(); 7730 case -1600446614: return addContributionType(); 7731 case 3506294: return getRole(); 7732 case -547910459: return addContributionInstance(); 7733 case -1816008851: return getCorrespondingContactElement(); 7734 case -762905416: return getRankingOrderElement(); 7735 default: return super.makeProperty(hash, name); 7736 } 7737 7738 } 7739 7740 @Override 7741 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 7742 switch (hash) { 7743 case -1895276325: /*contributor*/ return new String[] {"Reference"}; 7744 case -740521962: /*forenameInitials*/ return new String[] {"string"}; 7745 case 2019918576: /*affiliation*/ return new String[] {"Reference"}; 7746 case -1600446614: /*contributionType*/ return new String[] {"CodeableConcept"}; 7747 case 3506294: /*role*/ return new String[] {"CodeableConcept"}; 7748 case -547910459: /*contributionInstance*/ return new String[] {}; 7749 case -1816008851: /*correspondingContact*/ return new String[] {"boolean"}; 7750 case -762905416: /*rankingOrder*/ return new String[] {"positiveInt"}; 7751 default: return super.getTypesForProperty(hash, name); 7752 } 7753 7754 } 7755 7756 @Override 7757 public Base addChild(String name) throws FHIRException { 7758 if (name.equals("contributor")) { 7759 this.contributor = new Reference(); 7760 return this.contributor; 7761 } 7762 else if (name.equals("forenameInitials")) { 7763 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.contributorship.entry.forenameInitials"); 7764 } 7765 else if (name.equals("affiliation")) { 7766 return addAffiliation(); 7767 } 7768 else if (name.equals("contributionType")) { 7769 return addContributionType(); 7770 } 7771 else if (name.equals("role")) { 7772 this.role = new CodeableConcept(); 7773 return this.role; 7774 } 7775 else if (name.equals("contributionInstance")) { 7776 return addContributionInstance(); 7777 } 7778 else if (name.equals("correspondingContact")) { 7779 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.contributorship.entry.correspondingContact"); 7780 } 7781 else if (name.equals("rankingOrder")) { 7782 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.contributorship.entry.rankingOrder"); 7783 } 7784 else 7785 return super.addChild(name); 7786 } 7787 7788 public CitationCitedArtifactContributorshipEntryComponent copy() { 7789 CitationCitedArtifactContributorshipEntryComponent dst = new CitationCitedArtifactContributorshipEntryComponent(); 7790 copyValues(dst); 7791 return dst; 7792 } 7793 7794 public void copyValues(CitationCitedArtifactContributorshipEntryComponent dst) { 7795 super.copyValues(dst); 7796 dst.contributor = contributor == null ? null : contributor.copy(); 7797 dst.forenameInitials = forenameInitials == null ? null : forenameInitials.copy(); 7798 if (affiliation != null) { 7799 dst.affiliation = new ArrayList<Reference>(); 7800 for (Reference i : affiliation) 7801 dst.affiliation.add(i.copy()); 7802 }; 7803 if (contributionType != null) { 7804 dst.contributionType = new ArrayList<CodeableConcept>(); 7805 for (CodeableConcept i : contributionType) 7806 dst.contributionType.add(i.copy()); 7807 }; 7808 dst.role = role == null ? null : role.copy(); 7809 if (contributionInstance != null) { 7810 dst.contributionInstance = new ArrayList<CitationCitedArtifactContributorshipEntryContributionInstanceComponent>(); 7811 for (CitationCitedArtifactContributorshipEntryContributionInstanceComponent i : contributionInstance) 7812 dst.contributionInstance.add(i.copy()); 7813 }; 7814 dst.correspondingContact = correspondingContact == null ? null : correspondingContact.copy(); 7815 dst.rankingOrder = rankingOrder == null ? null : rankingOrder.copy(); 7816 } 7817 7818 @Override 7819 public boolean equalsDeep(Base other_) { 7820 if (!super.equalsDeep(other_)) 7821 return false; 7822 if (!(other_ instanceof CitationCitedArtifactContributorshipEntryComponent)) 7823 return false; 7824 CitationCitedArtifactContributorshipEntryComponent o = (CitationCitedArtifactContributorshipEntryComponent) other_; 7825 return compareDeep(contributor, o.contributor, true) && compareDeep(forenameInitials, o.forenameInitials, true) 7826 && compareDeep(affiliation, o.affiliation, true) && compareDeep(contributionType, o.contributionType, true) 7827 && compareDeep(role, o.role, true) && compareDeep(contributionInstance, o.contributionInstance, true) 7828 && compareDeep(correspondingContact, o.correspondingContact, true) && compareDeep(rankingOrder, o.rankingOrder, true) 7829 ; 7830 } 7831 7832 @Override 7833 public boolean equalsShallow(Base other_) { 7834 if (!super.equalsShallow(other_)) 7835 return false; 7836 if (!(other_ instanceof CitationCitedArtifactContributorshipEntryComponent)) 7837 return false; 7838 CitationCitedArtifactContributorshipEntryComponent o = (CitationCitedArtifactContributorshipEntryComponent) other_; 7839 return compareValues(forenameInitials, o.forenameInitials, true) && compareValues(correspondingContact, o.correspondingContact, true) 7840 && compareValues(rankingOrder, o.rankingOrder, true); 7841 } 7842 7843 public boolean isEmpty() { 7844 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(contributor, forenameInitials 7845 , affiliation, contributionType, role, contributionInstance, correspondingContact 7846 , rankingOrder); 7847 } 7848 7849 public String fhirType() { 7850 return "Citation.citedArtifact.contributorship.entry"; 7851 7852 } 7853 7854 } 7855 7856 @Block() 7857 public static class CitationCitedArtifactContributorshipEntryContributionInstanceComponent extends BackboneElement implements IBaseBackboneElement { 7858 /** 7859 * The specific contribution. 7860 */ 7861 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 7862 @Description(shortDefinition="The specific contribution", formalDefinition="The specific contribution." ) 7863 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/artifact-contribution-instance-type") 7864 protected CodeableConcept type; 7865 7866 /** 7867 * The time that the contribution was made. 7868 */ 7869 @Child(name = "time", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 7870 @Description(shortDefinition="The time that the contribution was made", formalDefinition="The time that the contribution was made." ) 7871 protected DateTimeType time; 7872 7873 private static final long serialVersionUID = -196837729L; 7874 7875 /** 7876 * Constructor 7877 */ 7878 public CitationCitedArtifactContributorshipEntryContributionInstanceComponent() { 7879 super(); 7880 } 7881 7882 /** 7883 * Constructor 7884 */ 7885 public CitationCitedArtifactContributorshipEntryContributionInstanceComponent(CodeableConcept type) { 7886 super(); 7887 this.setType(type); 7888 } 7889 7890 /** 7891 * @return {@link #type} (The specific contribution.) 7892 */ 7893 public CodeableConcept getType() { 7894 if (this.type == null) 7895 if (Configuration.errorOnAutoCreate()) 7896 throw new Error("Attempt to auto-create CitationCitedArtifactContributorshipEntryContributionInstanceComponent.type"); 7897 else if (Configuration.doAutoCreate()) 7898 this.type = new CodeableConcept(); // cc 7899 return this.type; 7900 } 7901 7902 public boolean hasType() { 7903 return this.type != null && !this.type.isEmpty(); 7904 } 7905 7906 /** 7907 * @param value {@link #type} (The specific contribution.) 7908 */ 7909 public CitationCitedArtifactContributorshipEntryContributionInstanceComponent setType(CodeableConcept value) { 7910 this.type = value; 7911 return this; 7912 } 7913 7914 /** 7915 * @return {@link #time} (The time that the contribution was made.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value 7916 */ 7917 public DateTimeType getTimeElement() { 7918 if (this.time == null) 7919 if (Configuration.errorOnAutoCreate()) 7920 throw new Error("Attempt to auto-create CitationCitedArtifactContributorshipEntryContributionInstanceComponent.time"); 7921 else if (Configuration.doAutoCreate()) 7922 this.time = new DateTimeType(); // bb 7923 return this.time; 7924 } 7925 7926 public boolean hasTimeElement() { 7927 return this.time != null && !this.time.isEmpty(); 7928 } 7929 7930 public boolean hasTime() { 7931 return this.time != null && !this.time.isEmpty(); 7932 } 7933 7934 /** 7935 * @param value {@link #time} (The time that the contribution was made.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value 7936 */ 7937 public CitationCitedArtifactContributorshipEntryContributionInstanceComponent setTimeElement(DateTimeType value) { 7938 this.time = value; 7939 return this; 7940 } 7941 7942 /** 7943 * @return The time that the contribution was made. 7944 */ 7945 public Date getTime() { 7946 return this.time == null ? null : this.time.getValue(); 7947 } 7948 7949 /** 7950 * @param value The time that the contribution was made. 7951 */ 7952 public CitationCitedArtifactContributorshipEntryContributionInstanceComponent setTime(Date value) { 7953 if (value == null) 7954 this.time = null; 7955 else { 7956 if (this.time == null) 7957 this.time = new DateTimeType(); 7958 this.time.setValue(value); 7959 } 7960 return this; 7961 } 7962 7963 protected void listChildren(List<Property> children) { 7964 super.listChildren(children); 7965 children.add(new Property("type", "CodeableConcept", "The specific contribution.", 0, 1, type)); 7966 children.add(new Property("time", "dateTime", "The time that the contribution was made.", 0, 1, time)); 7967 } 7968 7969 @Override 7970 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 7971 switch (_hash) { 7972 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The specific contribution.", 0, 1, type); 7973 case 3560141: /*time*/ return new Property("time", "dateTime", "The time that the contribution was made.", 0, 1, time); 7974 default: return super.getNamedProperty(_hash, _name, _checkValid); 7975 } 7976 7977 } 7978 7979 @Override 7980 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7981 switch (hash) { 7982 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 7983 case 3560141: /*time*/ return this.time == null ? new Base[0] : new Base[] {this.time}; // DateTimeType 7984 default: return super.getProperty(hash, name, checkValid); 7985 } 7986 7987 } 7988 7989 @Override 7990 public Base setProperty(int hash, String name, Base value) throws FHIRException { 7991 switch (hash) { 7992 case 3575610: // type 7993 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 7994 return value; 7995 case 3560141: // time 7996 this.time = TypeConvertor.castToDateTime(value); // DateTimeType 7997 return value; 7998 default: return super.setProperty(hash, name, value); 7999 } 8000 8001 } 8002 8003 @Override 8004 public Base setProperty(String name, Base value) throws FHIRException { 8005 if (name.equals("type")) { 8006 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 8007 } else if (name.equals("time")) { 8008 this.time = TypeConvertor.castToDateTime(value); // DateTimeType 8009 } else 8010 return super.setProperty(name, value); 8011 return value; 8012 } 8013 8014 @Override 8015 public Base makeProperty(int hash, String name) throws FHIRException { 8016 switch (hash) { 8017 case 3575610: return getType(); 8018 case 3560141: return getTimeElement(); 8019 default: return super.makeProperty(hash, name); 8020 } 8021 8022 } 8023 8024 @Override 8025 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8026 switch (hash) { 8027 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 8028 case 3560141: /*time*/ return new String[] {"dateTime"}; 8029 default: return super.getTypesForProperty(hash, name); 8030 } 8031 8032 } 8033 8034 @Override 8035 public Base addChild(String name) throws FHIRException { 8036 if (name.equals("type")) { 8037 this.type = new CodeableConcept(); 8038 return this.type; 8039 } 8040 else if (name.equals("time")) { 8041 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.contributorship.entry.contributionInstance.time"); 8042 } 8043 else 8044 return super.addChild(name); 8045 } 8046 8047 public CitationCitedArtifactContributorshipEntryContributionInstanceComponent copy() { 8048 CitationCitedArtifactContributorshipEntryContributionInstanceComponent dst = new CitationCitedArtifactContributorshipEntryContributionInstanceComponent(); 8049 copyValues(dst); 8050 return dst; 8051 } 8052 8053 public void copyValues(CitationCitedArtifactContributorshipEntryContributionInstanceComponent dst) { 8054 super.copyValues(dst); 8055 dst.type = type == null ? null : type.copy(); 8056 dst.time = time == null ? null : time.copy(); 8057 } 8058 8059 @Override 8060 public boolean equalsDeep(Base other_) { 8061 if (!super.equalsDeep(other_)) 8062 return false; 8063 if (!(other_ instanceof CitationCitedArtifactContributorshipEntryContributionInstanceComponent)) 8064 return false; 8065 CitationCitedArtifactContributorshipEntryContributionInstanceComponent o = (CitationCitedArtifactContributorshipEntryContributionInstanceComponent) other_; 8066 return compareDeep(type, o.type, true) && compareDeep(time, o.time, true); 8067 } 8068 8069 @Override 8070 public boolean equalsShallow(Base other_) { 8071 if (!super.equalsShallow(other_)) 8072 return false; 8073 if (!(other_ instanceof CitationCitedArtifactContributorshipEntryContributionInstanceComponent)) 8074 return false; 8075 CitationCitedArtifactContributorshipEntryContributionInstanceComponent o = (CitationCitedArtifactContributorshipEntryContributionInstanceComponent) other_; 8076 return compareValues(time, o.time, true); 8077 } 8078 8079 public boolean isEmpty() { 8080 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, time); 8081 } 8082 8083 public String fhirType() { 8084 return "Citation.citedArtifact.contributorship.entry.contributionInstance"; 8085 8086 } 8087 8088 } 8089 8090 @Block() 8091 public static class ContributorshipSummaryComponent extends BackboneElement implements IBaseBackboneElement { 8092 /** 8093 * Used most commonly to express an author list or a contributorship statement. 8094 */ 8095 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 8096 @Description(shortDefinition="Such as author list, contributorship statement, funding statement, acknowledgements statement, or conflicts of interest statement", formalDefinition="Used most commonly to express an author list or a contributorship statement." ) 8097 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contributor-summary-type") 8098 protected CodeableConcept type; 8099 8100 /** 8101 * The format for the display string, such as author last name with first letter capitalized followed by forename initials. 8102 */ 8103 @Child(name = "style", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 8104 @Description(shortDefinition="The format for the display string", formalDefinition="The format for the display string, such as author last name with first letter capitalized followed by forename initials." ) 8105 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contributor-summary-style") 8106 protected CodeableConcept style; 8107 8108 /** 8109 * Used to code the producer or rule for creating the display string. 8110 */ 8111 @Child(name = "source", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 8112 @Description(shortDefinition="Used to code the producer or rule for creating the display string", formalDefinition="Used to code the producer or rule for creating the display string." ) 8113 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contributor-summary-source") 8114 protected CodeableConcept source; 8115 8116 /** 8117 * The display string for the author list, contributor list, or contributorship statement. 8118 */ 8119 @Child(name = "value", type = {MarkdownType.class}, order=4, min=1, max=1, modifier=false, summary=false) 8120 @Description(shortDefinition="The display string for the author list, contributor list, or contributorship statement", formalDefinition="The display string for the author list, contributor list, or contributorship statement." ) 8121 protected MarkdownType value; 8122 8123 private static final long serialVersionUID = 1353383781L; 8124 8125 /** 8126 * Constructor 8127 */ 8128 public ContributorshipSummaryComponent() { 8129 super(); 8130 } 8131 8132 /** 8133 * Constructor 8134 */ 8135 public ContributorshipSummaryComponent(String value) { 8136 super(); 8137 this.setValue(value); 8138 } 8139 8140 /** 8141 * @return {@link #type} (Used most commonly to express an author list or a contributorship statement.) 8142 */ 8143 public CodeableConcept getType() { 8144 if (this.type == null) 8145 if (Configuration.errorOnAutoCreate()) 8146 throw new Error("Attempt to auto-create ContributorshipSummaryComponent.type"); 8147 else if (Configuration.doAutoCreate()) 8148 this.type = new CodeableConcept(); // cc 8149 return this.type; 8150 } 8151 8152 public boolean hasType() { 8153 return this.type != null && !this.type.isEmpty(); 8154 } 8155 8156 /** 8157 * @param value {@link #type} (Used most commonly to express an author list or a contributorship statement.) 8158 */ 8159 public ContributorshipSummaryComponent setType(CodeableConcept value) { 8160 this.type = value; 8161 return this; 8162 } 8163 8164 /** 8165 * @return {@link #style} (The format for the display string, such as author last name with first letter capitalized followed by forename initials.) 8166 */ 8167 public CodeableConcept getStyle() { 8168 if (this.style == null) 8169 if (Configuration.errorOnAutoCreate()) 8170 throw new Error("Attempt to auto-create ContributorshipSummaryComponent.style"); 8171 else if (Configuration.doAutoCreate()) 8172 this.style = new CodeableConcept(); // cc 8173 return this.style; 8174 } 8175 8176 public boolean hasStyle() { 8177 return this.style != null && !this.style.isEmpty(); 8178 } 8179 8180 /** 8181 * @param value {@link #style} (The format for the display string, such as author last name with first letter capitalized followed by forename initials.) 8182 */ 8183 public ContributorshipSummaryComponent setStyle(CodeableConcept value) { 8184 this.style = value; 8185 return this; 8186 } 8187 8188 /** 8189 * @return {@link #source} (Used to code the producer or rule for creating the display string.) 8190 */ 8191 public CodeableConcept getSource() { 8192 if (this.source == null) 8193 if (Configuration.errorOnAutoCreate()) 8194 throw new Error("Attempt to auto-create ContributorshipSummaryComponent.source"); 8195 else if (Configuration.doAutoCreate()) 8196 this.source = new CodeableConcept(); // cc 8197 return this.source; 8198 } 8199 8200 public boolean hasSource() { 8201 return this.source != null && !this.source.isEmpty(); 8202 } 8203 8204 /** 8205 * @param value {@link #source} (Used to code the producer or rule for creating the display string.) 8206 */ 8207 public ContributorshipSummaryComponent setSource(CodeableConcept value) { 8208 this.source = value; 8209 return this; 8210 } 8211 8212 /** 8213 * @return {@link #value} (The display string for the author list, contributor list, or contributorship statement.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 8214 */ 8215 public MarkdownType getValueElement() { 8216 if (this.value == null) 8217 if (Configuration.errorOnAutoCreate()) 8218 throw new Error("Attempt to auto-create ContributorshipSummaryComponent.value"); 8219 else if (Configuration.doAutoCreate()) 8220 this.value = new MarkdownType(); // bb 8221 return this.value; 8222 } 8223 8224 public boolean hasValueElement() { 8225 return this.value != null && !this.value.isEmpty(); 8226 } 8227 8228 public boolean hasValue() { 8229 return this.value != null && !this.value.isEmpty(); 8230 } 8231 8232 /** 8233 * @param value {@link #value} (The display string for the author list, contributor list, or contributorship statement.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 8234 */ 8235 public ContributorshipSummaryComponent setValueElement(MarkdownType value) { 8236 this.value = value; 8237 return this; 8238 } 8239 8240 /** 8241 * @return The display string for the author list, contributor list, or contributorship statement. 8242 */ 8243 public String getValue() { 8244 return this.value == null ? null : this.value.getValue(); 8245 } 8246 8247 /** 8248 * @param value The display string for the author list, contributor list, or contributorship statement. 8249 */ 8250 public ContributorshipSummaryComponent setValue(String value) { 8251 if (this.value == null) 8252 this.value = new MarkdownType(); 8253 this.value.setValue(value); 8254 return this; 8255 } 8256 8257 protected void listChildren(List<Property> children) { 8258 super.listChildren(children); 8259 children.add(new Property("type", "CodeableConcept", "Used most commonly to express an author list or a contributorship statement.", 0, 1, type)); 8260 children.add(new Property("style", "CodeableConcept", "The format for the display string, such as author last name with first letter capitalized followed by forename initials.", 0, 1, style)); 8261 children.add(new Property("source", "CodeableConcept", "Used to code the producer or rule for creating the display string.", 0, 1, source)); 8262 children.add(new Property("value", "markdown", "The display string for the author list, contributor list, or contributorship statement.", 0, 1, value)); 8263 } 8264 8265 @Override 8266 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 8267 switch (_hash) { 8268 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Used most commonly to express an author list or a contributorship statement.", 0, 1, type); 8269 case 109780401: /*style*/ return new Property("style", "CodeableConcept", "The format for the display string, such as author last name with first letter capitalized followed by forename initials.", 0, 1, style); 8270 case -896505829: /*source*/ return new Property("source", "CodeableConcept", "Used to code the producer or rule for creating the display string.", 0, 1, source); 8271 case 111972721: /*value*/ return new Property("value", "markdown", "The display string for the author list, contributor list, or contributorship statement.", 0, 1, value); 8272 default: return super.getNamedProperty(_hash, _name, _checkValid); 8273 } 8274 8275 } 8276 8277 @Override 8278 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8279 switch (hash) { 8280 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 8281 case 109780401: /*style*/ return this.style == null ? new Base[0] : new Base[] {this.style}; // CodeableConcept 8282 case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // CodeableConcept 8283 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // MarkdownType 8284 default: return super.getProperty(hash, name, checkValid); 8285 } 8286 8287 } 8288 8289 @Override 8290 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8291 switch (hash) { 8292 case 3575610: // type 8293 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 8294 return value; 8295 case 109780401: // style 8296 this.style = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 8297 return value; 8298 case -896505829: // source 8299 this.source = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 8300 return value; 8301 case 111972721: // value 8302 this.value = TypeConvertor.castToMarkdown(value); // MarkdownType 8303 return value; 8304 default: return super.setProperty(hash, name, value); 8305 } 8306 8307 } 8308 8309 @Override 8310 public Base setProperty(String name, Base value) throws FHIRException { 8311 if (name.equals("type")) { 8312 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 8313 } else if (name.equals("style")) { 8314 this.style = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 8315 } else if (name.equals("source")) { 8316 this.source = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 8317 } else if (name.equals("value")) { 8318 this.value = TypeConvertor.castToMarkdown(value); // MarkdownType 8319 } else 8320 return super.setProperty(name, value); 8321 return value; 8322 } 8323 8324 @Override 8325 public Base makeProperty(int hash, String name) throws FHIRException { 8326 switch (hash) { 8327 case 3575610: return getType(); 8328 case 109780401: return getStyle(); 8329 case -896505829: return getSource(); 8330 case 111972721: return getValueElement(); 8331 default: return super.makeProperty(hash, name); 8332 } 8333 8334 } 8335 8336 @Override 8337 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8338 switch (hash) { 8339 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 8340 case 109780401: /*style*/ return new String[] {"CodeableConcept"}; 8341 case -896505829: /*source*/ return new String[] {"CodeableConcept"}; 8342 case 111972721: /*value*/ return new String[] {"markdown"}; 8343 default: return super.getTypesForProperty(hash, name); 8344 } 8345 8346 } 8347 8348 @Override 8349 public Base addChild(String name) throws FHIRException { 8350 if (name.equals("type")) { 8351 this.type = new CodeableConcept(); 8352 return this.type; 8353 } 8354 else if (name.equals("style")) { 8355 this.style = new CodeableConcept(); 8356 return this.style; 8357 } 8358 else if (name.equals("source")) { 8359 this.source = new CodeableConcept(); 8360 return this.source; 8361 } 8362 else if (name.equals("value")) { 8363 throw new FHIRException("Cannot call addChild on a singleton property Citation.citedArtifact.contributorship.summary.value"); 8364 } 8365 else 8366 return super.addChild(name); 8367 } 8368 8369 public ContributorshipSummaryComponent copy() { 8370 ContributorshipSummaryComponent dst = new ContributorshipSummaryComponent(); 8371 copyValues(dst); 8372 return dst; 8373 } 8374 8375 public void copyValues(ContributorshipSummaryComponent dst) { 8376 super.copyValues(dst); 8377 dst.type = type == null ? null : type.copy(); 8378 dst.style = style == null ? null : style.copy(); 8379 dst.source = source == null ? null : source.copy(); 8380 dst.value = value == null ? null : value.copy(); 8381 } 8382 8383 @Override 8384 public boolean equalsDeep(Base other_) { 8385 if (!super.equalsDeep(other_)) 8386 return false; 8387 if (!(other_ instanceof ContributorshipSummaryComponent)) 8388 return false; 8389 ContributorshipSummaryComponent o = (ContributorshipSummaryComponent) other_; 8390 return compareDeep(type, o.type, true) && compareDeep(style, o.style, true) && compareDeep(source, o.source, true) 8391 && compareDeep(value, o.value, true); 8392 } 8393 8394 @Override 8395 public boolean equalsShallow(Base other_) { 8396 if (!super.equalsShallow(other_)) 8397 return false; 8398 if (!(other_ instanceof ContributorshipSummaryComponent)) 8399 return false; 8400 ContributorshipSummaryComponent o = (ContributorshipSummaryComponent) other_; 8401 return compareValues(value, o.value, true); 8402 } 8403 8404 public boolean isEmpty() { 8405 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, style, source, value 8406 ); 8407 } 8408 8409 public String fhirType() { 8410 return "Citation.citedArtifact.contributorship.summary"; 8411 8412 } 8413 8414 } 8415 8416 /** 8417 * An absolute URI that is used to identify this citation record when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers. 8418 */ 8419 @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true) 8420 @Description(shortDefinition="Canonical identifier for this citation record, represented as a globally unique URI", formalDefinition="An absolute URI that is used to identify this citation record when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers." ) 8421 protected UriType url; 8422 8423 /** 8424 * A formal identifier that is used to identify this citation record when it is represented in other formats, or referenced in a specification, model, design or an instance. 8425 */ 8426 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 8427 @Description(shortDefinition="Identifier for the citation record itself", formalDefinition="A formal identifier that is used to identify this citation record when it is represented in other formats, or referenced in a specification, model, design or an instance." ) 8428 protected List<Identifier> identifier; 8429 8430 /** 8431 * The identifier that is used to identify this version of the citation record when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the citation record author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. 8432 */ 8433 @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 8434 @Description(shortDefinition="Business version of the citation record", formalDefinition="The identifier that is used to identify this version of the citation record when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the citation record author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." ) 8435 protected StringType version; 8436 8437 /** 8438 * Indicates the mechanism used to compare versions to determine which is more current. 8439 */ 8440 @Child(name = "versionAlgorithm", type = {StringType.class, Coding.class}, order=3, min=0, max=1, modifier=false, summary=true) 8441 @Description(shortDefinition="How to compare versions", formalDefinition="Indicates the mechanism used to compare versions to determine which is more current." ) 8442 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/version-algorithm") 8443 protected DataType versionAlgorithm; 8444 8445 /** 8446 * A natural language name identifying the citation record. This name should be usable as an identifier for the module by machine processing applications such as code generation. 8447 */ 8448 @Child(name = "name", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 8449 @Description(shortDefinition="Name for this citation record (computer friendly)", formalDefinition="A natural language name identifying the citation record. This name should be usable as an identifier for the module by machine processing applications such as code generation." ) 8450 protected StringType name; 8451 8452 /** 8453 * A short, descriptive, user-friendly title for the citation record. 8454 */ 8455 @Child(name = "title", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 8456 @Description(shortDefinition="Name for this citation record (human friendly)", formalDefinition="A short, descriptive, user-friendly title for the citation record." ) 8457 protected StringType title; 8458 8459 /** 8460 * The status of this summary. Enables tracking the life-cycle of the content. 8461 */ 8462 @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true) 8463 @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The status of this summary. Enables tracking the life-cycle of the content." ) 8464 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status") 8465 protected Enumeration<PublicationStatus> status; 8466 8467 /** 8468 * A Boolean value to indicate that this citation record is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage. 8469 */ 8470 @Child(name = "experimental", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=true) 8471 @Description(shortDefinition="For testing purposes, not real usage", formalDefinition="A Boolean value to indicate that this citation record is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." ) 8472 protected BooleanType experimental; 8473 8474 /** 8475 * The date (and optionally time) when the citation record was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the citation record changes. 8476 */ 8477 @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) 8478 @Description(shortDefinition="Date last changed", formalDefinition="The date (and optionally time) when the citation record was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the citation record changes." ) 8479 protected DateTimeType date; 8480 8481 /** 8482 * The name of the organization or individual that published the citation record. 8483 */ 8484 @Child(name = "publisher", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) 8485 @Description(shortDefinition="The publisher of the citation record, not the publisher of the article or artifact being cited", formalDefinition="The name of the organization or individual that published the citation record." ) 8486 protected StringType publisher; 8487 8488 /** 8489 * Contact details to assist a user in finding and communicating with the publisher. 8490 */ 8491 @Child(name = "contact", type = {ContactDetail.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 8492 @Description(shortDefinition="Contact details for the publisher of the citation record", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) 8493 protected List<ContactDetail> contact; 8494 8495 /** 8496 * A free text natural language description of the citation from a consumer's perspective. 8497 */ 8498 @Child(name = "description", type = {MarkdownType.class}, order=11, min=0, max=1, modifier=false, summary=false) 8499 @Description(shortDefinition="Natural language description of the citation", formalDefinition="A free text natural language description of the citation from a consumer's perspective." ) 8500 protected MarkdownType description; 8501 8502 /** 8503 * The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate citation record instances. 8504 */ 8505 @Child(name = "useContext", type = {UsageContext.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 8506 @Description(shortDefinition="The context that the citation record content is intended to support", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate citation record instances." ) 8507 protected List<UsageContext> useContext; 8508 8509 /** 8510 * A legal or geographic region in which the citation record is intended to be used. 8511 */ 8512 @Child(name = "jurisdiction", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 8513 @Description(shortDefinition="Intended jurisdiction for citation record (if applicable)", formalDefinition="A legal or geographic region in which the citation record is intended to be used." ) 8514 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/jurisdiction") 8515 protected List<CodeableConcept> jurisdiction; 8516 8517 /** 8518 * Explanation of why this citation is needed and why it has been designed as it has. 8519 */ 8520 @Child(name = "purpose", type = {MarkdownType.class}, order=14, min=0, max=1, modifier=false, summary=false) 8521 @Description(shortDefinition="Why this citation is defined", formalDefinition="Explanation of why this citation is needed and why it has been designed as it has." ) 8522 protected MarkdownType purpose; 8523 8524 /** 8525 * Use and/or publishing restrictions for the citation record, not for the cited artifact. 8526 */ 8527 @Child(name = "copyright", type = {MarkdownType.class}, order=15, min=0, max=1, modifier=false, summary=false) 8528 @Description(shortDefinition="Use and/or publishing restrictions for the citation record, not for the cited artifact", formalDefinition="Use and/or publishing restrictions for the citation record, not for the cited artifact." ) 8529 protected MarkdownType copyright; 8530 8531 /** 8532 * A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved'). 8533 */ 8534 @Child(name = "copyrightLabel", type = {StringType.class}, order=16, min=0, max=1, modifier=false, summary=false) 8535 @Description(shortDefinition="Copyright holder and year(s) for the ciation record, not for the cited artifact", formalDefinition="A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')." ) 8536 protected StringType copyrightLabel; 8537 8538 /** 8539 * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage. 8540 */ 8541 @Child(name = "approvalDate", type = {DateType.class}, order=17, min=0, max=1, modifier=false, summary=false) 8542 @Description(shortDefinition="When the citation record 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." ) 8543 protected DateType approvalDate; 8544 8545 /** 8546 * The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date. 8547 */ 8548 @Child(name = "lastReviewDate", type = {DateType.class}, order=18, min=0, max=1, modifier=false, summary=false) 8549 @Description(shortDefinition="When the citation record 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." ) 8550 protected DateType lastReviewDate; 8551 8552 /** 8553 * The period during which the citation record content was or is planned to be in active use. 8554 */ 8555 @Child(name = "effectivePeriod", type = {Period.class}, order=19, min=0, max=1, modifier=false, summary=true) 8556 @Description(shortDefinition="When the citation record is expected to be used", formalDefinition="The period during which the citation record content was or is planned to be in active use." ) 8557 protected Period effectivePeriod; 8558 8559 /** 8560 * Who authored or created the citation record. 8561 */ 8562 @Child(name = "author", type = {ContactDetail.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8563 @Description(shortDefinition="Who authored the citation record", formalDefinition="Who authored or created the citation record." ) 8564 protected List<ContactDetail> author; 8565 8566 /** 8567 * Who edited or revised the citation record. 8568 */ 8569 @Child(name = "editor", type = {ContactDetail.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8570 @Description(shortDefinition="Who edited the citation record", formalDefinition="Who edited or revised the citation record." ) 8571 protected List<ContactDetail> editor; 8572 8573 /** 8574 * Who reviewed the citation record. 8575 */ 8576 @Child(name = "reviewer", type = {ContactDetail.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8577 @Description(shortDefinition="Who reviewed the citation record", formalDefinition="Who reviewed the citation record." ) 8578 protected List<ContactDetail> reviewer; 8579 8580 /** 8581 * Who endorsed the citation record. 8582 */ 8583 @Child(name = "endorser", type = {ContactDetail.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8584 @Description(shortDefinition="Who endorsed the citation record", formalDefinition="Who endorsed the citation record." ) 8585 protected List<ContactDetail> endorser; 8586 8587 /** 8588 * A human-readable display of key concepts to represent the citation. 8589 */ 8590 @Child(name = "summary", type = {}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8591 @Description(shortDefinition="A human-readable display of key concepts to represent the citation", formalDefinition="A human-readable display of key concepts to represent the citation." ) 8592 protected List<CitationSummaryComponent> summary; 8593 8594 /** 8595 * The assignment to an organizing scheme. 8596 */ 8597 @Child(name = "classification", type = {}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8598 @Description(shortDefinition="The assignment to an organizing scheme", formalDefinition="The assignment to an organizing scheme." ) 8599 protected List<CitationClassificationComponent> classification; 8600 8601 /** 8602 * Used for general notes and annotations not coded elsewhere. 8603 */ 8604 @Child(name = "note", type = {Annotation.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8605 @Description(shortDefinition="Used for general notes and annotations not coded elsewhere", formalDefinition="Used for general notes and annotations not coded elsewhere." ) 8606 protected List<Annotation> note; 8607 8608 /** 8609 * The status of the citation record. 8610 */ 8611 @Child(name = "currentState", type = {CodeableConcept.class}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8612 @Description(shortDefinition="The status of the citation record", formalDefinition="The status of the citation record." ) 8613 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/citation-status-type") 8614 protected List<CodeableConcept> currentState; 8615 8616 /** 8617 * The state or status of the citation record paired with an effective date or period for that state. 8618 */ 8619 @Child(name = "statusDate", type = {}, order=28, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8620 @Description(shortDefinition="An effective date or period for a status of the citation record", formalDefinition="The state or status of the citation record paired with an effective date or period for that state." ) 8621 protected List<CitationStatusDateComponent> statusDate; 8622 8623 /** 8624 * Artifact related to the citation record. 8625 */ 8626 @Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=29, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8627 @Description(shortDefinition="Artifact related to the citation record", formalDefinition="Artifact related to the citation record." ) 8628 protected List<RelatedArtifact> relatedArtifact; 8629 8630 /** 8631 * The article or artifact being described. 8632 */ 8633 @Child(name = "citedArtifact", type = {}, order=30, min=0, max=1, modifier=false, summary=false) 8634 @Description(shortDefinition="The article or artifact being described", formalDefinition="The article or artifact being described." ) 8635 protected CitationCitedArtifactComponent citedArtifact; 8636 8637 private static final long serialVersionUID = 717016163L; 8638 8639 /** 8640 * Constructor 8641 */ 8642 public Citation() { 8643 super(); 8644 } 8645 8646 /** 8647 * Constructor 8648 */ 8649 public Citation(PublicationStatus status) { 8650 super(); 8651 this.setStatus(status); 8652 } 8653 8654 /** 8655 * @return {@link #url} (An absolute URI that is used to identify this citation record when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 8656 */ 8657 public UriType getUrlElement() { 8658 if (this.url == null) 8659 if (Configuration.errorOnAutoCreate()) 8660 throw new Error("Attempt to auto-create Citation.url"); 8661 else if (Configuration.doAutoCreate()) 8662 this.url = new UriType(); // bb 8663 return this.url; 8664 } 8665 8666 public boolean hasUrlElement() { 8667 return this.url != null && !this.url.isEmpty(); 8668 } 8669 8670 public boolean hasUrl() { 8671 return this.url != null && !this.url.isEmpty(); 8672 } 8673 8674 /** 8675 * @param value {@link #url} (An absolute URI that is used to identify this citation record when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 8676 */ 8677 public Citation setUrlElement(UriType value) { 8678 this.url = value; 8679 return this; 8680 } 8681 8682 /** 8683 * @return An absolute URI that is used to identify this citation record when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers. 8684 */ 8685 public String getUrl() { 8686 return this.url == null ? null : this.url.getValue(); 8687 } 8688 8689 /** 8690 * @param value An absolute URI that is used to identify this citation record when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers. 8691 */ 8692 public Citation setUrl(String value) { 8693 if (Utilities.noString(value)) 8694 this.url = null; 8695 else { 8696 if (this.url == null) 8697 this.url = new UriType(); 8698 this.url.setValue(value); 8699 } 8700 return this; 8701 } 8702 8703 /** 8704 * @return {@link #identifier} (A formal identifier that is used to identify this citation record when it is represented in other formats, or referenced in a specification, model, design or an instance.) 8705 */ 8706 public List<Identifier> getIdentifier() { 8707 if (this.identifier == null) 8708 this.identifier = new ArrayList<Identifier>(); 8709 return this.identifier; 8710 } 8711 8712 /** 8713 * @return Returns a reference to <code>this</code> for easy method chaining 8714 */ 8715 public Citation setIdentifier(List<Identifier> theIdentifier) { 8716 this.identifier = theIdentifier; 8717 return this; 8718 } 8719 8720 public boolean hasIdentifier() { 8721 if (this.identifier == null) 8722 return false; 8723 for (Identifier item : this.identifier) 8724 if (!item.isEmpty()) 8725 return true; 8726 return false; 8727 } 8728 8729 public Identifier addIdentifier() { //3 8730 Identifier t = new Identifier(); 8731 if (this.identifier == null) 8732 this.identifier = new ArrayList<Identifier>(); 8733 this.identifier.add(t); 8734 return t; 8735 } 8736 8737 public Citation addIdentifier(Identifier t) { //3 8738 if (t == null) 8739 return this; 8740 if (this.identifier == null) 8741 this.identifier = new ArrayList<Identifier>(); 8742 this.identifier.add(t); 8743 return this; 8744 } 8745 8746 /** 8747 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 8748 */ 8749 public Identifier getIdentifierFirstRep() { 8750 if (getIdentifier().isEmpty()) { 8751 addIdentifier(); 8752 } 8753 return getIdentifier().get(0); 8754 } 8755 8756 /** 8757 * @return {@link #version} (The identifier that is used to identify this version of the citation record when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the citation record author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 8758 */ 8759 public StringType getVersionElement() { 8760 if (this.version == null) 8761 if (Configuration.errorOnAutoCreate()) 8762 throw new Error("Attempt to auto-create Citation.version"); 8763 else if (Configuration.doAutoCreate()) 8764 this.version = new StringType(); // bb 8765 return this.version; 8766 } 8767 8768 public boolean hasVersionElement() { 8769 return this.version != null && !this.version.isEmpty(); 8770 } 8771 8772 public boolean hasVersion() { 8773 return this.version != null && !this.version.isEmpty(); 8774 } 8775 8776 /** 8777 * @param value {@link #version} (The identifier that is used to identify this version of the citation record when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the citation record author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 8778 */ 8779 public Citation setVersionElement(StringType value) { 8780 this.version = value; 8781 return this; 8782 } 8783 8784 /** 8785 * @return The identifier that is used to identify this version of the citation record when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the citation record author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. 8786 */ 8787 public String getVersion() { 8788 return this.version == null ? null : this.version.getValue(); 8789 } 8790 8791 /** 8792 * @param value The identifier that is used to identify this version of the citation record when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the citation record author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. 8793 */ 8794 public Citation setVersion(String value) { 8795 if (Utilities.noString(value)) 8796 this.version = null; 8797 else { 8798 if (this.version == null) 8799 this.version = new StringType(); 8800 this.version.setValue(value); 8801 } 8802 return this; 8803 } 8804 8805 /** 8806 * @return {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.) 8807 */ 8808 public DataType getVersionAlgorithm() { 8809 return this.versionAlgorithm; 8810 } 8811 8812 /** 8813 * @return {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.) 8814 */ 8815 public StringType getVersionAlgorithmStringType() throws FHIRException { 8816 if (this.versionAlgorithm == null) 8817 this.versionAlgorithm = new StringType(); 8818 if (!(this.versionAlgorithm instanceof StringType)) 8819 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.versionAlgorithm.getClass().getName()+" was encountered"); 8820 return (StringType) this.versionAlgorithm; 8821 } 8822 8823 public boolean hasVersionAlgorithmStringType() { 8824 return this != null && this.versionAlgorithm instanceof StringType; 8825 } 8826 8827 /** 8828 * @return {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.) 8829 */ 8830 public Coding getVersionAlgorithmCoding() throws FHIRException { 8831 if (this.versionAlgorithm == null) 8832 this.versionAlgorithm = new Coding(); 8833 if (!(this.versionAlgorithm instanceof Coding)) 8834 throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.versionAlgorithm.getClass().getName()+" was encountered"); 8835 return (Coding) this.versionAlgorithm; 8836 } 8837 8838 public boolean hasVersionAlgorithmCoding() { 8839 return this != null && this.versionAlgorithm instanceof Coding; 8840 } 8841 8842 public boolean hasVersionAlgorithm() { 8843 return this.versionAlgorithm != null && !this.versionAlgorithm.isEmpty(); 8844 } 8845 8846 /** 8847 * @param value {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.) 8848 */ 8849 public Citation setVersionAlgorithm(DataType value) { 8850 if (value != null && !(value instanceof StringType || value instanceof Coding)) 8851 throw new FHIRException("Not the right type for Citation.versionAlgorithm[x]: "+value.fhirType()); 8852 this.versionAlgorithm = value; 8853 return this; 8854 } 8855 8856 /** 8857 * @return {@link #name} (A natural language name identifying the citation record. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 8858 */ 8859 public StringType getNameElement() { 8860 if (this.name == null) 8861 if (Configuration.errorOnAutoCreate()) 8862 throw new Error("Attempt to auto-create Citation.name"); 8863 else if (Configuration.doAutoCreate()) 8864 this.name = new StringType(); // bb 8865 return this.name; 8866 } 8867 8868 public boolean hasNameElement() { 8869 return this.name != null && !this.name.isEmpty(); 8870 } 8871 8872 public boolean hasName() { 8873 return this.name != null && !this.name.isEmpty(); 8874 } 8875 8876 /** 8877 * @param value {@link #name} (A natural language name identifying the citation record. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 8878 */ 8879 public Citation setNameElement(StringType value) { 8880 this.name = value; 8881 return this; 8882 } 8883 8884 /** 8885 * @return A natural language name identifying the citation record. This name should be usable as an identifier for the module by machine processing applications such as code generation. 8886 */ 8887 public String getName() { 8888 return this.name == null ? null : this.name.getValue(); 8889 } 8890 8891 /** 8892 * @param value A natural language name identifying the citation record. This name should be usable as an identifier for the module by machine processing applications such as code generation. 8893 */ 8894 public Citation setName(String value) { 8895 if (Utilities.noString(value)) 8896 this.name = null; 8897 else { 8898 if (this.name == null) 8899 this.name = new StringType(); 8900 this.name.setValue(value); 8901 } 8902 return this; 8903 } 8904 8905 /** 8906 * @return {@link #title} (A short, descriptive, user-friendly title for the citation record.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 8907 */ 8908 public StringType getTitleElement() { 8909 if (this.title == null) 8910 if (Configuration.errorOnAutoCreate()) 8911 throw new Error("Attempt to auto-create Citation.title"); 8912 else if (Configuration.doAutoCreate()) 8913 this.title = new StringType(); // bb 8914 return this.title; 8915 } 8916 8917 public boolean hasTitleElement() { 8918 return this.title != null && !this.title.isEmpty(); 8919 } 8920 8921 public boolean hasTitle() { 8922 return this.title != null && !this.title.isEmpty(); 8923 } 8924 8925 /** 8926 * @param value {@link #title} (A short, descriptive, user-friendly title for the citation record.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 8927 */ 8928 public Citation setTitleElement(StringType value) { 8929 this.title = value; 8930 return this; 8931 } 8932 8933 /** 8934 * @return A short, descriptive, user-friendly title for the citation record. 8935 */ 8936 public String getTitle() { 8937 return this.title == null ? null : this.title.getValue(); 8938 } 8939 8940 /** 8941 * @param value A short, descriptive, user-friendly title for the citation record. 8942 */ 8943 public Citation setTitle(String value) { 8944 if (Utilities.noString(value)) 8945 this.title = null; 8946 else { 8947 if (this.title == null) 8948 this.title = new StringType(); 8949 this.title.setValue(value); 8950 } 8951 return this; 8952 } 8953 8954 /** 8955 * @return {@link #status} (The status of this summary. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 8956 */ 8957 public Enumeration<PublicationStatus> getStatusElement() { 8958 if (this.status == null) 8959 if (Configuration.errorOnAutoCreate()) 8960 throw new Error("Attempt to auto-create Citation.status"); 8961 else if (Configuration.doAutoCreate()) 8962 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 8963 return this.status; 8964 } 8965 8966 public boolean hasStatusElement() { 8967 return this.status != null && !this.status.isEmpty(); 8968 } 8969 8970 public boolean hasStatus() { 8971 return this.status != null && !this.status.isEmpty(); 8972 } 8973 8974 /** 8975 * @param value {@link #status} (The status of this summary. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 8976 */ 8977 public Citation setStatusElement(Enumeration<PublicationStatus> value) { 8978 this.status = value; 8979 return this; 8980 } 8981 8982 /** 8983 * @return The status of this summary. Enables tracking the life-cycle of the content. 8984 */ 8985 public PublicationStatus getStatus() { 8986 return this.status == null ? null : this.status.getValue(); 8987 } 8988 8989 /** 8990 * @param value The status of this summary. Enables tracking the life-cycle of the content. 8991 */ 8992 public Citation setStatus(PublicationStatus value) { 8993 if (this.status == null) 8994 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 8995 this.status.setValue(value); 8996 return this; 8997 } 8998 8999 /** 9000 * @return {@link #experimental} (A Boolean value to indicate that this citation record is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 9001 */ 9002 public BooleanType getExperimentalElement() { 9003 if (this.experimental == null) 9004 if (Configuration.errorOnAutoCreate()) 9005 throw new Error("Attempt to auto-create Citation.experimental"); 9006 else if (Configuration.doAutoCreate()) 9007 this.experimental = new BooleanType(); // bb 9008 return this.experimental; 9009 } 9010 9011 public boolean hasExperimentalElement() { 9012 return this.experimental != null && !this.experimental.isEmpty(); 9013 } 9014 9015 public boolean hasExperimental() { 9016 return this.experimental != null && !this.experimental.isEmpty(); 9017 } 9018