001package org.hl7.fhir.dstu2016may.model; 002 003 004 005 006/* 007 Copyright (c) 2011+, HL7, Inc. 008 All rights reserved. 009 010 Redistribution and use in source and binary forms, with or without modification, 011 are permitted provided that the following conditions are met: 012 013 * Redistributions of source code must retain the above copyright notice, this 014 list of conditions and the following disclaimer. 015 * Redistributions in binary form must reproduce the above copyright notice, 016 this list of conditions and the following disclaimer in the documentation 017 and/or other materials provided with the distribution. 018 * Neither the name of HL7 nor the names of its contributors may be used to 019 endorse or promote products derived from this software without specific 020 prior written permission. 021 022 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 023 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 024 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 025 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 026 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 027 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 028 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 029 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 030 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 031 POSSIBILITY OF SUCH DAMAGE. 032 033*/ 034 035// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 036import java.util.ArrayList; 037import java.util.List; 038 039import org.hl7.fhir.exceptions.FHIRException; 040import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 041import org.hl7.fhir.utilities.Utilities; 042 043import ca.uhn.fhir.model.api.annotation.Block; 044import ca.uhn.fhir.model.api.annotation.Child; 045import ca.uhn.fhir.model.api.annotation.Description; 046import ca.uhn.fhir.model.api.annotation.ResourceDef; 047import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 048/** 049 * The Measure resource provides the definition of a quality measure. 050 */ 051@ResourceDef(name="Measure", profile="http://hl7.org/fhir/Profile/Measure") 052public class Measure extends DomainResource { 053 054 public enum MeasureScoring { 055 /** 056 * The measure score is defined using a proportion 057 */ 058 PROPORTION, 059 /** 060 * The measure score is defined using a ratio 061 */ 062 RATIO, 063 /** 064 * The score is defined by a calculation of some quantity 065 */ 066 CONTINUOUSVARIABLE, 067 /** 068 * The measure is a cohort definition 069 */ 070 COHORT, 071 /** 072 * added to help the parsers 073 */ 074 NULL; 075 public static MeasureScoring fromCode(String codeString) throws FHIRException { 076 if (codeString == null || "".equals(codeString)) 077 return null; 078 if ("proportion".equals(codeString)) 079 return PROPORTION; 080 if ("ratio".equals(codeString)) 081 return RATIO; 082 if ("continuous-variable".equals(codeString)) 083 return CONTINUOUSVARIABLE; 084 if ("cohort".equals(codeString)) 085 return COHORT; 086 throw new FHIRException("Unknown MeasureScoring code '"+codeString+"'"); 087 } 088 public String toCode() { 089 switch (this) { 090 case PROPORTION: return "proportion"; 091 case RATIO: return "ratio"; 092 case CONTINUOUSVARIABLE: return "continuous-variable"; 093 case COHORT: return "cohort"; 094 case NULL: return null; 095 default: return "?"; 096 } 097 } 098 public String getSystem() { 099 switch (this) { 100 case PROPORTION: return "http://hl7.org/fhir/measure-scoring"; 101 case RATIO: return "http://hl7.org/fhir/measure-scoring"; 102 case CONTINUOUSVARIABLE: return "http://hl7.org/fhir/measure-scoring"; 103 case COHORT: return "http://hl7.org/fhir/measure-scoring"; 104 case NULL: return null; 105 default: return "?"; 106 } 107 } 108 public String getDefinition() { 109 switch (this) { 110 case PROPORTION: return "The measure score is defined using a proportion"; 111 case RATIO: return "The measure score is defined using a ratio"; 112 case CONTINUOUSVARIABLE: return "The score is defined by a calculation of some quantity"; 113 case COHORT: return "The measure is a cohort definition"; 114 case NULL: return null; 115 default: return "?"; 116 } 117 } 118 public String getDisplay() { 119 switch (this) { 120 case PROPORTION: return "Proportion"; 121 case RATIO: return "Ratio"; 122 case CONTINUOUSVARIABLE: return "Continuous Variable"; 123 case COHORT: return "Cohort"; 124 case NULL: return null; 125 default: return "?"; 126 } 127 } 128 } 129 130 public static class MeasureScoringEnumFactory implements EnumFactory<MeasureScoring> { 131 public MeasureScoring fromCode(String codeString) throws IllegalArgumentException { 132 if (codeString == null || "".equals(codeString)) 133 if (codeString == null || "".equals(codeString)) 134 return null; 135 if ("proportion".equals(codeString)) 136 return MeasureScoring.PROPORTION; 137 if ("ratio".equals(codeString)) 138 return MeasureScoring.RATIO; 139 if ("continuous-variable".equals(codeString)) 140 return MeasureScoring.CONTINUOUSVARIABLE; 141 if ("cohort".equals(codeString)) 142 return MeasureScoring.COHORT; 143 throw new IllegalArgumentException("Unknown MeasureScoring code '"+codeString+"'"); 144 } 145 public Enumeration<MeasureScoring> fromType(Base code) throws FHIRException { 146 if (code == null || code.isEmpty()) 147 return null; 148 String codeString = ((PrimitiveType) code).asStringValue(); 149 if (codeString == null || "".equals(codeString)) 150 return null; 151 if ("proportion".equals(codeString)) 152 return new Enumeration<MeasureScoring>(this, MeasureScoring.PROPORTION); 153 if ("ratio".equals(codeString)) 154 return new Enumeration<MeasureScoring>(this, MeasureScoring.RATIO); 155 if ("continuous-variable".equals(codeString)) 156 return new Enumeration<MeasureScoring>(this, MeasureScoring.CONTINUOUSVARIABLE); 157 if ("cohort".equals(codeString)) 158 return new Enumeration<MeasureScoring>(this, MeasureScoring.COHORT); 159 throw new FHIRException("Unknown MeasureScoring code '"+codeString+"'"); 160 } 161 public String toCode(MeasureScoring code) { 162 if (code == MeasureScoring.PROPORTION) 163 return "proportion"; 164 if (code == MeasureScoring.RATIO) 165 return "ratio"; 166 if (code == MeasureScoring.CONTINUOUSVARIABLE) 167 return "continuous-variable"; 168 if (code == MeasureScoring.COHORT) 169 return "cohort"; 170 return "?"; 171 } 172 public String toSystem(MeasureScoring code) { 173 return code.getSystem(); 174 } 175 } 176 177 public enum MeasureType { 178 /** 179 * The measure is a process measure 180 */ 181 PROCESS, 182 /** 183 * The measure is an outcome measure 184 */ 185 OUTCOME, 186 /** 187 * added to help the parsers 188 */ 189 NULL; 190 public static MeasureType fromCode(String codeString) throws FHIRException { 191 if (codeString == null || "".equals(codeString)) 192 return null; 193 if ("process".equals(codeString)) 194 return PROCESS; 195 if ("outcome".equals(codeString)) 196 return OUTCOME; 197 throw new FHIRException("Unknown MeasureType code '"+codeString+"'"); 198 } 199 public String toCode() { 200 switch (this) { 201 case PROCESS: return "process"; 202 case OUTCOME: return "outcome"; 203 case NULL: return null; 204 default: return "?"; 205 } 206 } 207 public String getSystem() { 208 switch (this) { 209 case PROCESS: return "http://hl7.org/fhir/measure-type"; 210 case OUTCOME: return "http://hl7.org/fhir/measure-type"; 211 case NULL: return null; 212 default: return "?"; 213 } 214 } 215 public String getDefinition() { 216 switch (this) { 217 case PROCESS: return "The measure is a process measure"; 218 case OUTCOME: return "The measure is an outcome measure"; 219 case NULL: return null; 220 default: return "?"; 221 } 222 } 223 public String getDisplay() { 224 switch (this) { 225 case PROCESS: return "Process"; 226 case OUTCOME: return "Outcome"; 227 case NULL: return null; 228 default: return "?"; 229 } 230 } 231 } 232 233 public static class MeasureTypeEnumFactory implements EnumFactory<MeasureType> { 234 public MeasureType fromCode(String codeString) throws IllegalArgumentException { 235 if (codeString == null || "".equals(codeString)) 236 if (codeString == null || "".equals(codeString)) 237 return null; 238 if ("process".equals(codeString)) 239 return MeasureType.PROCESS; 240 if ("outcome".equals(codeString)) 241 return MeasureType.OUTCOME; 242 throw new IllegalArgumentException("Unknown MeasureType code '"+codeString+"'"); 243 } 244 public Enumeration<MeasureType> fromType(Base code) throws FHIRException { 245 if (code == null || code.isEmpty()) 246 return null; 247 String codeString = ((PrimitiveType) code).asStringValue(); 248 if (codeString == null || "".equals(codeString)) 249 return null; 250 if ("process".equals(codeString)) 251 return new Enumeration<MeasureType>(this, MeasureType.PROCESS); 252 if ("outcome".equals(codeString)) 253 return new Enumeration<MeasureType>(this, MeasureType.OUTCOME); 254 throw new FHIRException("Unknown MeasureType code '"+codeString+"'"); 255 } 256 public String toCode(MeasureType code) { 257 if (code == MeasureType.PROCESS) 258 return "process"; 259 if (code == MeasureType.OUTCOME) 260 return "outcome"; 261 return "?"; 262 } 263 public String toSystem(MeasureType code) { 264 return code.getSystem(); 265 } 266 } 267 268 public enum MeasurePopulationType { 269 /** 270 * The initial population for the measure 271 */ 272 INITIALPOPULATION, 273 /** 274 * The numerator for the measure 275 */ 276 NUMERATOR, 277 /** 278 * The numerator exclusion for the measure 279 */ 280 NUMERATOREXCLUSION, 281 /** 282 * The denominator for the measure 283 */ 284 DENOMINATOR, 285 /** 286 * The denominator exclusion for the measure 287 */ 288 DENOMINATOREXCLUSION, 289 /** 290 * The denominator exception for the measure 291 */ 292 DENOMINATOREXCEPTION, 293 /** 294 * The measure population for the measure 295 */ 296 MEASUREPOPULATION, 297 /** 298 * The measure population exclusion for the measure 299 */ 300 MEASUREPOPULATIONEXCLUSION, 301 /** 302 * The measure score for the measure 303 */ 304 MEASURESCORE, 305 /** 306 * added to help the parsers 307 */ 308 NULL; 309 public static MeasurePopulationType fromCode(String codeString) throws FHIRException { 310 if (codeString == null || "".equals(codeString)) 311 return null; 312 if ("initial-population".equals(codeString)) 313 return INITIALPOPULATION; 314 if ("numerator".equals(codeString)) 315 return NUMERATOR; 316 if ("numerator-exclusion".equals(codeString)) 317 return NUMERATOREXCLUSION; 318 if ("denominator".equals(codeString)) 319 return DENOMINATOR; 320 if ("denominator-exclusion".equals(codeString)) 321 return DENOMINATOREXCLUSION; 322 if ("denominator-exception".equals(codeString)) 323 return DENOMINATOREXCEPTION; 324 if ("measure-population".equals(codeString)) 325 return MEASUREPOPULATION; 326 if ("measure-population-exclusion".equals(codeString)) 327 return MEASUREPOPULATIONEXCLUSION; 328 if ("measure-score".equals(codeString)) 329 return MEASURESCORE; 330 throw new FHIRException("Unknown MeasurePopulationType code '"+codeString+"'"); 331 } 332 public String toCode() { 333 switch (this) { 334 case INITIALPOPULATION: return "initial-population"; 335 case NUMERATOR: return "numerator"; 336 case NUMERATOREXCLUSION: return "numerator-exclusion"; 337 case DENOMINATOR: return "denominator"; 338 case DENOMINATOREXCLUSION: return "denominator-exclusion"; 339 case DENOMINATOREXCEPTION: return "denominator-exception"; 340 case MEASUREPOPULATION: return "measure-population"; 341 case MEASUREPOPULATIONEXCLUSION: return "measure-population-exclusion"; 342 case MEASURESCORE: return "measure-score"; 343 case NULL: return null; 344 default: return "?"; 345 } 346 } 347 public String getSystem() { 348 switch (this) { 349 case INITIALPOPULATION: return "http://hl7.org/fhir/measure-population"; 350 case NUMERATOR: return "http://hl7.org/fhir/measure-population"; 351 case NUMERATOREXCLUSION: return "http://hl7.org/fhir/measure-population"; 352 case DENOMINATOR: return "http://hl7.org/fhir/measure-population"; 353 case DENOMINATOREXCLUSION: return "http://hl7.org/fhir/measure-population"; 354 case DENOMINATOREXCEPTION: return "http://hl7.org/fhir/measure-population"; 355 case MEASUREPOPULATION: return "http://hl7.org/fhir/measure-population"; 356 case MEASUREPOPULATIONEXCLUSION: return "http://hl7.org/fhir/measure-population"; 357 case MEASURESCORE: return "http://hl7.org/fhir/measure-population"; 358 case NULL: return null; 359 default: return "?"; 360 } 361 } 362 public String getDefinition() { 363 switch (this) { 364 case INITIALPOPULATION: return "The initial population for the measure"; 365 case NUMERATOR: return "The numerator for the measure"; 366 case NUMERATOREXCLUSION: return "The numerator exclusion for the measure"; 367 case DENOMINATOR: return "The denominator for the measure"; 368 case DENOMINATOREXCLUSION: return "The denominator exclusion for the measure"; 369 case DENOMINATOREXCEPTION: return "The denominator exception for the measure"; 370 case MEASUREPOPULATION: return "The measure population for the measure"; 371 case MEASUREPOPULATIONEXCLUSION: return "The measure population exclusion for the measure"; 372 case MEASURESCORE: return "The measure score for the measure"; 373 case NULL: return null; 374 default: return "?"; 375 } 376 } 377 public String getDisplay() { 378 switch (this) { 379 case INITIALPOPULATION: return "Initial Population"; 380 case NUMERATOR: return "Numerator"; 381 case NUMERATOREXCLUSION: return "Numerator Exclusion"; 382 case DENOMINATOR: return "Denominator"; 383 case DENOMINATOREXCLUSION: return "Denominator Exclusion"; 384 case DENOMINATOREXCEPTION: return "Denominator Exception"; 385 case MEASUREPOPULATION: return "Measure Population"; 386 case MEASUREPOPULATIONEXCLUSION: return "Measure Population Exclusion"; 387 case MEASURESCORE: return "Measure Score"; 388 case NULL: return null; 389 default: return "?"; 390 } 391 } 392 } 393 394 public static class MeasurePopulationTypeEnumFactory implements EnumFactory<MeasurePopulationType> { 395 public MeasurePopulationType fromCode(String codeString) throws IllegalArgumentException { 396 if (codeString == null || "".equals(codeString)) 397 if (codeString == null || "".equals(codeString)) 398 return null; 399 if ("initial-population".equals(codeString)) 400 return MeasurePopulationType.INITIALPOPULATION; 401 if ("numerator".equals(codeString)) 402 return MeasurePopulationType.NUMERATOR; 403 if ("numerator-exclusion".equals(codeString)) 404 return MeasurePopulationType.NUMERATOREXCLUSION; 405 if ("denominator".equals(codeString)) 406 return MeasurePopulationType.DENOMINATOR; 407 if ("denominator-exclusion".equals(codeString)) 408 return MeasurePopulationType.DENOMINATOREXCLUSION; 409 if ("denominator-exception".equals(codeString)) 410 return MeasurePopulationType.DENOMINATOREXCEPTION; 411 if ("measure-population".equals(codeString)) 412 return MeasurePopulationType.MEASUREPOPULATION; 413 if ("measure-population-exclusion".equals(codeString)) 414 return MeasurePopulationType.MEASUREPOPULATIONEXCLUSION; 415 if ("measure-score".equals(codeString)) 416 return MeasurePopulationType.MEASURESCORE; 417 throw new IllegalArgumentException("Unknown MeasurePopulationType code '"+codeString+"'"); 418 } 419 public Enumeration<MeasurePopulationType> fromType(Base code) throws FHIRException { 420 if (code == null || code.isEmpty()) 421 return null; 422 String codeString = ((PrimitiveType) code).asStringValue(); 423 if (codeString == null || "".equals(codeString)) 424 return null; 425 if ("initial-population".equals(codeString)) 426 return new Enumeration<MeasurePopulationType>(this, MeasurePopulationType.INITIALPOPULATION); 427 if ("numerator".equals(codeString)) 428 return new Enumeration<MeasurePopulationType>(this, MeasurePopulationType.NUMERATOR); 429 if ("numerator-exclusion".equals(codeString)) 430 return new Enumeration<MeasurePopulationType>(this, MeasurePopulationType.NUMERATOREXCLUSION); 431 if ("denominator".equals(codeString)) 432 return new Enumeration<MeasurePopulationType>(this, MeasurePopulationType.DENOMINATOR); 433 if ("denominator-exclusion".equals(codeString)) 434 return new Enumeration<MeasurePopulationType>(this, MeasurePopulationType.DENOMINATOREXCLUSION); 435 if ("denominator-exception".equals(codeString)) 436 return new Enumeration<MeasurePopulationType>(this, MeasurePopulationType.DENOMINATOREXCEPTION); 437 if ("measure-population".equals(codeString)) 438 return new Enumeration<MeasurePopulationType>(this, MeasurePopulationType.MEASUREPOPULATION); 439 if ("measure-population-exclusion".equals(codeString)) 440 return new Enumeration<MeasurePopulationType>(this, MeasurePopulationType.MEASUREPOPULATIONEXCLUSION); 441 if ("measure-score".equals(codeString)) 442 return new Enumeration<MeasurePopulationType>(this, MeasurePopulationType.MEASURESCORE); 443 throw new FHIRException("Unknown MeasurePopulationType code '"+codeString+"'"); 444 } 445 public String toCode(MeasurePopulationType code) { 446 if (code == MeasurePopulationType.INITIALPOPULATION) 447 return "initial-population"; 448 if (code == MeasurePopulationType.NUMERATOR) 449 return "numerator"; 450 if (code == MeasurePopulationType.NUMERATOREXCLUSION) 451 return "numerator-exclusion"; 452 if (code == MeasurePopulationType.DENOMINATOR) 453 return "denominator"; 454 if (code == MeasurePopulationType.DENOMINATOREXCLUSION) 455 return "denominator-exclusion"; 456 if (code == MeasurePopulationType.DENOMINATOREXCEPTION) 457 return "denominator-exception"; 458 if (code == MeasurePopulationType.MEASUREPOPULATION) 459 return "measure-population"; 460 if (code == MeasurePopulationType.MEASUREPOPULATIONEXCLUSION) 461 return "measure-population-exclusion"; 462 if (code == MeasurePopulationType.MEASURESCORE) 463 return "measure-score"; 464 return "?"; 465 } 466 public String toSystem(MeasurePopulationType code) { 467 return code.getSystem(); 468 } 469 } 470 471 public enum MeasureDataUsage { 472 /** 473 * The data is intended to be provided as additional information alongside the measure results 474 */ 475 SUPPLEMENTALDATA, 476 /** 477 * The data is intended to be used to calculate and apply a risk adjustment model for the measure 478 */ 479 RISKADJUSTMENTFACTOR, 480 /** 481 * added to help the parsers 482 */ 483 NULL; 484 public static MeasureDataUsage fromCode(String codeString) throws FHIRException { 485 if (codeString == null || "".equals(codeString)) 486 return null; 487 if ("supplemental-data".equals(codeString)) 488 return SUPPLEMENTALDATA; 489 if ("risk-adjustment-factor".equals(codeString)) 490 return RISKADJUSTMENTFACTOR; 491 throw new FHIRException("Unknown MeasureDataUsage code '"+codeString+"'"); 492 } 493 public String toCode() { 494 switch (this) { 495 case SUPPLEMENTALDATA: return "supplemental-data"; 496 case RISKADJUSTMENTFACTOR: return "risk-adjustment-factor"; 497 case NULL: return null; 498 default: return "?"; 499 } 500 } 501 public String getSystem() { 502 switch (this) { 503 case SUPPLEMENTALDATA: return "http://hl7.org/fhir/measure-data-usage"; 504 case RISKADJUSTMENTFACTOR: return "http://hl7.org/fhir/measure-data-usage"; 505 case NULL: return null; 506 default: return "?"; 507 } 508 } 509 public String getDefinition() { 510 switch (this) { 511 case SUPPLEMENTALDATA: return "The data is intended to be provided as additional information alongside the measure results"; 512 case RISKADJUSTMENTFACTOR: return "The data is intended to be used to calculate and apply a risk adjustment model for the measure"; 513 case NULL: return null; 514 default: return "?"; 515 } 516 } 517 public String getDisplay() { 518 switch (this) { 519 case SUPPLEMENTALDATA: return "Supplemental Data"; 520 case RISKADJUSTMENTFACTOR: return "Risk Adjustment Factor"; 521 case NULL: return null; 522 default: return "?"; 523 } 524 } 525 } 526 527 public static class MeasureDataUsageEnumFactory implements EnumFactory<MeasureDataUsage> { 528 public MeasureDataUsage fromCode(String codeString) throws IllegalArgumentException { 529 if (codeString == null || "".equals(codeString)) 530 if (codeString == null || "".equals(codeString)) 531 return null; 532 if ("supplemental-data".equals(codeString)) 533 return MeasureDataUsage.SUPPLEMENTALDATA; 534 if ("risk-adjustment-factor".equals(codeString)) 535 return MeasureDataUsage.RISKADJUSTMENTFACTOR; 536 throw new IllegalArgumentException("Unknown MeasureDataUsage code '"+codeString+"'"); 537 } 538 public Enumeration<MeasureDataUsage> fromType(Base code) throws FHIRException { 539 if (code == null || code.isEmpty()) 540 return null; 541 String codeString = ((PrimitiveType) code).asStringValue(); 542 if (codeString == null || "".equals(codeString)) 543 return null; 544 if ("supplemental-data".equals(codeString)) 545 return new Enumeration<MeasureDataUsage>(this, MeasureDataUsage.SUPPLEMENTALDATA); 546 if ("risk-adjustment-factor".equals(codeString)) 547 return new Enumeration<MeasureDataUsage>(this, MeasureDataUsage.RISKADJUSTMENTFACTOR); 548 throw new FHIRException("Unknown MeasureDataUsage code '"+codeString+"'"); 549 } 550 public String toCode(MeasureDataUsage code) { 551 if (code == MeasureDataUsage.SUPPLEMENTALDATA) 552 return "supplemental-data"; 553 if (code == MeasureDataUsage.RISKADJUSTMENTFACTOR) 554 return "risk-adjustment-factor"; 555 return "?"; 556 } 557 public String toSystem(MeasureDataUsage code) { 558 return code.getSystem(); 559 } 560 } 561 562 @Block() 563 public static class MeasureGroupComponent extends BackboneElement implements IBaseBackboneElement { 564 /** 565 * A unique identifier for the group. This identifier will used to report data for the group in the measure report. 566 */ 567 @Child(name = "identifier", type = {Identifier.class}, order=1, min=1, max=1, modifier=false, summary=true) 568 @Description(shortDefinition="Unique identifier", formalDefinition="A unique identifier for the group. This identifier will used to report data for the group in the measure report." ) 569 protected Identifier identifier; 570 571 /** 572 * Optional name or short description of this group. 573 */ 574 @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 575 @Description(shortDefinition="Short name", formalDefinition="Optional name or short description of this group." ) 576 protected StringType name; 577 578 /** 579 * The human readable description of this population group. 580 */ 581 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 582 @Description(shortDefinition="Summary description", formalDefinition="The human readable description of this population group." ) 583 protected StringType description; 584 585 /** 586 * A population criteria for the measure. 587 */ 588 @Child(name = "population", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 589 @Description(shortDefinition="Population criteria", formalDefinition="A population criteria for the measure." ) 590 protected List<MeasureGroupPopulationComponent> population; 591 592 /** 593 * The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path. 594 */ 595 @Child(name = "stratifier", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 596 @Description(shortDefinition="Stratifier criteria for the measure", formalDefinition="The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path." ) 597 protected List<MeasureGroupStratifierComponent> stratifier; 598 599 private static final long serialVersionUID = 1287622059L; 600 601 /** 602 * Constructor 603 */ 604 public MeasureGroupComponent() { 605 super(); 606 } 607 608 /** 609 * Constructor 610 */ 611 public MeasureGroupComponent(Identifier identifier) { 612 super(); 613 this.identifier = identifier; 614 } 615 616 /** 617 * @return {@link #identifier} (A unique identifier for the group. This identifier will used to report data for the group in the measure report.) 618 */ 619 public Identifier getIdentifier() { 620 if (this.identifier == null) 621 if (Configuration.errorOnAutoCreate()) 622 throw new Error("Attempt to auto-create MeasureGroupComponent.identifier"); 623 else if (Configuration.doAutoCreate()) 624 this.identifier = new Identifier(); // cc 625 return this.identifier; 626 } 627 628 public boolean hasIdentifier() { 629 return this.identifier != null && !this.identifier.isEmpty(); 630 } 631 632 /** 633 * @param value {@link #identifier} (A unique identifier for the group. This identifier will used to report data for the group in the measure report.) 634 */ 635 public MeasureGroupComponent setIdentifier(Identifier value) { 636 this.identifier = value; 637 return this; 638 } 639 640 /** 641 * @return {@link #name} (Optional name or short description of this group.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 642 */ 643 public StringType getNameElement() { 644 if (this.name == null) 645 if (Configuration.errorOnAutoCreate()) 646 throw new Error("Attempt to auto-create MeasureGroupComponent.name"); 647 else if (Configuration.doAutoCreate()) 648 this.name = new StringType(); // bb 649 return this.name; 650 } 651 652 public boolean hasNameElement() { 653 return this.name != null && !this.name.isEmpty(); 654 } 655 656 public boolean hasName() { 657 return this.name != null && !this.name.isEmpty(); 658 } 659 660 /** 661 * @param value {@link #name} (Optional name or short description of this group.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 662 */ 663 public MeasureGroupComponent setNameElement(StringType value) { 664 this.name = value; 665 return this; 666 } 667 668 /** 669 * @return Optional name or short description of this group. 670 */ 671 public String getName() { 672 return this.name == null ? null : this.name.getValue(); 673 } 674 675 /** 676 * @param value Optional name or short description of this group. 677 */ 678 public MeasureGroupComponent setName(String value) { 679 if (Utilities.noString(value)) 680 this.name = null; 681 else { 682 if (this.name == null) 683 this.name = new StringType(); 684 this.name.setValue(value); 685 } 686 return this; 687 } 688 689 /** 690 * @return {@link #description} (The human readable description of this population group.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 691 */ 692 public StringType getDescriptionElement() { 693 if (this.description == null) 694 if (Configuration.errorOnAutoCreate()) 695 throw new Error("Attempt to auto-create MeasureGroupComponent.description"); 696 else if (Configuration.doAutoCreate()) 697 this.description = new StringType(); // bb 698 return this.description; 699 } 700 701 public boolean hasDescriptionElement() { 702 return this.description != null && !this.description.isEmpty(); 703 } 704 705 public boolean hasDescription() { 706 return this.description != null && !this.description.isEmpty(); 707 } 708 709 /** 710 * @param value {@link #description} (The human readable description of this population group.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 711 */ 712 public MeasureGroupComponent setDescriptionElement(StringType value) { 713 this.description = value; 714 return this; 715 } 716 717 /** 718 * @return The human readable description of this population group. 719 */ 720 public String getDescription() { 721 return this.description == null ? null : this.description.getValue(); 722 } 723 724 /** 725 * @param value The human readable description of this population group. 726 */ 727 public MeasureGroupComponent setDescription(String value) { 728 if (Utilities.noString(value)) 729 this.description = null; 730 else { 731 if (this.description == null) 732 this.description = new StringType(); 733 this.description.setValue(value); 734 } 735 return this; 736 } 737 738 /** 739 * @return {@link #population} (A population criteria for the measure.) 740 */ 741 public List<MeasureGroupPopulationComponent> getPopulation() { 742 if (this.population == null) 743 this.population = new ArrayList<MeasureGroupPopulationComponent>(); 744 return this.population; 745 } 746 747 public boolean hasPopulation() { 748 if (this.population == null) 749 return false; 750 for (MeasureGroupPopulationComponent item : this.population) 751 if (!item.isEmpty()) 752 return true; 753 return false; 754 } 755 756 /** 757 * @return {@link #population} (A population criteria for the measure.) 758 */ 759 // syntactic sugar 760 public MeasureGroupPopulationComponent addPopulation() { //3 761 MeasureGroupPopulationComponent t = new MeasureGroupPopulationComponent(); 762 if (this.population == null) 763 this.population = new ArrayList<MeasureGroupPopulationComponent>(); 764 this.population.add(t); 765 return t; 766 } 767 768 // syntactic sugar 769 public MeasureGroupComponent addPopulation(MeasureGroupPopulationComponent t) { //3 770 if (t == null) 771 return this; 772 if (this.population == null) 773 this.population = new ArrayList<MeasureGroupPopulationComponent>(); 774 this.population.add(t); 775 return this; 776 } 777 778 /** 779 * @return {@link #stratifier} (The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path.) 780 */ 781 public List<MeasureGroupStratifierComponent> getStratifier() { 782 if (this.stratifier == null) 783 this.stratifier = new ArrayList<MeasureGroupStratifierComponent>(); 784 return this.stratifier; 785 } 786 787 public boolean hasStratifier() { 788 if (this.stratifier == null) 789 return false; 790 for (MeasureGroupStratifierComponent item : this.stratifier) 791 if (!item.isEmpty()) 792 return true; 793 return false; 794 } 795 796 /** 797 * @return {@link #stratifier} (The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path.) 798 */ 799 // syntactic sugar 800 public MeasureGroupStratifierComponent addStratifier() { //3 801 MeasureGroupStratifierComponent t = new MeasureGroupStratifierComponent(); 802 if (this.stratifier == null) 803 this.stratifier = new ArrayList<MeasureGroupStratifierComponent>(); 804 this.stratifier.add(t); 805 return t; 806 } 807 808 // syntactic sugar 809 public MeasureGroupComponent addStratifier(MeasureGroupStratifierComponent t) { //3 810 if (t == null) 811 return this; 812 if (this.stratifier == null) 813 this.stratifier = new ArrayList<MeasureGroupStratifierComponent>(); 814 this.stratifier.add(t); 815 return this; 816 } 817 818 protected void listChildren(List<Property> childrenList) { 819 super.listChildren(childrenList); 820 childrenList.add(new Property("identifier", "Identifier", "A unique identifier for the group. This identifier will used to report data for the group in the measure report.", 0, java.lang.Integer.MAX_VALUE, identifier)); 821 childrenList.add(new Property("name", "string", "Optional name or short description of this group.", 0, java.lang.Integer.MAX_VALUE, name)); 822 childrenList.add(new Property("description", "string", "The human readable description of this population group.", 0, java.lang.Integer.MAX_VALUE, description)); 823 childrenList.add(new Property("population", "", "A population criteria for the measure.", 0, java.lang.Integer.MAX_VALUE, population)); 824 childrenList.add(new Property("stratifier", "", "The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, stratifier)); 825 } 826 827 @Override 828 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 829 switch (hash) { 830 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 831 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 832 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 833 case -2023558323: /*population*/ return this.population == null ? new Base[0] : this.population.toArray(new Base[this.population.size()]); // MeasureGroupPopulationComponent 834 case 90983669: /*stratifier*/ return this.stratifier == null ? new Base[0] : this.stratifier.toArray(new Base[this.stratifier.size()]); // MeasureGroupStratifierComponent 835 default: return super.getProperty(hash, name, checkValid); 836 } 837 838 } 839 840 @Override 841 public void setProperty(int hash, String name, Base value) throws FHIRException { 842 switch (hash) { 843 case -1618432855: // identifier 844 this.identifier = castToIdentifier(value); // Identifier 845 break; 846 case 3373707: // name 847 this.name = castToString(value); // StringType 848 break; 849 case -1724546052: // description 850 this.description = castToString(value); // StringType 851 break; 852 case -2023558323: // population 853 this.getPopulation().add((MeasureGroupPopulationComponent) value); // MeasureGroupPopulationComponent 854 break; 855 case 90983669: // stratifier 856 this.getStratifier().add((MeasureGroupStratifierComponent) value); // MeasureGroupStratifierComponent 857 break; 858 default: super.setProperty(hash, name, value); 859 } 860 861 } 862 863 @Override 864 public void setProperty(String name, Base value) throws FHIRException { 865 if (name.equals("identifier")) 866 this.identifier = castToIdentifier(value); // Identifier 867 else if (name.equals("name")) 868 this.name = castToString(value); // StringType 869 else if (name.equals("description")) 870 this.description = castToString(value); // StringType 871 else if (name.equals("population")) 872 this.getPopulation().add((MeasureGroupPopulationComponent) value); 873 else if (name.equals("stratifier")) 874 this.getStratifier().add((MeasureGroupStratifierComponent) value); 875 else 876 super.setProperty(name, value); 877 } 878 879 @Override 880 public Base makeProperty(int hash, String name) throws FHIRException { 881 switch (hash) { 882 case -1618432855: return getIdentifier(); // Identifier 883 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 884 case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType 885 case -2023558323: return addPopulation(); // MeasureGroupPopulationComponent 886 case 90983669: return addStratifier(); // MeasureGroupStratifierComponent 887 default: return super.makeProperty(hash, name); 888 } 889 890 } 891 892 @Override 893 public Base addChild(String name) throws FHIRException { 894 if (name.equals("identifier")) { 895 this.identifier = new Identifier(); 896 return this.identifier; 897 } 898 else if (name.equals("name")) { 899 throw new FHIRException("Cannot call addChild on a primitive type Measure.name"); 900 } 901 else if (name.equals("description")) { 902 throw new FHIRException("Cannot call addChild on a primitive type Measure.description"); 903 } 904 else if (name.equals("population")) { 905 return addPopulation(); 906 } 907 else if (name.equals("stratifier")) { 908 return addStratifier(); 909 } 910 else 911 return super.addChild(name); 912 } 913 914 public MeasureGroupComponent copy() { 915 MeasureGroupComponent dst = new MeasureGroupComponent(); 916 copyValues(dst); 917 dst.identifier = identifier == null ? null : identifier.copy(); 918 dst.name = name == null ? null : name.copy(); 919 dst.description = description == null ? null : description.copy(); 920 if (population != null) { 921 dst.population = new ArrayList<MeasureGroupPopulationComponent>(); 922 for (MeasureGroupPopulationComponent i : population) 923 dst.population.add(i.copy()); 924 }; 925 if (stratifier != null) { 926 dst.stratifier = new ArrayList<MeasureGroupStratifierComponent>(); 927 for (MeasureGroupStratifierComponent i : stratifier) 928 dst.stratifier.add(i.copy()); 929 }; 930 return dst; 931 } 932 933 @Override 934 public boolean equalsDeep(Base other) { 935 if (!super.equalsDeep(other)) 936 return false; 937 if (!(other instanceof MeasureGroupComponent)) 938 return false; 939 MeasureGroupComponent o = (MeasureGroupComponent) other; 940 return compareDeep(identifier, o.identifier, true) && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) 941 && compareDeep(population, o.population, true) && compareDeep(stratifier, o.stratifier, true); 942 } 943 944 @Override 945 public boolean equalsShallow(Base other) { 946 if (!super.equalsShallow(other)) 947 return false; 948 if (!(other instanceof MeasureGroupComponent)) 949 return false; 950 MeasureGroupComponent o = (MeasureGroupComponent) other; 951 return compareValues(name, o.name, true) && compareValues(description, o.description, true); 952 } 953 954 public boolean isEmpty() { 955 return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (name == null || name.isEmpty()) 956 && (description == null || description.isEmpty()) && (population == null || population.isEmpty()) 957 && (stratifier == null || stratifier.isEmpty()); 958 } 959 960 public String fhirType() { 961 return "Measure.group"; 962 963 } 964 965 } 966 967 @Block() 968 public static class MeasureGroupPopulationComponent extends BackboneElement implements IBaseBackboneElement { 969 /** 970 * The type of population criteria. 971 */ 972 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 973 @Description(shortDefinition="initial-population | numerator | numerator-exclusion | denominator | denominator-exclusion | denominator-exception | measure-population | measure-population-exclusion | measure-score", formalDefinition="The type of population criteria." ) 974 protected Enumeration<MeasurePopulationType> type; 975 976 /** 977 * A unique identifier for the population criteria. This identifier is used to report data against this criteria within the measure report. 978 */ 979 @Child(name = "identifier", type = {Identifier.class}, order=2, min=1, max=1, modifier=false, summary=true) 980 @Description(shortDefinition="Unique identifier", formalDefinition="A unique identifier for the population criteria. This identifier is used to report data against this criteria within the measure report." ) 981 protected Identifier identifier; 982 983 /** 984 * Optional name or short description of this population. 985 */ 986 @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 987 @Description(shortDefinition="Short name", formalDefinition="Optional name or short description of this population." ) 988 protected StringType name; 989 990 /** 991 * The human readable description of this population criteria. 992 */ 993 @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 994 @Description(shortDefinition="The human readable description of this population criteria", formalDefinition="The human readable description of this population criteria." ) 995 protected StringType description; 996 997 /** 998 * The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria. 999 */ 1000 @Child(name = "criteria", type = {StringType.class}, order=5, min=1, max=1, modifier=false, summary=true) 1001 @Description(shortDefinition="The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria", formalDefinition="The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria." ) 1002 protected StringType criteria; 1003 1004 private static final long serialVersionUID = 1158202275L; 1005 1006 /** 1007 * Constructor 1008 */ 1009 public MeasureGroupPopulationComponent() { 1010 super(); 1011 } 1012 1013 /** 1014 * Constructor 1015 */ 1016 public MeasureGroupPopulationComponent(Enumeration<MeasurePopulationType> type, Identifier identifier, StringType criteria) { 1017 super(); 1018 this.type = type; 1019 this.identifier = identifier; 1020 this.criteria = criteria; 1021 } 1022 1023 /** 1024 * @return {@link #type} (The type of population criteria.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1025 */ 1026 public Enumeration<MeasurePopulationType> getTypeElement() { 1027 if (this.type == null) 1028 if (Configuration.errorOnAutoCreate()) 1029 throw new Error("Attempt to auto-create MeasureGroupPopulationComponent.type"); 1030 else if (Configuration.doAutoCreate()) 1031 this.type = new Enumeration<MeasurePopulationType>(new MeasurePopulationTypeEnumFactory()); // bb 1032 return this.type; 1033 } 1034 1035 public boolean hasTypeElement() { 1036 return this.type != null && !this.type.isEmpty(); 1037 } 1038 1039 public boolean hasType() { 1040 return this.type != null && !this.type.isEmpty(); 1041 } 1042 1043 /** 1044 * @param value {@link #type} (The type of population criteria.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1045 */ 1046 public MeasureGroupPopulationComponent setTypeElement(Enumeration<MeasurePopulationType> value) { 1047 this.type = value; 1048 return this; 1049 } 1050 1051 /** 1052 * @return The type of population criteria. 1053 */ 1054 public MeasurePopulationType getType() { 1055 return this.type == null ? null : this.type.getValue(); 1056 } 1057 1058 /** 1059 * @param value The type of population criteria. 1060 */ 1061 public MeasureGroupPopulationComponent setType(MeasurePopulationType value) { 1062 if (this.type == null) 1063 this.type = new Enumeration<MeasurePopulationType>(new MeasurePopulationTypeEnumFactory()); 1064 this.type.setValue(value); 1065 return this; 1066 } 1067 1068 /** 1069 * @return {@link #identifier} (A unique identifier for the population criteria. This identifier is used to report data against this criteria within the measure report.) 1070 */ 1071 public Identifier getIdentifier() { 1072 if (this.identifier == null) 1073 if (Configuration.errorOnAutoCreate()) 1074 throw new Error("Attempt to auto-create MeasureGroupPopulationComponent.identifier"); 1075 else if (Configuration.doAutoCreate()) 1076 this.identifier = new Identifier(); // cc 1077 return this.identifier; 1078 } 1079 1080 public boolean hasIdentifier() { 1081 return this.identifier != null && !this.identifier.isEmpty(); 1082 } 1083 1084 /** 1085 * @param value {@link #identifier} (A unique identifier for the population criteria. This identifier is used to report data against this criteria within the measure report.) 1086 */ 1087 public MeasureGroupPopulationComponent setIdentifier(Identifier value) { 1088 this.identifier = value; 1089 return this; 1090 } 1091 1092 /** 1093 * @return {@link #name} (Optional name or short description of this population.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1094 */ 1095 public StringType getNameElement() { 1096 if (this.name == null) 1097 if (Configuration.errorOnAutoCreate()) 1098 throw new Error("Attempt to auto-create MeasureGroupPopulationComponent.name"); 1099 else if (Configuration.doAutoCreate()) 1100 this.name = new StringType(); // bb 1101 return this.name; 1102 } 1103 1104 public boolean hasNameElement() { 1105 return this.name != null && !this.name.isEmpty(); 1106 } 1107 1108 public boolean hasName() { 1109 return this.name != null && !this.name.isEmpty(); 1110 } 1111 1112 /** 1113 * @param value {@link #name} (Optional name or short description of this population.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1114 */ 1115 public MeasureGroupPopulationComponent setNameElement(StringType value) { 1116 this.name = value; 1117 return this; 1118 } 1119 1120 /** 1121 * @return Optional name or short description of this population. 1122 */ 1123 public String getName() { 1124 return this.name == null ? null : this.name.getValue(); 1125 } 1126 1127 /** 1128 * @param value Optional name or short description of this population. 1129 */ 1130 public MeasureGroupPopulationComponent setName(String value) { 1131 if (Utilities.noString(value)) 1132 this.name = null; 1133 else { 1134 if (this.name == null) 1135 this.name = new StringType(); 1136 this.name.setValue(value); 1137 } 1138 return this; 1139 } 1140 1141 /** 1142 * @return {@link #description} (The human readable description of this population criteria.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1143 */ 1144 public StringType getDescriptionElement() { 1145 if (this.description == null) 1146 if (Configuration.errorOnAutoCreate()) 1147 throw new Error("Attempt to auto-create MeasureGroupPopulationComponent.description"); 1148 else if (Configuration.doAutoCreate()) 1149 this.description = new StringType(); // bb 1150 return this.description; 1151 } 1152 1153 public boolean hasDescriptionElement() { 1154 return this.description != null && !this.description.isEmpty(); 1155 } 1156 1157 public boolean hasDescription() { 1158 return this.description != null && !this.description.isEmpty(); 1159 } 1160 1161 /** 1162 * @param value {@link #description} (The human readable description of this population criteria.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1163 */ 1164 public MeasureGroupPopulationComponent setDescriptionElement(StringType value) { 1165 this.description = value; 1166 return this; 1167 } 1168 1169 /** 1170 * @return The human readable description of this population criteria. 1171 */ 1172 public String getDescription() { 1173 return this.description == null ? null : this.description.getValue(); 1174 } 1175 1176 /** 1177 * @param value The human readable description of this population criteria. 1178 */ 1179 public MeasureGroupPopulationComponent setDescription(String value) { 1180 if (Utilities.noString(value)) 1181 this.description = null; 1182 else { 1183 if (this.description == null) 1184 this.description = new StringType(); 1185 this.description.setValue(value); 1186 } 1187 return this; 1188 } 1189 1190 /** 1191 * @return {@link #criteria} (The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value 1192 */ 1193 public StringType getCriteriaElement() { 1194 if (this.criteria == null) 1195 if (Configuration.errorOnAutoCreate()) 1196 throw new Error("Attempt to auto-create MeasureGroupPopulationComponent.criteria"); 1197 else if (Configuration.doAutoCreate()) 1198 this.criteria = new StringType(); // bb 1199 return this.criteria; 1200 } 1201 1202 public boolean hasCriteriaElement() { 1203 return this.criteria != null && !this.criteria.isEmpty(); 1204 } 1205 1206 public boolean hasCriteria() { 1207 return this.criteria != null && !this.criteria.isEmpty(); 1208 } 1209 1210 /** 1211 * @param value {@link #criteria} (The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value 1212 */ 1213 public MeasureGroupPopulationComponent setCriteriaElement(StringType value) { 1214 this.criteria = value; 1215 return this; 1216 } 1217 1218 /** 1219 * @return The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria. 1220 */ 1221 public String getCriteria() { 1222 return this.criteria == null ? null : this.criteria.getValue(); 1223 } 1224 1225 /** 1226 * @param value The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria. 1227 */ 1228 public MeasureGroupPopulationComponent setCriteria(String value) { 1229 if (this.criteria == null) 1230 this.criteria = new StringType(); 1231 this.criteria.setValue(value); 1232 return this; 1233 } 1234 1235 protected void listChildren(List<Property> childrenList) { 1236 super.listChildren(childrenList); 1237 childrenList.add(new Property("type", "code", "The type of population criteria.", 0, java.lang.Integer.MAX_VALUE, type)); 1238 childrenList.add(new Property("identifier", "Identifier", "A unique identifier for the population criteria. This identifier is used to report data against this criteria within the measure report.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1239 childrenList.add(new Property("name", "string", "Optional name or short description of this population.", 0, java.lang.Integer.MAX_VALUE, name)); 1240 childrenList.add(new Property("description", "string", "The human readable description of this population criteria.", 0, java.lang.Integer.MAX_VALUE, description)); 1241 childrenList.add(new Property("criteria", "string", "The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.", 0, java.lang.Integer.MAX_VALUE, criteria)); 1242 } 1243 1244 @Override 1245 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1246 switch (hash) { 1247 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<MeasurePopulationType> 1248 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 1249 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1250 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1251 case 1952046943: /*criteria*/ return this.criteria == null ? new Base[0] : new Base[] {this.criteria}; // StringType 1252 default: return super.getProperty(hash, name, checkValid); 1253 } 1254 1255 } 1256 1257 @Override 1258 public void setProperty(int hash, String name, Base value) throws FHIRException { 1259 switch (hash) { 1260 case 3575610: // type 1261 this.type = new MeasurePopulationTypeEnumFactory().fromType(value); // Enumeration<MeasurePopulationType> 1262 break; 1263 case -1618432855: // identifier 1264 this.identifier = castToIdentifier(value); // Identifier 1265 break; 1266 case 3373707: // name 1267 this.name = castToString(value); // StringType 1268 break; 1269 case -1724546052: // description 1270 this.description = castToString(value); // StringType 1271 break; 1272 case 1952046943: // criteria 1273 this.criteria = castToString(value); // StringType 1274 break; 1275 default: super.setProperty(hash, name, value); 1276 } 1277 1278 } 1279 1280 @Override 1281 public void setProperty(String name, Base value) throws FHIRException { 1282 if (name.equals("type")) 1283 this.type = new MeasurePopulationTypeEnumFactory().fromType(value); // Enumeration<MeasurePopulationType> 1284 else if (name.equals("identifier")) 1285 this.identifier = castToIdentifier(value); // Identifier 1286 else if (name.equals("name")) 1287 this.name = castToString(value); // StringType 1288 else if (name.equals("description")) 1289 this.description = castToString(value); // StringType 1290 else if (name.equals("criteria")) 1291 this.criteria = castToString(value); // StringType 1292 else 1293 super.setProperty(name, value); 1294 } 1295 1296 @Override 1297 public Base makeProperty(int hash, String name) throws FHIRException { 1298 switch (hash) { 1299 case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<MeasurePopulationType> 1300 case -1618432855: return getIdentifier(); // Identifier 1301 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 1302 case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType 1303 case 1952046943: throw new FHIRException("Cannot make property criteria as it is not a complex type"); // StringType 1304 default: return super.makeProperty(hash, name); 1305 } 1306 1307 } 1308 1309 @Override 1310 public Base addChild(String name) throws FHIRException { 1311 if (name.equals("type")) { 1312 throw new FHIRException("Cannot call addChild on a primitive type Measure.type"); 1313 } 1314 else if (name.equals("identifier")) { 1315 this.identifier = new Identifier(); 1316 return this.identifier; 1317 } 1318 else if (name.equals("name")) { 1319 throw new FHIRException("Cannot call addChild on a primitive type Measure.name"); 1320 } 1321 else if (name.equals("description")) { 1322 throw new FHIRException("Cannot call addChild on a primitive type Measure.description"); 1323 } 1324 else if (name.equals("criteria")) { 1325 throw new FHIRException("Cannot call addChild on a primitive type Measure.criteria"); 1326 } 1327 else 1328 return super.addChild(name); 1329 } 1330 1331 public MeasureGroupPopulationComponent copy() { 1332 MeasureGroupPopulationComponent dst = new MeasureGroupPopulationComponent(); 1333 copyValues(dst); 1334 dst.type = type == null ? null : type.copy(); 1335 dst.identifier = identifier == null ? null : identifier.copy(); 1336 dst.name = name == null ? null : name.copy(); 1337 dst.description = description == null ? null : description.copy(); 1338 dst.criteria = criteria == null ? null : criteria.copy(); 1339 return dst; 1340 } 1341 1342 @Override 1343 public boolean equalsDeep(Base other) { 1344 if (!super.equalsDeep(other)) 1345 return false; 1346 if (!(other instanceof MeasureGroupPopulationComponent)) 1347 return false; 1348 MeasureGroupPopulationComponent o = (MeasureGroupPopulationComponent) other; 1349 return compareDeep(type, o.type, true) && compareDeep(identifier, o.identifier, true) && compareDeep(name, o.name, true) 1350 && compareDeep(description, o.description, true) && compareDeep(criteria, o.criteria, true); 1351 } 1352 1353 @Override 1354 public boolean equalsShallow(Base other) { 1355 if (!super.equalsShallow(other)) 1356 return false; 1357 if (!(other instanceof MeasureGroupPopulationComponent)) 1358 return false; 1359 MeasureGroupPopulationComponent o = (MeasureGroupPopulationComponent) other; 1360 return compareValues(type, o.type, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true) 1361 && compareValues(criteria, o.criteria, true); 1362 } 1363 1364 public boolean isEmpty() { 1365 return super.isEmpty() && (type == null || type.isEmpty()) && (identifier == null || identifier.isEmpty()) 1366 && (name == null || name.isEmpty()) && (description == null || description.isEmpty()) && (criteria == null || criteria.isEmpty()) 1367 ; 1368 } 1369 1370 public String fhirType() { 1371 return "Measure.group.population"; 1372 1373 } 1374 1375 } 1376 1377 @Block() 1378 public static class MeasureGroupStratifierComponent extends BackboneElement implements IBaseBackboneElement { 1379 /** 1380 * The identifier for the stratifier used to coordinate the reported data back to this stratifier. 1381 */ 1382 @Child(name = "identifier", type = {Identifier.class}, order=1, min=1, max=1, modifier=false, summary=true) 1383 @Description(shortDefinition="The identifier for the stratifier used to coordinate the reported data back to this stratifier", formalDefinition="The identifier for the stratifier used to coordinate the reported data back to this stratifier." ) 1384 protected Identifier identifier; 1385 1386 /** 1387 * The criteria for the stratifier. This must be the name of an expression defined within a referenced library. 1388 */ 1389 @Child(name = "criteria", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 1390 @Description(shortDefinition="Stratifier criteria", formalDefinition="The criteria for the stratifier. This must be the name of an expression defined within a referenced library." ) 1391 protected StringType criteria; 1392 1393 /** 1394 * The path to an element that defines the stratifier, specified as a valid FHIR resource path. 1395 */ 1396 @Child(name = "path", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 1397 @Description(shortDefinition="Path to the stratifier", formalDefinition="The path to an element that defines the stratifier, specified as a valid FHIR resource path." ) 1398 protected StringType path; 1399 1400 private static final long serialVersionUID = -196134448L; 1401 1402 /** 1403 * Constructor 1404 */ 1405 public MeasureGroupStratifierComponent() { 1406 super(); 1407 } 1408 1409 /** 1410 * Constructor 1411 */ 1412 public MeasureGroupStratifierComponent(Identifier identifier) { 1413 super(); 1414 this.identifier = identifier; 1415 } 1416 1417 /** 1418 * @return {@link #identifier} (The identifier for the stratifier used to coordinate the reported data back to this stratifier.) 1419 */ 1420 public Identifier getIdentifier() { 1421 if (this.identifier == null) 1422 if (Configuration.errorOnAutoCreate()) 1423 throw new Error("Attempt to auto-create MeasureGroupStratifierComponent.identifier"); 1424 else if (Configuration.doAutoCreate()) 1425 this.identifier = new Identifier(); // cc 1426 return this.identifier; 1427 } 1428 1429 public boolean hasIdentifier() { 1430 return this.identifier != null && !this.identifier.isEmpty(); 1431 } 1432 1433 /** 1434 * @param value {@link #identifier} (The identifier for the stratifier used to coordinate the reported data back to this stratifier.) 1435 */ 1436 public MeasureGroupStratifierComponent setIdentifier(Identifier value) { 1437 this.identifier = value; 1438 return this; 1439 } 1440 1441 /** 1442 * @return {@link #criteria} (The criteria for the stratifier. This must be the name of an expression defined within a referenced library.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value 1443 */ 1444 public StringType getCriteriaElement() { 1445 if (this.criteria == null) 1446 if (Configuration.errorOnAutoCreate()) 1447 throw new Error("Attempt to auto-create MeasureGroupStratifierComponent.criteria"); 1448 else if (Configuration.doAutoCreate()) 1449 this.criteria = new StringType(); // bb 1450 return this.criteria; 1451 } 1452 1453 public boolean hasCriteriaElement() { 1454 return this.criteria != null && !this.criteria.isEmpty(); 1455 } 1456 1457 public boolean hasCriteria() { 1458 return this.criteria != null && !this.criteria.isEmpty(); 1459 } 1460 1461 /** 1462 * @param value {@link #criteria} (The criteria for the stratifier. This must be the name of an expression defined within a referenced library.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value 1463 */ 1464 public MeasureGroupStratifierComponent setCriteriaElement(StringType value) { 1465 this.criteria = value; 1466 return this; 1467 } 1468 1469 /** 1470 * @return The criteria for the stratifier. This must be the name of an expression defined within a referenced library. 1471 */ 1472 public String getCriteria() { 1473 return this.criteria == null ? null : this.criteria.getValue(); 1474 } 1475 1476 /** 1477 * @param value The criteria for the stratifier. This must be the name of an expression defined within a referenced library. 1478 */ 1479 public MeasureGroupStratifierComponent setCriteria(String value) { 1480 if (Utilities.noString(value)) 1481 this.criteria = null; 1482 else { 1483 if (this.criteria == null) 1484 this.criteria = new StringType(); 1485 this.criteria.setValue(value); 1486 } 1487 return this; 1488 } 1489 1490 /** 1491 * @return {@link #path} (The path to an element that defines the stratifier, specified as a valid FHIR resource path.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 1492 */ 1493 public StringType getPathElement() { 1494 if (this.path == null) 1495 if (Configuration.errorOnAutoCreate()) 1496 throw new Error("Attempt to auto-create MeasureGroupStratifierComponent.path"); 1497 else if (Configuration.doAutoCreate()) 1498 this.path = new StringType(); // bb 1499 return this.path; 1500 } 1501 1502 public boolean hasPathElement() { 1503 return this.path != null && !this.path.isEmpty(); 1504 } 1505 1506 public boolean hasPath() { 1507 return this.path != null && !this.path.isEmpty(); 1508 } 1509 1510 /** 1511 * @param value {@link #path} (The path to an element that defines the stratifier, specified as a valid FHIR resource path.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 1512 */ 1513 public MeasureGroupStratifierComponent setPathElement(StringType value) { 1514 this.path = value; 1515 return this; 1516 } 1517 1518 /** 1519 * @return The path to an element that defines the stratifier, specified as a valid FHIR resource path. 1520 */ 1521 public String getPath() { 1522 return this.path == null ? null : this.path.getValue(); 1523 } 1524 1525 /** 1526 * @param value The path to an element that defines the stratifier, specified as a valid FHIR resource path. 1527 */ 1528 public MeasureGroupStratifierComponent setPath(String value) { 1529 if (Utilities.noString(value)) 1530 this.path = null; 1531 else { 1532 if (this.path == null) 1533 this.path = new StringType(); 1534 this.path.setValue(value); 1535 } 1536 return this; 1537 } 1538 1539 protected void listChildren(List<Property> childrenList) { 1540 super.listChildren(childrenList); 1541 childrenList.add(new Property("identifier", "Identifier", "The identifier for the stratifier used to coordinate the reported data back to this stratifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1542 childrenList.add(new Property("criteria", "string", "The criteria for the stratifier. This must be the name of an expression defined within a referenced library.", 0, java.lang.Integer.MAX_VALUE, criteria)); 1543 childrenList.add(new Property("path", "string", "The path to an element that defines the stratifier, specified as a valid FHIR resource path.", 0, java.lang.Integer.MAX_VALUE, path)); 1544 } 1545 1546 @Override 1547 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1548 switch (hash) { 1549 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 1550 case 1952046943: /*criteria*/ return this.criteria == null ? new Base[0] : new Base[] {this.criteria}; // StringType 1551 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 1552 default: return super.getProperty(hash, name, checkValid); 1553 } 1554 1555 } 1556 1557 @Override 1558 public void setProperty(int hash, String name, Base value) throws FHIRException { 1559 switch (hash) { 1560 case -1618432855: // identifier 1561 this.identifier = castToIdentifier(value); // Identifier 1562 break; 1563 case 1952046943: // criteria 1564 this.criteria = castToString(value); // StringType 1565 break; 1566 case 3433509: // path 1567 this.path = castToString(value); // StringType 1568 break; 1569 default: super.setProperty(hash, name, value); 1570 } 1571 1572 } 1573 1574 @Override 1575 public void setProperty(String name, Base value) throws FHIRException { 1576 if (name.equals("identifier")) 1577 this.identifier = castToIdentifier(value); // Identifier 1578 else if (name.equals("criteria")) 1579 this.criteria = castToString(value); // StringType 1580 else if (name.equals("path")) 1581 this.path = castToString(value); // StringType 1582 else 1583 super.setProperty(name, value); 1584 } 1585 1586 @Override 1587 public Base makeProperty(int hash, String name) throws FHIRException { 1588 switch (hash) { 1589 case -1618432855: return getIdentifier(); // Identifier 1590 case 1952046943: throw new FHIRException("Cannot make property criteria as it is not a complex type"); // StringType 1591 case 3433509: throw new FHIRException("Cannot make property path as it is not a complex type"); // StringType 1592 default: return super.makeProperty(hash, name); 1593 } 1594 1595 } 1596 1597 @Override 1598 public Base addChild(String name) throws FHIRException { 1599 if (name.equals("identifier")) { 1600 this.identifier = new Identifier(); 1601 return this.identifier; 1602 } 1603 else if (name.equals("criteria")) { 1604 throw new FHIRException("Cannot call addChild on a primitive type Measure.criteria"); 1605 } 1606 else if (name.equals("path")) { 1607 throw new FHIRException("Cannot call addChild on a primitive type Measure.path"); 1608 } 1609 else 1610 return super.addChild(name); 1611 } 1612 1613 public MeasureGroupStratifierComponent copy() { 1614 MeasureGroupStratifierComponent dst = new MeasureGroupStratifierComponent(); 1615 copyValues(dst); 1616 dst.identifier = identifier == null ? null : identifier.copy(); 1617 dst.criteria = criteria == null ? null : criteria.copy(); 1618 dst.path = path == null ? null : path.copy(); 1619 return dst; 1620 } 1621 1622 @Override 1623 public boolean equalsDeep(Base other) { 1624 if (!super.equalsDeep(other)) 1625 return false; 1626 if (!(other instanceof MeasureGroupStratifierComponent)) 1627 return false; 1628 MeasureGroupStratifierComponent o = (MeasureGroupStratifierComponent) other; 1629 return compareDeep(identifier, o.identifier, true) && compareDeep(criteria, o.criteria, true) && compareDeep(path, o.path, true) 1630 ; 1631 } 1632 1633 @Override 1634 public boolean equalsShallow(Base other) { 1635 if (!super.equalsShallow(other)) 1636 return false; 1637 if (!(other instanceof MeasureGroupStratifierComponent)) 1638 return false; 1639 MeasureGroupStratifierComponent o = (MeasureGroupStratifierComponent) other; 1640 return compareValues(criteria, o.criteria, true) && compareValues(path, o.path, true); 1641 } 1642 1643 public boolean isEmpty() { 1644 return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (criteria == null || criteria.isEmpty()) 1645 && (path == null || path.isEmpty()); 1646 } 1647 1648 public String fhirType() { 1649 return "Measure.group.stratifier"; 1650 1651 } 1652 1653 } 1654 1655 @Block() 1656 public static class MeasureSupplementalDataComponent extends BackboneElement implements IBaseBackboneElement { 1657 /** 1658 * An identifier for the supplemental data. 1659 */ 1660 @Child(name = "identifier", type = {Identifier.class}, order=1, min=1, max=1, modifier=false, summary=true) 1661 @Description(shortDefinition="Identifier, unique within the measure", formalDefinition="An identifier for the supplemental data." ) 1662 protected Identifier identifier; 1663 1664 /** 1665 * An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation. 1666 */ 1667 @Child(name = "usage", type = {CodeType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1668 @Description(shortDefinition="supplemental-data | risk-adjustment-factor", formalDefinition="An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation." ) 1669 protected List<Enumeration<MeasureDataUsage>> usage; 1670 1671 /** 1672 * The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element. 1673 */ 1674 @Child(name = "criteria", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 1675 @Description(shortDefinition="Supplemental data criteria", formalDefinition="The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element." ) 1676 protected StringType criteria; 1677 1678 /** 1679 * The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path. 1680 */ 1681 @Child(name = "path", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 1682 @Description(shortDefinition="Path to the supplemental data element", formalDefinition="The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path." ) 1683 protected StringType path; 1684 1685 private static final long serialVersionUID = 1666728717L; 1686 1687 /** 1688 * Constructor 1689 */ 1690 public MeasureSupplementalDataComponent() { 1691 super(); 1692 } 1693 1694 /** 1695 * Constructor 1696 */ 1697 public MeasureSupplementalDataComponent(Identifier identifier) { 1698 super(); 1699 this.identifier = identifier; 1700 } 1701 1702 /** 1703 * @return {@link #identifier} (An identifier for the supplemental data.) 1704 */ 1705 public Identifier getIdentifier() { 1706 if (this.identifier == null) 1707 if (Configuration.errorOnAutoCreate()) 1708 throw new Error("Attempt to auto-create MeasureSupplementalDataComponent.identifier"); 1709 else if (Configuration.doAutoCreate()) 1710 this.identifier = new Identifier(); // cc 1711 return this.identifier; 1712 } 1713 1714 public boolean hasIdentifier() { 1715 return this.identifier != null && !this.identifier.isEmpty(); 1716 } 1717 1718 /** 1719 * @param value {@link #identifier} (An identifier for the supplemental data.) 1720 */ 1721 public MeasureSupplementalDataComponent setIdentifier(Identifier value) { 1722 this.identifier = value; 1723 return this; 1724 } 1725 1726 /** 1727 * @return {@link #usage} (An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.) 1728 */ 1729 public List<Enumeration<MeasureDataUsage>> getUsage() { 1730 if (this.usage == null) 1731 this.usage = new ArrayList<Enumeration<MeasureDataUsage>>(); 1732 return this.usage; 1733 } 1734 1735 public boolean hasUsage() { 1736 if (this.usage == null) 1737 return false; 1738 for (Enumeration<MeasureDataUsage> item : this.usage) 1739 if (!item.isEmpty()) 1740 return true; 1741 return false; 1742 } 1743 1744 /** 1745 * @return {@link #usage} (An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.) 1746 */ 1747 // syntactic sugar 1748 public Enumeration<MeasureDataUsage> addUsageElement() {//2 1749 Enumeration<MeasureDataUsage> t = new Enumeration<MeasureDataUsage>(new MeasureDataUsageEnumFactory()); 1750 if (this.usage == null) 1751 this.usage = new ArrayList<Enumeration<MeasureDataUsage>>(); 1752 this.usage.add(t); 1753 return t; 1754 } 1755 1756 /** 1757 * @param value {@link #usage} (An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.) 1758 */ 1759 public MeasureSupplementalDataComponent addUsage(MeasureDataUsage value) { //1 1760 Enumeration<MeasureDataUsage> t = new Enumeration<MeasureDataUsage>(new MeasureDataUsageEnumFactory()); 1761 t.setValue(value); 1762 if (this.usage == null) 1763 this.usage = new ArrayList<Enumeration<MeasureDataUsage>>(); 1764 this.usage.add(t); 1765 return this; 1766 } 1767 1768 /** 1769 * @param value {@link #usage} (An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.) 1770 */ 1771 public boolean hasUsage(MeasureDataUsage value) { 1772 if (this.usage == null) 1773 return false; 1774 for (Enumeration<MeasureDataUsage> v : this.usage) 1775 if (v.getValue().equals(value)) // code 1776 return true; 1777 return false; 1778 } 1779 1780 /** 1781 * @return {@link #criteria} (The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value 1782 */ 1783 public StringType getCriteriaElement() { 1784 if (this.criteria == null) 1785 if (Configuration.errorOnAutoCreate()) 1786 throw new Error("Attempt to auto-create MeasureSupplementalDataComponent.criteria"); 1787 else if (Configuration.doAutoCreate()) 1788 this.criteria = new StringType(); // bb 1789 return this.criteria; 1790 } 1791 1792 public boolean hasCriteriaElement() { 1793 return this.criteria != null && !this.criteria.isEmpty(); 1794 } 1795 1796 public boolean hasCriteria() { 1797 return this.criteria != null && !this.criteria.isEmpty(); 1798 } 1799 1800 /** 1801 * @param value {@link #criteria} (The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value 1802 */ 1803 public MeasureSupplementalDataComponent setCriteriaElement(StringType value) { 1804 this.criteria = value; 1805 return this; 1806 } 1807 1808 /** 1809 * @return The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element. 1810 */ 1811 public String getCriteria() { 1812 return this.criteria == null ? null : this.criteria.getValue(); 1813 } 1814 1815 /** 1816 * @param value The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element. 1817 */ 1818 public MeasureSupplementalDataComponent setCriteria(String value) { 1819 if (Utilities.noString(value)) 1820 this.criteria = null; 1821 else { 1822 if (this.criteria == null) 1823 this.criteria = new StringType(); 1824 this.criteria.setValue(value); 1825 } 1826 return this; 1827 } 1828 1829 /** 1830 * @return {@link #path} (The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 1831 */ 1832 public StringType getPathElement() { 1833 if (this.path == null) 1834 if (Configuration.errorOnAutoCreate()) 1835 throw new Error("Attempt to auto-create MeasureSupplementalDataComponent.path"); 1836 else if (Configuration.doAutoCreate()) 1837 this.path = new StringType(); // bb 1838 return this.path; 1839 } 1840 1841 public boolean hasPathElement() { 1842 return this.path != null && !this.path.isEmpty(); 1843 } 1844 1845 public boolean hasPath() { 1846 return this.path != null && !this.path.isEmpty(); 1847 } 1848 1849 /** 1850 * @param value {@link #path} (The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 1851 */ 1852 public MeasureSupplementalDataComponent setPathElement(StringType value) { 1853 this.path = value; 1854 return this; 1855 } 1856 1857 /** 1858 * @return The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path. 1859 */ 1860 public String getPath() { 1861 return this.path == null ? null : this.path.getValue(); 1862 } 1863 1864 /** 1865 * @param value The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path. 1866 */ 1867 public MeasureSupplementalDataComponent setPath(String value) { 1868 if (Utilities.noString(value)) 1869 this.path = null; 1870 else { 1871 if (this.path == null) 1872 this.path = new StringType(); 1873 this.path.setValue(value); 1874 } 1875 return this; 1876 } 1877 1878 protected void listChildren(List<Property> childrenList) { 1879 super.listChildren(childrenList); 1880 childrenList.add(new Property("identifier", "Identifier", "An identifier for the supplemental data.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1881 childrenList.add(new Property("usage", "code", "An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.", 0, java.lang.Integer.MAX_VALUE, usage)); 1882 childrenList.add(new Property("criteria", "string", "The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.", 0, java.lang.Integer.MAX_VALUE, criteria)); 1883 childrenList.add(new Property("path", "string", "The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, path)); 1884 } 1885 1886 @Override 1887 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1888 switch (hash) { 1889 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 1890 case 111574433: /*usage*/ return this.usage == null ? new Base[0] : this.usage.toArray(new Base[this.usage.size()]); // Enumeration<MeasureDataUsage> 1891 case 1952046943: /*criteria*/ return this.criteria == null ? new Base[0] : new Base[] {this.criteria}; // StringType 1892 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 1893 default: return super.getProperty(hash, name, checkValid); 1894 } 1895 1896 } 1897 1898 @Override 1899 public void setProperty(int hash, String name, Base value) throws FHIRException { 1900 switch (hash) { 1901 case -1618432855: // identifier 1902 this.identifier = castToIdentifier(value); // Identifier 1903 break; 1904 case 111574433: // usage 1905 this.getUsage().add(new MeasureDataUsageEnumFactory().fromType(value)); // Enumeration<MeasureDataUsage> 1906 break; 1907 case 1952046943: // criteria 1908 this.criteria = castToString(value); // StringType 1909 break; 1910 case 3433509: // path 1911 this.path = castToString(value); // StringType 1912 break; 1913 default: super.setProperty(hash, name, value); 1914 } 1915 1916 } 1917 1918 @Override 1919 public void setProperty(String name, Base value) throws FHIRException { 1920 if (name.equals("identifier")) 1921 this.identifier = castToIdentifier(value); // Identifier 1922 else if (name.equals("usage")) 1923 this.getUsage().add(new MeasureDataUsageEnumFactory().fromType(value)); 1924 else if (name.equals("criteria")) 1925 this.criteria = castToString(value); // StringType 1926 else if (name.equals("path")) 1927 this.path = castToString(value); // StringType 1928 else 1929 super.setProperty(name, value); 1930 } 1931 1932 @Override 1933 public Base makeProperty(int hash, String name) throws FHIRException { 1934 switch (hash) { 1935 case -1618432855: return getIdentifier(); // Identifier 1936 case 111574433: throw new FHIRException("Cannot make property usage as it is not a complex type"); // Enumeration<MeasureDataUsage> 1937 case 1952046943: throw new FHIRException("Cannot make property criteria as it is not a complex type"); // StringType 1938 case 3433509: throw new FHIRException("Cannot make property path as it is not a complex type"); // StringType 1939 default: return super.makeProperty(hash, name); 1940 } 1941 1942 } 1943 1944 @Override 1945 public Base addChild(String name) throws FHIRException { 1946 if (name.equals("identifier")) { 1947 this.identifier = new Identifier(); 1948 return this.identifier; 1949 } 1950 else if (name.equals("usage")) { 1951 throw new FHIRException("Cannot call addChild on a primitive type Measure.usage"); 1952 } 1953 else if (name.equals("criteria")) { 1954 throw new FHIRException("Cannot call addChild on a primitive type Measure.criteria"); 1955 } 1956 else if (name.equals("path")) { 1957 throw new FHIRException("Cannot call addChild on a primitive type Measure.path"); 1958 } 1959 else 1960 return super.addChild(name); 1961 } 1962 1963 public MeasureSupplementalDataComponent copy() { 1964 MeasureSupplementalDataComponent dst = new MeasureSupplementalDataComponent(); 1965 copyValues(dst); 1966 dst.identifier = identifier == null ? null : identifier.copy(); 1967 if (usage != null) { 1968 dst.usage = new ArrayList<Enumeration<MeasureDataUsage>>(); 1969 for (Enumeration<MeasureDataUsage> i : usage) 1970 dst.usage.add(i.copy()); 1971 }; 1972 dst.criteria = criteria == null ? null : criteria.copy(); 1973 dst.path = path == null ? null : path.copy(); 1974 return dst; 1975 } 1976 1977 @Override 1978 public boolean equalsDeep(Base other) { 1979 if (!super.equalsDeep(other)) 1980 return false; 1981 if (!(other instanceof MeasureSupplementalDataComponent)) 1982 return false; 1983 MeasureSupplementalDataComponent o = (MeasureSupplementalDataComponent) other; 1984 return compareDeep(identifier, o.identifier, true) && compareDeep(usage, o.usage, true) && compareDeep(criteria, o.criteria, true) 1985 && compareDeep(path, o.path, true); 1986 } 1987 1988 @Override 1989 public boolean equalsShallow(Base other) { 1990 if (!super.equalsShallow(other)) 1991 return false; 1992 if (!(other instanceof MeasureSupplementalDataComponent)) 1993 return false; 1994 MeasureSupplementalDataComponent o = (MeasureSupplementalDataComponent) other; 1995 return compareValues(usage, o.usage, true) && compareValues(criteria, o.criteria, true) && compareValues(path, o.path, true) 1996 ; 1997 } 1998 1999 public boolean isEmpty() { 2000 return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (usage == null || usage.isEmpty()) 2001 && (criteria == null || criteria.isEmpty()) && (path == null || path.isEmpty()); 2002 } 2003 2004 public String fhirType() { 2005 return "Measure.supplementalData"; 2006 2007 } 2008 2009 } 2010 2011 /** 2012 * The metadata for the measure, including publishing, life-cycle, version, documentation, and supporting evidence. 2013 */ 2014 @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=0, min=0, max=1, modifier=false, summary=true) 2015 @Description(shortDefinition="Metadata for the measure", formalDefinition="The metadata for the measure, including publishing, life-cycle, version, documentation, and supporting evidence." ) 2016 protected ModuleMetadata moduleMetadata; 2017 2018 /** 2019 * A reference to a Library resource containing the formal logic used by the measure. 2020 */ 2021 @Child(name = "library", type = {Library.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2022 @Description(shortDefinition="Logic used by the measure", formalDefinition="A reference to a Library resource containing the formal logic used by the measure." ) 2023 protected List<Reference> library; 2024 /** 2025 * The actual objects that are the target of the reference (A reference to a Library resource containing the formal logic used by the measure.) 2026 */ 2027 protected List<Library> libraryTarget; 2028 2029 2030 /** 2031 * A disclaimer for the use of the measure. 2032 */ 2033 @Child(name = "disclaimer", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=true) 2034 @Description(shortDefinition="Disclaimer for the measure", formalDefinition="A disclaimer for the use of the measure." ) 2035 protected MarkdownType disclaimer; 2036 2037 /** 2038 * The measure scoring type, e.g. proportion, CV. 2039 */ 2040 @Child(name = "scoring", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=true) 2041 @Description(shortDefinition="proportion | ratio | continuous-variable | cohort", formalDefinition="The measure scoring type, e.g. proportion, CV." ) 2042 protected Enumeration<MeasureScoring> scoring; 2043 2044 /** 2045 * The measure type, e.g. process, outcome. 2046 */ 2047 @Child(name = "type", type = {CodeType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2048 @Description(shortDefinition="process | outcome", formalDefinition="The measure type, e.g. process, outcome." ) 2049 protected List<Enumeration<MeasureType>> type; 2050 2051 /** 2052 * A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results. 2053 */ 2054 @Child(name = "riskAdjustment", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 2055 @Description(shortDefinition="How is risk adjustment applied for this measure", formalDefinition="A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results." ) 2056 protected StringType riskAdjustment; 2057 2058 /** 2059 * A description of the rate aggregation for the measure. 2060 */ 2061 @Child(name = "rateAggregation", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) 2062 @Description(shortDefinition="How is rate aggregation performed for this measure", formalDefinition="A description of the rate aggregation for the measure." ) 2063 protected StringType rateAggregation; 2064 2065 /** 2066 * The rationale for the measure. 2067 */ 2068 @Child(name = "rationale", type = {MarkdownType.class}, order=7, min=0, max=1, modifier=false, summary=true) 2069 @Description(shortDefinition="Why does this measure exist", formalDefinition="The rationale for the measure." ) 2070 protected MarkdownType rationale; 2071 2072 /** 2073 * The clinical recommendation statement for the measure. 2074 */ 2075 @Child(name = "clinicalRecommendationStatement", type = {MarkdownType.class}, order=8, min=0, max=1, modifier=false, summary=true) 2076 @Description(shortDefinition="Clinical recommendation", formalDefinition="The clinical recommendation statement for the measure." ) 2077 protected MarkdownType clinicalRecommendationStatement; 2078 2079 /** 2080 * Improvement notation for the measure, e.g. higher score indicates better quality. 2081 */ 2082 @Child(name = "improvementNotation", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) 2083 @Description(shortDefinition="Improvement notation for the measure, e.g. higher score indicates better quality", formalDefinition="Improvement notation for the measure, e.g. higher score indicates better quality." ) 2084 protected StringType improvementNotation; 2085 2086 /** 2087 * A narrative description of the complete measure calculation. 2088 */ 2089 @Child(name = "definition", type = {MarkdownType.class}, order=10, min=0, max=1, modifier=false, summary=true) 2090 @Description(shortDefinition="A natural language definition of the measure", formalDefinition="A narrative description of the complete measure calculation." ) 2091 protected MarkdownType definition; 2092 2093 /** 2094 * Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure. 2095 */ 2096 @Child(name = "guidance", type = {MarkdownType.class}, order=11, min=0, max=1, modifier=false, summary=true) 2097 @Description(shortDefinition="The guidance for the measure", formalDefinition="Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure." ) 2098 protected MarkdownType guidance; 2099 2100 /** 2101 * The measure set, e.g. Preventive Care and Screening. 2102 */ 2103 @Child(name = "set", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=true) 2104 @Description(shortDefinition="The measure set, e.g. Preventive Care and Screening", formalDefinition="The measure set, e.g. Preventive Care and Screening." ) 2105 protected StringType set; 2106 2107 /** 2108 * A group of population criteria for the measure. 2109 */ 2110 @Child(name = "group", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2111 @Description(shortDefinition="Population criteria group", formalDefinition="A group of population criteria for the measure." ) 2112 protected List<MeasureGroupComponent> group; 2113 2114 /** 2115 * The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path. 2116 */ 2117 @Child(name = "supplementalData", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2118 @Description(shortDefinition="Supplemental data", formalDefinition="The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path." ) 2119 protected List<MeasureSupplementalDataComponent> supplementalData; 2120 2121 private static final long serialVersionUID = -1000974672L; 2122 2123 /** 2124 * Constructor 2125 */ 2126 public Measure() { 2127 super(); 2128 } 2129 2130 /** 2131 * @return {@link #moduleMetadata} (The metadata for the measure, including publishing, life-cycle, version, documentation, and supporting evidence.) 2132 */ 2133 public ModuleMetadata getModuleMetadata() { 2134 if (this.moduleMetadata == null) 2135 if (Configuration.errorOnAutoCreate()) 2136 throw new Error("Attempt to auto-create Measure.moduleMetadata"); 2137 else if (Configuration.doAutoCreate()) 2138 this.moduleMetadata = new ModuleMetadata(); // cc 2139 return this.moduleMetadata; 2140 } 2141 2142 public boolean hasModuleMetadata() { 2143 return this.moduleMetadata != null && !this.moduleMetadata.isEmpty(); 2144 } 2145 2146 /** 2147 * @param value {@link #moduleMetadata} (The metadata for the measure, including publishing, life-cycle, version, documentation, and supporting evidence.) 2148 */ 2149 public Measure setModuleMetadata(ModuleMetadata value) { 2150 this.moduleMetadata = value; 2151 return this; 2152 } 2153 2154 /** 2155 * @return {@link #library} (A reference to a Library resource containing the formal logic used by the measure.) 2156 */ 2157 public List<Reference> getLibrary() { 2158 if (this.library == null) 2159 this.library = new ArrayList<Reference>(); 2160 return this.library; 2161 } 2162 2163 public boolean hasLibrary() { 2164 if (this.library == null) 2165 return false; 2166 for (Reference item : this.library) 2167 if (!item.isEmpty()) 2168 return true; 2169 return false; 2170 } 2171 2172 /** 2173 * @return {@link #library} (A reference to a Library resource containing the formal logic used by the measure.) 2174 */ 2175 // syntactic sugar 2176 public Reference addLibrary() { //3 2177 Reference t = new Reference(); 2178 if (this.library == null) 2179 this.library = new ArrayList<Reference>(); 2180 this.library.add(t); 2181 return t; 2182 } 2183 2184 // syntactic sugar 2185 public Measure addLibrary(Reference t) { //3 2186 if (t == null) 2187 return this; 2188 if (this.library == null) 2189 this.library = new ArrayList<Reference>(); 2190 this.library.add(t); 2191 return this; 2192 } 2193 2194 /** 2195 * @return {@link #library} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A reference to a Library resource containing the formal logic used by the measure.) 2196 */ 2197 public List<Library> getLibraryTarget() { 2198 if (this.libraryTarget == null) 2199 this.libraryTarget = new ArrayList<Library>(); 2200 return this.libraryTarget; 2201 } 2202 2203 // syntactic sugar 2204 /** 2205 * @return {@link #library} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. A reference to a Library resource containing the formal logic used by the measure.) 2206 */ 2207 public Library addLibraryTarget() { 2208 Library r = new Library(); 2209 if (this.libraryTarget == null) 2210 this.libraryTarget = new ArrayList<Library>(); 2211 this.libraryTarget.add(r); 2212 return r; 2213 } 2214 2215 /** 2216 * @return {@link #disclaimer} (A disclaimer for the use of the measure.). This is the underlying object with id, value and extensions. The accessor "getDisclaimer" gives direct access to the value 2217 */ 2218 public MarkdownType getDisclaimerElement() { 2219 if (this.disclaimer == null) 2220 if (Configuration.errorOnAutoCreate()) 2221 throw new Error("Attempt to auto-create Measure.disclaimer"); 2222 else if (Configuration.doAutoCreate()) 2223 this.disclaimer = new MarkdownType(); // bb 2224 return this.disclaimer; 2225 } 2226 2227 public boolean hasDisclaimerElement() { 2228 return this.disclaimer != null && !this.disclaimer.isEmpty(); 2229 } 2230 2231 public boolean hasDisclaimer() { 2232 return this.disclaimer != null && !this.disclaimer.isEmpty(); 2233 } 2234 2235 /** 2236 * @param value {@link #disclaimer} (A disclaimer for the use of the measure.). This is the underlying object with id, value and extensions. The accessor "getDisclaimer" gives direct access to the value 2237 */ 2238 public Measure setDisclaimerElement(MarkdownType value) { 2239 this.disclaimer = value; 2240 return this; 2241 } 2242 2243 /** 2244 * @return A disclaimer for the use of the measure. 2245 */ 2246 public String getDisclaimer() { 2247 return this.disclaimer == null ? null : this.disclaimer.getValue(); 2248 } 2249 2250 /** 2251 * @param value A disclaimer for the use of the measure. 2252 */ 2253 public Measure setDisclaimer(String value) { 2254 if (value == null) 2255 this.disclaimer = null; 2256 else { 2257 if (this.disclaimer == null) 2258 this.disclaimer = new MarkdownType(); 2259 this.disclaimer.setValue(value); 2260 } 2261 return this; 2262 } 2263 2264 /** 2265 * @return {@link #scoring} (The measure scoring type, e.g. proportion, CV.). This is the underlying object with id, value and extensions. The accessor "getScoring" gives direct access to the value 2266 */ 2267 public Enumeration<MeasureScoring> getScoringElement() { 2268 if (this.scoring == null) 2269 if (Configuration.errorOnAutoCreate()) 2270 throw new Error("Attempt to auto-create Measure.scoring"); 2271 else if (Configuration.doAutoCreate()) 2272 this.scoring = new Enumeration<MeasureScoring>(new MeasureScoringEnumFactory()); // bb 2273 return this.scoring; 2274 } 2275 2276 public boolean hasScoringElement() { 2277 return this.scoring != null && !this.scoring.isEmpty(); 2278 } 2279 2280 public boolean hasScoring() { 2281 return this.scoring != null && !this.scoring.isEmpty(); 2282 } 2283 2284 /** 2285 * @param value {@link #scoring} (The measure scoring type, e.g. proportion, CV.). This is the underlying object with id, value and extensions. The accessor "getScoring" gives direct access to the value 2286 */ 2287 public Measure setScoringElement(Enumeration<MeasureScoring> value) { 2288 this.scoring = value; 2289 return this; 2290 } 2291 2292 /** 2293 * @return The measure scoring type, e.g. proportion, CV. 2294 */ 2295 public MeasureScoring getScoring() { 2296 return this.scoring == null ? null : this.scoring.getValue(); 2297 } 2298 2299 /** 2300 * @param value The measure scoring type, e.g. proportion, CV. 2301 */ 2302 public Measure setScoring(MeasureScoring value) { 2303 if (value == null) 2304 this.scoring = null; 2305 else { 2306 if (this.scoring == null) 2307 this.scoring = new Enumeration<MeasureScoring>(new MeasureScoringEnumFactory()); 2308 this.scoring.setValue(value); 2309 } 2310 return this; 2311 } 2312 2313 /** 2314 * @return {@link #type} (The measure type, e.g. process, outcome.) 2315 */ 2316 public List<Enumeration<MeasureType>> getType() { 2317 if (this.type == null) 2318 this.type = new ArrayList<Enumeration<MeasureType>>(); 2319 return this.type; 2320 } 2321 2322 public boolean hasType() { 2323 if (this.type == null) 2324 return false; 2325 for (Enumeration<MeasureType> item : this.type) 2326 if (!item.isEmpty()) 2327 return true; 2328 return false; 2329 } 2330 2331 /** 2332 * @return {@link #type} (The measure type, e.g. process, outcome.) 2333 */ 2334 // syntactic sugar 2335 public Enumeration<MeasureType> addTypeElement() {//2 2336 Enumeration<MeasureType> t = new Enumeration<MeasureType>(new MeasureTypeEnumFactory()); 2337 if (this.type == null) 2338 this.type = new ArrayList<Enumeration<MeasureType>>(); 2339 this.type.add(t); 2340 return t; 2341 } 2342 2343 /** 2344 * @param value {@link #type} (The measure type, e.g. process, outcome.) 2345 */ 2346 public Measure addType(MeasureType value) { //1 2347 Enumeration<MeasureType> t = new Enumeration<MeasureType>(new MeasureTypeEnumFactory()); 2348 t.setValue(value); 2349 if (this.type == null) 2350 this.type = new ArrayList<Enumeration<MeasureType>>(); 2351 this.type.add(t); 2352 return this; 2353 } 2354 2355 /** 2356 * @param value {@link #type} (The measure type, e.g. process, outcome.) 2357 */ 2358 public boolean hasType(MeasureType value) { 2359 if (this.type == null) 2360 return false; 2361 for (Enumeration<MeasureType> v : this.type) 2362 if (v.getValue().equals(value)) // code 2363 return true; 2364 return false; 2365 } 2366 2367 /** 2368 * @return {@link #riskAdjustment} (A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.). This is the underlying object with id, value and extensions. The accessor "getRiskAdjustment" gives direct access to the value 2369 */ 2370 public StringType getRiskAdjustmentElement() { 2371 if (this.riskAdjustment == null) 2372 if (Configuration.errorOnAutoCreate()) 2373 throw new Error("Attempt to auto-create Measure.riskAdjustment"); 2374 else if (Configuration.doAutoCreate()) 2375 this.riskAdjustment = new StringType(); // bb 2376 return this.riskAdjustment; 2377 } 2378 2379 public boolean hasRiskAdjustmentElement() { 2380 return this.riskAdjustment != null && !this.riskAdjustment.isEmpty(); 2381 } 2382 2383 public boolean hasRiskAdjustment() { 2384 return this.riskAdjustment != null && !this.riskAdjustment.isEmpty(); 2385 } 2386 2387 /** 2388 * @param value {@link #riskAdjustment} (A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.). This is the underlying object with id, value and extensions. The accessor "getRiskAdjustment" gives direct access to the value 2389 */ 2390 public Measure setRiskAdjustmentElement(StringType value) { 2391 this.riskAdjustment = value; 2392 return this; 2393 } 2394 2395 /** 2396 * @return A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results. 2397 */ 2398 public String getRiskAdjustment() { 2399 return this.riskAdjustment == null ? null : this.riskAdjustment.getValue(); 2400 } 2401 2402 /** 2403 * @param value A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results. 2404 */ 2405 public Measure setRiskAdjustment(String value) { 2406 if (Utilities.noString(value)) 2407 this.riskAdjustment = null; 2408 else { 2409 if (this.riskAdjustment == null) 2410 this.riskAdjustment = new StringType(); 2411 this.riskAdjustment.setValue(value); 2412 } 2413 return this; 2414 } 2415 2416 /** 2417 * @return {@link #rateAggregation} (A description of the rate aggregation for the measure.). This is the underlying object with id, value and extensions. The accessor "getRateAggregation" gives direct access to the value 2418 */ 2419 public StringType getRateAggregationElement() { 2420 if (this.rateAggregation == null) 2421 if (Configuration.errorOnAutoCreate()) 2422 throw new Error("Attempt to auto-create Measure.rateAggregation"); 2423 else if (Configuration.doAutoCreate()) 2424 this.rateAggregation = new StringType(); // bb 2425 return this.rateAggregation; 2426 } 2427 2428 public boolean hasRateAggregationElement() { 2429 return this.rateAggregation != null && !this.rateAggregation.isEmpty(); 2430 } 2431 2432 public boolean hasRateAggregation() { 2433 return this.rateAggregation != null && !this.rateAggregation.isEmpty(); 2434 } 2435 2436 /** 2437 * @param value {@link #rateAggregation} (A description of the rate aggregation for the measure.). This is the underlying object with id, value and extensions. The accessor "getRateAggregation" gives direct access to the value 2438 */ 2439 public Measure setRateAggregationElement(StringType value) { 2440 this.rateAggregation = value; 2441 return this; 2442 } 2443 2444 /** 2445 * @return A description of the rate aggregation for the measure. 2446 */ 2447 public String getRateAggregation() { 2448 return this.rateAggregation == null ? null : this.rateAggregation.getValue(); 2449 } 2450 2451 /** 2452 * @param value A description of the rate aggregation for the measure. 2453 */ 2454 public Measure setRateAggregation(String value) { 2455 if (Utilities.noString(value)) 2456 this.rateAggregation = null; 2457 else { 2458 if (this.rateAggregation == null) 2459 this.rateAggregation = new StringType(); 2460 this.rateAggregation.setValue(value); 2461 } 2462 return this; 2463 } 2464 2465 /** 2466 * @return {@link #rationale} (The rationale for the measure.). This is the underlying object with id, value and extensions. The accessor "getRationale" gives direct access to the value 2467 */ 2468 public MarkdownType getRationaleElement() { 2469 if (this.rationale == null) 2470 if (Configuration.errorOnAutoCreate()) 2471 throw new Error("Attempt to auto-create Measure.rationale"); 2472 else if (Configuration.doAutoCreate()) 2473 this.rationale = new MarkdownType(); // bb 2474 return this.rationale; 2475 } 2476 2477 public boolean hasRationaleElement() { 2478 return this.rationale != null && !this.rationale.isEmpty(); 2479 } 2480 2481 public boolean hasRationale() { 2482 return this.rationale != null && !this.rationale.isEmpty(); 2483 } 2484 2485 /** 2486 * @param value {@link #rationale} (The rationale for the measure.). This is the underlying object with id, value and extensions. The accessor "getRationale" gives direct access to the value 2487 */ 2488 public Measure setRationaleElement(MarkdownType value) { 2489 this.rationale = value; 2490 return this; 2491 } 2492 2493 /** 2494 * @return The rationale for the measure. 2495 */ 2496 public String getRationale() { 2497 return this.rationale == null ? null : this.rationale.getValue(); 2498 } 2499 2500 /** 2501 * @param value The rationale for the measure. 2502 */ 2503 public Measure setRationale(String value) { 2504 if (value == null) 2505 this.rationale = null; 2506 else { 2507 if (this.rationale == null) 2508 this.rationale = new MarkdownType(); 2509 this.rationale.setValue(value); 2510 } 2511 return this; 2512 } 2513 2514 /** 2515 * @return {@link #clinicalRecommendationStatement} (The clinical recommendation statement for the measure.). This is the underlying object with id, value and extensions. The accessor "getClinicalRecommendationStatement" gives direct access to the value 2516 */ 2517 public MarkdownType getClinicalRecommendationStatementElement() { 2518 if (this.clinicalRecommendationStatement == null) 2519 if (Configuration.errorOnAutoCreate()) 2520 throw new Error("Attempt to auto-create Measure.clinicalRecommendationStatement"); 2521 else if (Configuration.doAutoCreate()) 2522 this.clinicalRecommendationStatement = new MarkdownType(); // bb 2523 return this.clinicalRecommendationStatement; 2524 } 2525 2526 public boolean hasClinicalRecommendationStatementElement() { 2527 return this.clinicalRecommendationStatement != null && !this.clinicalRecommendationStatement.isEmpty(); 2528 } 2529 2530 public boolean hasClinicalRecommendationStatement() { 2531 return this.clinicalRecommendationStatement != null && !this.clinicalRecommendationStatement.isEmpty(); 2532 } 2533 2534 /** 2535 * @param value {@link #clinicalRecommendationStatement} (The clinical recommendation statement for the measure.). This is the underlying object with id, value and extensions. The accessor "getClinicalRecommendationStatement" gives direct access to the value 2536 */ 2537 public Measure setClinicalRecommendationStatementElement(MarkdownType value) { 2538 this.clinicalRecommendationStatement = value; 2539 return this; 2540 } 2541 2542 /** 2543 * @return The clinical recommendation statement for the measure. 2544 */ 2545 public String getClinicalRecommendationStatement() { 2546 return this.clinicalRecommendationStatement == null ? null : this.clinicalRecommendationStatement.getValue(); 2547 } 2548 2549 /** 2550 * @param value The clinical recommendation statement for the measure. 2551 */ 2552 public Measure setClinicalRecommendationStatement(String value) { 2553 if (value == null) 2554 this.clinicalRecommendationStatement = null; 2555 else { 2556 if (this.clinicalRecommendationStatement == null) 2557 this.clinicalRecommendationStatement = new MarkdownType(); 2558 this.clinicalRecommendationStatement.setValue(value); 2559 } 2560 return this; 2561 } 2562 2563 /** 2564 * @return {@link #improvementNotation} (Improvement notation for the measure, e.g. higher score indicates better quality.). This is the underlying object with id, value and extensions. The accessor "getImprovementNotation" gives direct access to the value 2565 */ 2566 public StringType getImprovementNotationElement() { 2567 if (this.improvementNotation == null) 2568 if (Configuration.errorOnAutoCreate()) 2569 throw new Error("Attempt to auto-create Measure.improvementNotation"); 2570 else if (Configuration.doAutoCreate()) 2571 this.improvementNotation = new StringType(); // bb 2572 return this.improvementNotation; 2573 } 2574 2575 public boolean hasImprovementNotationElement() { 2576 return this.improvementNotation != null && !this.improvementNotation.isEmpty(); 2577 } 2578 2579 public boolean hasImprovementNotation() { 2580 return this.improvementNotation != null && !this.improvementNotation.isEmpty(); 2581 } 2582 2583 /** 2584 * @param value {@link #improvementNotation} (Improvement notation for the measure, e.g. higher score indicates better quality.). This is the underlying object with id, value and extensions. The accessor "getImprovementNotation" gives direct access to the value 2585 */ 2586 public Measure setImprovementNotationElement(StringType value) { 2587 this.improvementNotation = value; 2588 return this; 2589 } 2590 2591 /** 2592 * @return Improvement notation for the measure, e.g. higher score indicates better quality. 2593 */ 2594 public String getImprovementNotation() { 2595 return this.improvementNotation == null ? null : this.improvementNotation.getValue(); 2596 } 2597 2598 /** 2599 * @param value Improvement notation for the measure, e.g. higher score indicates better quality. 2600 */ 2601 public Measure setImprovementNotation(String value) { 2602 if (Utilities.noString(value)) 2603 this.improvementNotation = null; 2604 else { 2605 if (this.improvementNotation == null) 2606 this.improvementNotation = new StringType(); 2607 this.improvementNotation.setValue(value); 2608 } 2609 return this; 2610 } 2611 2612 /** 2613 * @return {@link #definition} (A narrative description of the complete measure calculation.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value 2614 */ 2615 public MarkdownType getDefinitionElement() { 2616 if (this.definition == null) 2617 if (Configuration.errorOnAutoCreate()) 2618 throw new Error("Attempt to auto-create Measure.definition"); 2619 else if (Configuration.doAutoCreate()) 2620 this.definition = new MarkdownType(); // bb 2621 return this.definition; 2622 } 2623 2624 public boolean hasDefinitionElement() { 2625 return this.definition != null && !this.definition.isEmpty(); 2626 } 2627 2628 public boolean hasDefinition() { 2629 return this.definition != null && !this.definition.isEmpty(); 2630 } 2631 2632 /** 2633 * @param value {@link #definition} (A narrative description of the complete measure calculation.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value 2634 */ 2635 public Measure setDefinitionElement(MarkdownType value) { 2636 this.definition = value; 2637 return this; 2638 } 2639 2640 /** 2641 * @return A narrative description of the complete measure calculation. 2642 */ 2643 public String getDefinition() { 2644 return this.definition == null ? null : this.definition.getValue(); 2645 } 2646 2647 /** 2648 * @param value A narrative description of the complete measure calculation. 2649 */ 2650 public Measure setDefinition(String value) { 2651 if (value == null) 2652 this.definition = null; 2653 else { 2654 if (this.definition == null) 2655 this.definition = new MarkdownType(); 2656 this.definition.setValue(value); 2657 } 2658 return this; 2659 } 2660 2661 /** 2662 * @return {@link #guidance} (Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.). This is the underlying object with id, value and extensions. The accessor "getGuidance" gives direct access to the value 2663 */ 2664 public MarkdownType getGuidanceElement() { 2665 if (this.guidance == null) 2666 if (Configuration.errorOnAutoCreate()) 2667 throw new Error("Attempt to auto-create Measure.guidance"); 2668 else if (Configuration.doAutoCreate()) 2669 this.guidance = new MarkdownType(); // bb 2670 return this.guidance; 2671 } 2672 2673 public boolean hasGuidanceElement() { 2674 return this.guidance != null && !this.guidance.isEmpty(); 2675 } 2676 2677 public boolean hasGuidance() { 2678 return this.guidance != null && !this.guidance.isEmpty(); 2679 } 2680 2681 /** 2682 * @param value {@link #guidance} (Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.). This is the underlying object with id, value and extensions. The accessor "getGuidance" gives direct access to the value 2683 */ 2684 public Measure setGuidanceElement(MarkdownType value) { 2685 this.guidance = value; 2686 return this; 2687 } 2688 2689 /** 2690 * @return Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure. 2691 */ 2692 public String getGuidance() { 2693 return this.guidance == null ? null : this.guidance.getValue(); 2694 } 2695 2696 /** 2697 * @param value Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure. 2698 */ 2699 public Measure setGuidance(String value) { 2700 if (value == null) 2701 this.guidance = null; 2702 else { 2703 if (this.guidance == null) 2704 this.guidance = new MarkdownType(); 2705 this.guidance.setValue(value); 2706 } 2707 return this; 2708 } 2709 2710 /** 2711 * @return {@link #set} (The measure set, e.g. Preventive Care and Screening.). This is the underlying object with id, value and extensions. The accessor "getSet" gives direct access to the value 2712 */ 2713 public StringType getSetElement() { 2714 if (this.set == null) 2715 if (Configuration.errorOnAutoCreate()) 2716 throw new Error("Attempt to auto-create Measure.set"); 2717 else if (Configuration.doAutoCreate()) 2718 this.set = new StringType(); // bb 2719 return this.set; 2720 } 2721 2722 public boolean hasSetElement() { 2723 return this.set != null && !this.set.isEmpty(); 2724 } 2725 2726 public boolean hasSet() { 2727 return this.set != null && !this.set.isEmpty(); 2728 } 2729 2730 /** 2731 * @param value {@link #set} (The measure set, e.g. Preventive Care and Screening.). This is the underlying object with id, value and extensions. The accessor "getSet" gives direct access to the value 2732 */ 2733 public Measure setSetElement(StringType value) { 2734 this.set = value; 2735 return this; 2736 } 2737 2738 /** 2739 * @return The measure set, e.g. Preventive Care and Screening. 2740 */ 2741 public String getSet() { 2742 return this.set == null ? null : this.set.getValue(); 2743 } 2744 2745 /** 2746 * @param value The measure set, e.g. Preventive Care and Screening. 2747 */ 2748 public Measure setSet(String value) { 2749 if (Utilities.noString(value)) 2750 this.set = null; 2751 else { 2752 if (this.set == null) 2753 this.set = new StringType(); 2754 this.set.setValue(value); 2755 } 2756 return this; 2757 } 2758 2759 /** 2760 * @return {@link #group} (A group of population criteria for the measure.) 2761 */ 2762 public List<MeasureGroupComponent> getGroup() { 2763 if (this.group == null) 2764 this.group = new ArrayList<MeasureGroupComponent>(); 2765 return this.group; 2766 } 2767 2768 public boolean hasGroup() { 2769 if (this.group == null) 2770 return false; 2771 for (MeasureGroupComponent item : this.group) 2772 if (!item.isEmpty()) 2773 return true; 2774 return false; 2775 } 2776 2777 /** 2778 * @return {@link #group} (A group of population criteria for the measure.) 2779 */ 2780 // syntactic sugar 2781 public MeasureGroupComponent addGroup() { //3 2782 MeasureGroupComponent t = new MeasureGroupComponent(); 2783 if (this.group == null) 2784 this.group = new ArrayList<MeasureGroupComponent>(); 2785 this.group.add(t); 2786 return t; 2787 } 2788 2789 // syntactic sugar 2790 public Measure addGroup(MeasureGroupComponent t) { //3 2791 if (t == null) 2792 return this; 2793 if (this.group == null) 2794 this.group = new ArrayList<MeasureGroupComponent>(); 2795 this.group.add(t); 2796 return this; 2797 } 2798 2799 /** 2800 * @return {@link #supplementalData} (The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.) 2801 */ 2802 public List<MeasureSupplementalDataComponent> getSupplementalData() { 2803 if (this.supplementalData == null) 2804 this.supplementalData = new ArrayList<MeasureSupplementalDataComponent>(); 2805 return this.supplementalData; 2806 } 2807 2808 public boolean hasSupplementalData() { 2809 if (this.supplementalData == null) 2810 return false; 2811 for (MeasureSupplementalDataComponent item : this.supplementalData) 2812 if (!item.isEmpty()) 2813 return true; 2814 return false; 2815 } 2816 2817 /** 2818 * @return {@link #supplementalData} (The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.) 2819 */ 2820 // syntactic sugar 2821 public MeasureSupplementalDataComponent addSupplementalData() { //3 2822 MeasureSupplementalDataComponent t = new MeasureSupplementalDataComponent(); 2823 if (this.supplementalData == null) 2824 this.supplementalData = new ArrayList<MeasureSupplementalDataComponent>(); 2825 this.supplementalData.add(t); 2826 return t; 2827 } 2828 2829 // syntactic sugar 2830 public Measure addSupplementalData(MeasureSupplementalDataComponent t) { //3 2831 if (t == null) 2832 return this; 2833 if (this.supplementalData == null) 2834 this.supplementalData = new ArrayList<MeasureSupplementalDataComponent>(); 2835 this.supplementalData.add(t); 2836 return this; 2837 } 2838 2839 protected void listChildren(List<Property> childrenList) { 2840 super.listChildren(childrenList); 2841 childrenList.add(new Property("moduleMetadata", "ModuleMetadata", "The metadata for the measure, including publishing, life-cycle, version, documentation, and supporting evidence.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); 2842 childrenList.add(new Property("library", "Reference(Library)", "A reference to a Library resource containing the formal logic used by the measure.", 0, java.lang.Integer.MAX_VALUE, library)); 2843 childrenList.add(new Property("disclaimer", "markdown", "A disclaimer for the use of the measure.", 0, java.lang.Integer.MAX_VALUE, disclaimer)); 2844 childrenList.add(new Property("scoring", "code", "The measure scoring type, e.g. proportion, CV.", 0, java.lang.Integer.MAX_VALUE, scoring)); 2845 childrenList.add(new Property("type", "code", "The measure type, e.g. process, outcome.", 0, java.lang.Integer.MAX_VALUE, type)); 2846 childrenList.add(new Property("riskAdjustment", "string", "A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.", 0, java.lang.Integer.MAX_VALUE, riskAdjustment)); 2847 childrenList.add(new Property("rateAggregation", "string", "A description of the rate aggregation for the measure.", 0, java.lang.Integer.MAX_VALUE, rateAggregation)); 2848 childrenList.add(new Property("rationale", "markdown", "The rationale for the measure.", 0, java.lang.Integer.MAX_VALUE, rationale)); 2849 childrenList.add(new Property("clinicalRecommendationStatement", "markdown", "The clinical recommendation statement for the measure.", 0, java.lang.Integer.MAX_VALUE, clinicalRecommendationStatement)); 2850 childrenList.add(new Property("improvementNotation", "string", "Improvement notation for the measure, e.g. higher score indicates better quality.", 0, java.lang.Integer.MAX_VALUE, improvementNotation)); 2851 childrenList.add(new Property("definition", "markdown", "A narrative description of the complete measure calculation.", 0, java.lang.Integer.MAX_VALUE, definition)); 2852 childrenList.add(new Property("guidance", "markdown", "Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.", 0, java.lang.Integer.MAX_VALUE, guidance)); 2853 childrenList.add(new Property("set", "string", "The measure set, e.g. Preventive Care and Screening.", 0, java.lang.Integer.MAX_VALUE, set)); 2854 childrenList.add(new Property("group", "", "A group of population criteria for the measure.", 0, java.lang.Integer.MAX_VALUE, group)); 2855 childrenList.add(new Property("supplementalData", "", "The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, supplementalData)); 2856 } 2857 2858 @Override 2859 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2860 switch (hash) { 2861 case 455891387: /*moduleMetadata*/ return this.moduleMetadata == null ? new Base[0] : new Base[] {this.moduleMetadata}; // ModuleMetadata 2862 case 166208699: /*library*/ return this.library == null ? new Base[0] : this.library.toArray(new Base[this.library.size()]); // Reference 2863 case 432371099: /*disclaimer*/ return this.disclaimer == null ? new Base[0] : new Base[] {this.disclaimer}; // MarkdownType 2864 case 1924005583: /*scoring*/ return this.scoring == null ? new Base[0] : new Base[] {this.scoring}; // Enumeration<MeasureScoring> 2865 case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // Enumeration<MeasureType> 2866 case 93273500: /*riskAdjustment*/ return this.riskAdjustment == null ? new Base[0] : new Base[] {this.riskAdjustment}; // StringType 2867 case 1254503906: /*rateAggregation*/ return this.rateAggregation == null ? new Base[0] : new Base[] {this.rateAggregation}; // StringType 2868 case 345689335: /*rationale*/ return this.rationale == null ? new Base[0] : new Base[] {this.rationale}; // MarkdownType 2869 case -18631389: /*clinicalRecommendationStatement*/ return this.clinicalRecommendationStatement == null ? new Base[0] : new Base[] {this.clinicalRecommendationStatement}; // MarkdownType 2870 case -2085456136: /*improvementNotation*/ return this.improvementNotation == null ? new Base[0] : new Base[] {this.improvementNotation}; // StringType 2871 case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // MarkdownType 2872 case -1314002088: /*guidance*/ return this.guidance == null ? new Base[0] : new Base[] {this.guidance}; // MarkdownType 2873 case 113762: /*set*/ return this.set == null ? new Base[0] : new Base[] {this.set}; // StringType 2874 case 98629247: /*group*/ return this.group == null ? new Base[0] : this.group.toArray(new Base[this.group.size()]); // MeasureGroupComponent 2875 case 1447496814: /*supplementalData*/ return this.supplementalData == null ? new Base[0] : this.supplementalData.toArray(new Base[this.supplementalData.size()]); // MeasureSupplementalDataComponent 2876 default: return super.getProperty(hash, name, checkValid); 2877 } 2878 2879 } 2880 2881 @Override 2882 public void setProperty(int hash, String name, Base value) throws FHIRException { 2883 switch (hash) { 2884 case 455891387: // moduleMetadata 2885 this.moduleMetadata = castToModuleMetadata(value); // ModuleMetadata 2886 break; 2887 case 166208699: // library 2888 this.getLibrary().add(castToReference(value)); // Reference 2889 break; 2890 case 432371099: // disclaimer 2891 this.disclaimer = castToMarkdown(value); // MarkdownType 2892 break; 2893 case 1924005583: // scoring 2894 this.scoring = new MeasureScoringEnumFactory().fromType(value); // Enumeration<MeasureScoring> 2895 break; 2896 case 3575610: // type 2897 this.getType().add(new MeasureTypeEnumFactory().fromType(value)); // Enumeration<MeasureType> 2898 break; 2899 case 93273500: // riskAdjustment 2900 this.riskAdjustment = castToString(value); // StringType 2901 break; 2902 case 1254503906: // rateAggregation 2903 this.rateAggregation = castToString(value); // StringType 2904 break; 2905 case 345689335: // rationale 2906 this.rationale = castToMarkdown(value); // MarkdownType 2907 break; 2908 case -18631389: // clinicalRecommendationStatement 2909 this.clinicalRecommendationStatement = castToMarkdown(value); // MarkdownType 2910 break; 2911 case -2085456136: // improvementNotation 2912 this.improvementNotation = castToString(value); // StringType 2913 break; 2914 case -1014418093: // definition 2915 this.definition = castToMarkdown(value); // MarkdownType 2916 break; 2917 case -1314002088: // guidance 2918 this.guidance = castToMarkdown(value); // MarkdownType 2919 break; 2920 case 113762: // set 2921 this.set = castToString(value); // StringType 2922 break; 2923 case 98629247: // group 2924 this.getGroup().add((MeasureGroupComponent) value); // MeasureGroupComponent 2925 break; 2926 case 1447496814: // supplementalData 2927 this.getSupplementalData().add((MeasureSupplementalDataComponent) value); // MeasureSupplementalDataComponent 2928 break; 2929 default: super.setProperty(hash, name, value); 2930 } 2931 2932 } 2933 2934 @Override 2935 public void setProperty(String name, Base value) throws FHIRException { 2936 if (name.equals("moduleMetadata")) 2937 this.moduleMetadata = castToModuleMetadata(value); // ModuleMetadata 2938 else if (name.equals("library")) 2939 this.getLibrary().add(castToReference(value)); 2940 else if (name.equals("disclaimer")) 2941 this.disclaimer = castToMarkdown(value); // MarkdownType 2942 else if (name.equals("scoring")) 2943 this.scoring = new MeasureScoringEnumFactory().fromType(value); // Enumeration<MeasureScoring> 2944 else if (name.equals("type")) 2945 this.getType().add(new MeasureTypeEnumFactory().fromType(value)); 2946 else if (name.equals("riskAdjustment")) 2947 this.riskAdjustment = castToString(value); // StringType 2948 else if (name.equals("rateAggregation")) 2949 this.rateAggregation = castToString(value); // StringType 2950 else if (name.equals("rationale")) 2951 this.rationale = castToMarkdown(value); // MarkdownType 2952 else if (name.equals("clinicalRecommendationStatement")) 2953 this.clinicalRecommendationStatement = castToMarkdown(value); // MarkdownType 2954 else if (name.equals("improvementNotation")) 2955 this.improvementNotation = castToString(value); // StringType 2956 else if (name.equals("definition")) 2957 this.definition = castToMarkdown(value); // MarkdownType 2958 else if (name.equals("guidance")) 2959 this.guidance = castToMarkdown(value); // MarkdownType 2960 else if (name.equals("set")) 2961 this.set = castToString(value); // StringType 2962 else if (name.equals("group")) 2963 this.getGroup().add((MeasureGroupComponent) value); 2964 else if (name.equals("supplementalData")) 2965 this.getSupplementalData().add((MeasureSupplementalDataComponent) value); 2966 else 2967 super.setProperty(name, value); 2968 } 2969 2970 @Override 2971 public Base makeProperty(int hash, String name) throws FHIRException { 2972 switch (hash) { 2973 case 455891387: return getModuleMetadata(); // ModuleMetadata 2974 case 166208699: return addLibrary(); // Reference 2975 case 432371099: throw new FHIRException("Cannot make property disclaimer as it is not a complex type"); // MarkdownType 2976 case 1924005583: throw new FHIRException("Cannot make property scoring as it is not a complex type"); // Enumeration<MeasureScoring> 2977 case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<MeasureType> 2978 case 93273500: throw new FHIRException("Cannot make property riskAdjustment as it is not a complex type"); // StringType 2979 case 1254503906: throw new FHIRException("Cannot make property rateAggregation as it is not a complex type"); // StringType 2980 case 345689335: throw new FHIRException("Cannot make property rationale as it is not a complex type"); // MarkdownType 2981 case -18631389: throw new FHIRException("Cannot make property clinicalRecommendationStatement as it is not a complex type"); // MarkdownType 2982 case -2085456136: throw new FHIRException("Cannot make property improvementNotation as it is not a complex type"); // StringType 2983 case -1014418093: throw new FHIRException("Cannot make property definition as it is not a complex type"); // MarkdownType 2984 case -1314002088: throw new FHIRException("Cannot make property guidance as it is not a complex type"); // MarkdownType 2985 case 113762: throw new FHIRException("Cannot make property set as it is not a complex type"); // StringType 2986 case 98629247: return addGroup(); // MeasureGroupComponent 2987 case 1447496814: return addSupplementalData(); // MeasureSupplementalDataComponent 2988 default: return super.makeProperty(hash, name); 2989 } 2990 2991 } 2992 2993 @Override 2994 public Base addChild(String name) throws FHIRException { 2995 if (name.equals("moduleMetadata")) { 2996 this.moduleMetadata = new ModuleMetadata(); 2997 return this.moduleMetadata; 2998 } 2999 else if (name.equals("library")) { 3000 return addLibrary(); 3001 } 3002 else if (name.equals("disclaimer")) { 3003 throw new FHIRException("Cannot call addChild on a primitive type Measure.disclaimer"); 3004 } 3005 else if (name.equals("scoring")) { 3006 throw new FHIRException("Cannot call addChild on a primitive type Measure.scoring"); 3007 } 3008 else if (name.equals("type")) { 3009 throw new FHIRException("Cannot call addChild on a primitive type Measure.type"); 3010 } 3011 else if (name.equals("riskAdjustment")) { 3012 throw new FHIRException("Cannot call addChild on a primitive type Measure.riskAdjustment"); 3013 } 3014 else if (name.equals("rateAggregation")) { 3015 throw new FHIRException("Cannot call addChild on a primitive type Measure.rateAggregation"); 3016 } 3017 else if (name.equals("rationale")) { 3018 throw new FHIRException("Cannot call addChild on a primitive type Measure.rationale"); 3019 } 3020 else if (name.equals("clinicalRecommendationStatement")) { 3021 throw new FHIRException("Cannot call addChild on a primitive type Measure.clinicalRecommendationStatement"); 3022 } 3023 else if (name.equals("improvementNotation")) { 3024 throw new FHIRException("Cannot call addChild on a primitive type Measure.improvementNotation"); 3025 } 3026 else if (name.equals("definition")) { 3027 throw new FHIRException("Cannot call addChild on a primitive type Measure.definition"); 3028 } 3029 else if (name.equals("guidance")) { 3030 throw new FHIRException("Cannot call addChild on a primitive type Measure.guidance"); 3031 } 3032 else if (name.equals("set")) { 3033 throw new FHIRException("Cannot call addChild on a primitive type Measure.set"); 3034 } 3035 else if (name.equals("group")) { 3036 return addGroup(); 3037 } 3038 else if (name.equals("supplementalData")) { 3039 return addSupplementalData(); 3040 } 3041 else 3042 return super.addChild(name); 3043 } 3044 3045 public String fhirType() { 3046 return "Measure"; 3047 3048 } 3049 3050 public Measure copy() { 3051 Measure dst = new Measure(); 3052 copyValues(dst); 3053 dst.moduleMetadata = moduleMetadata == null ? null : moduleMetadata.copy(); 3054 if (library != null) { 3055 dst.library = new ArrayList<Reference>(); 3056 for (Reference i : library) 3057 dst.library.add(i.copy()); 3058 }; 3059 dst.disclaimer = disclaimer == null ? null : disclaimer.copy(); 3060 dst.scoring = scoring == null ? null : scoring.copy(); 3061 if (type != null) { 3062 dst.type = new ArrayList<Enumeration<MeasureType>>(); 3063 for (Enumeration<MeasureType> i : type) 3064 dst.type.add(i.copy()); 3065 }; 3066 dst.riskAdjustment = riskAdjustment == null ? null : riskAdjustment.copy(); 3067 dst.rateAggregation = rateAggregation == null ? null : rateAggregation.copy(); 3068 dst.rationale = rationale == null ? null : rationale.copy(); 3069 dst.clinicalRecommendationStatement = clinicalRecommendationStatement == null ? null : clinicalRecommendationStatement.copy(); 3070 dst.improvementNotation = improvementNotation == null ? null : improvementNotation.copy(); 3071 dst.definition = definition == null ? null : definition.copy(); 3072 dst.guidance = guidance == null ? null : guidance.copy(); 3073 dst.set = set == null ? null : set.copy(); 3074 if (group != null) { 3075 dst.group = new ArrayList<MeasureGroupComponent>(); 3076 for (MeasureGroupComponent i : group) 3077 dst.group.add(i.copy()); 3078 }; 3079 if (supplementalData != null) { 3080 dst.supplementalData = new ArrayList<MeasureSupplementalDataComponent>(); 3081 for (MeasureSupplementalDataComponent i : supplementalData) 3082 dst.supplementalData.add(i.copy()); 3083 }; 3084 return dst; 3085 } 3086 3087 protected Measure typedCopy() { 3088 return copy(); 3089 } 3090 3091 @Override 3092 public boolean equalsDeep(Base other) { 3093 if (!super.equalsDeep(other)) 3094 return false; 3095 if (!(other instanceof Measure)) 3096 return false; 3097 Measure o = (Measure) other; 3098 return compareDeep(moduleMetadata, o.moduleMetadata, true) && compareDeep(library, o.library, true) 3099 && compareDeep(disclaimer, o.disclaimer, true) && compareDeep(scoring, o.scoring, true) && compareDeep(type, o.type, true) 3100 && compareDeep(riskAdjustment, o.riskAdjustment, true) && compareDeep(rateAggregation, o.rateAggregation, true) 3101 && compareDeep(rationale, o.rationale, true) && compareDeep(clinicalRecommendationStatement, o.clinicalRecommendationStatement, true) 3102 && compareDeep(improvementNotation, o.improvementNotation, true) && compareDeep(definition, o.definition, true) 3103 && compareDeep(guidance, o.guidance, true) && compareDeep(set, o.set, true) && compareDeep(group, o.group, true) 3104 && compareDeep(supplementalData, o.supplementalData, true); 3105 } 3106 3107 @Override 3108 public boolean equalsShallow(Base other) { 3109 if (!super.equalsShallow(other)) 3110 return false; 3111 if (!(other instanceof Measure)) 3112 return false; 3113 Measure o = (Measure) other; 3114 return compareValues(disclaimer, o.disclaimer, true) && compareValues(scoring, o.scoring, true) && compareValues(type, o.type, true) 3115 && compareValues(riskAdjustment, o.riskAdjustment, true) && compareValues(rateAggregation, o.rateAggregation, true) 3116 && compareValues(rationale, o.rationale, true) && compareValues(clinicalRecommendationStatement, o.clinicalRecommendationStatement, true) 3117 && compareValues(improvementNotation, o.improvementNotation, true) && compareValues(definition, o.definition, true) 3118 && compareValues(guidance, o.guidance, true) && compareValues(set, o.set, true); 3119 } 3120 3121 public boolean isEmpty() { 3122 return super.isEmpty() && (moduleMetadata == null || moduleMetadata.isEmpty()) && (library == null || library.isEmpty()) 3123 && (disclaimer == null || disclaimer.isEmpty()) && (scoring == null || scoring.isEmpty()) 3124 && (type == null || type.isEmpty()) && (riskAdjustment == null || riskAdjustment.isEmpty()) 3125 && (rateAggregation == null || rateAggregation.isEmpty()) && (rationale == null || rationale.isEmpty()) 3126 && (clinicalRecommendationStatement == null || clinicalRecommendationStatement.isEmpty()) 3127 && (improvementNotation == null || improvementNotation.isEmpty()) && (definition == null || definition.isEmpty()) 3128 && (guidance == null || guidance.isEmpty()) && (set == null || set.isEmpty()) && (group == null || group.isEmpty()) 3129 && (supplementalData == null || supplementalData.isEmpty()); 3130 } 3131 3132 @Override 3133 public ResourceType getResourceType() { 3134 return ResourceType.Measure; 3135 } 3136 3137 /** 3138 * Search parameter: <b>topic</b> 3139 * <p> 3140 * Description: <b>Topics associated with the module</b><br> 3141 * Type: <b>token</b><br> 3142 * Path: <b>Measure.moduleMetadata.topic</b><br> 3143 * </p> 3144 */ 3145 @SearchParamDefinition(name="topic", path="Measure.moduleMetadata.topic", description="Topics associated with the module", type="token" ) 3146 public static final String SP_TOPIC = "topic"; 3147 /** 3148 * <b>Fluent Client</b> search parameter constant for <b>topic</b> 3149 * <p> 3150 * Description: <b>Topics associated with the module</b><br> 3151 * Type: <b>token</b><br> 3152 * Path: <b>Measure.moduleMetadata.topic</b><br> 3153 * </p> 3154 */ 3155 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC); 3156 3157 /** 3158 * Search parameter: <b>title</b> 3159 * <p> 3160 * Description: <b>Text search against the title</b><br> 3161 * Type: <b>string</b><br> 3162 * Path: <b>Measure.moduleMetadata.title</b><br> 3163 * </p> 3164 */ 3165 @SearchParamDefinition(name="title", path="Measure.moduleMetadata.title", description="Text search against the title", type="string" ) 3166 public static final String SP_TITLE = "title"; 3167 /** 3168 * <b>Fluent Client</b> search parameter constant for <b>title</b> 3169 * <p> 3170 * Description: <b>Text search against the title</b><br> 3171 * Type: <b>string</b><br> 3172 * Path: <b>Measure.moduleMetadata.title</b><br> 3173 * </p> 3174 */ 3175 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); 3176 3177 /** 3178 * Search parameter: <b>status</b> 3179 * <p> 3180 * Description: <b>Status of the module</b><br> 3181 * Type: <b>token</b><br> 3182 * Path: <b>Measure.moduleMetadata.status</b><br> 3183 * </p> 3184 */ 3185 @SearchParamDefinition(name="status", path="Measure.moduleMetadata.status", description="Status of the module", type="token" ) 3186 public static final String SP_STATUS = "status"; 3187 /** 3188 * <b>Fluent Client</b> search parameter constant for <b>status</b> 3189 * <p> 3190 * Description: <b>Status of the module</b><br> 3191 * Type: <b>token</b><br> 3192 * Path: <b>Measure.moduleMetadata.status</b><br> 3193 * </p> 3194 */ 3195 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 3196 3197 /** 3198 * Search parameter: <b>description</b> 3199 * <p> 3200 * Description: <b>Text search against the description</b><br> 3201 * Type: <b>string</b><br> 3202 * Path: <b>Measure.moduleMetadata.description</b><br> 3203 * </p> 3204 */ 3205 @SearchParamDefinition(name="description", path="Measure.moduleMetadata.description", description="Text search against the description", type="string" ) 3206 public static final String SP_DESCRIPTION = "description"; 3207 /** 3208 * <b>Fluent Client</b> search parameter constant for <b>description</b> 3209 * <p> 3210 * Description: <b>Text search against the description</b><br> 3211 * Type: <b>string</b><br> 3212 * Path: <b>Measure.moduleMetadata.description</b><br> 3213 * </p> 3214 */ 3215 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 3216 3217 /** 3218 * Search parameter: <b>identifier</b> 3219 * <p> 3220 * Description: <b>Logical identifier for the module (e.g. CMS-143)</b><br> 3221 * Type: <b>token</b><br> 3222 * Path: <b>Measure.moduleMetadata.identifier</b><br> 3223 * </p> 3224 */ 3225 @SearchParamDefinition(name="identifier", path="Measure.moduleMetadata.identifier", description="Logical identifier for the module (e.g. CMS-143)", type="token" ) 3226 public static final String SP_IDENTIFIER = "identifier"; 3227 /** 3228 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 3229 * <p> 3230 * Description: <b>Logical identifier for the module (e.g. CMS-143)</b><br> 3231 * Type: <b>token</b><br> 3232 * Path: <b>Measure.moduleMetadata.identifier</b><br> 3233 * </p> 3234 */ 3235 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 3236 3237 /** 3238 * Search parameter: <b>version</b> 3239 * <p> 3240 * Description: <b>Version of the module (e.g. 1.0.0)</b><br> 3241 * Type: <b>string</b><br> 3242 * Path: <b>Measure.moduleMetadata.version</b><br> 3243 * </p> 3244 */ 3245 @SearchParamDefinition(name="version", path="Measure.moduleMetadata.version", description="Version of the module (e.g. 1.0.0)", type="string" ) 3246 public static final String SP_VERSION = "version"; 3247 /** 3248 * <b>Fluent Client</b> search parameter constant for <b>version</b> 3249 * <p> 3250 * Description: <b>Version of the module (e.g. 1.0.0)</b><br> 3251 * Type: <b>string</b><br> 3252 * Path: <b>Measure.moduleMetadata.version</b><br> 3253 * </p> 3254 */ 3255 public static final ca.uhn.fhir.rest.gclient.StringClientParam VERSION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_VERSION); 3256 3257 3258}