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