001package org.hl7.fhir.dstu2.model; 002 003 004 005 006/* 007 Copyright (c) 2011+, HL7, Inc. 008 All rights reserved. 009 010 Redistribution and use in source and binary forms, with or without modification, 011 are permitted provided that the following conditions are met: 012 013 * Redistributions of source code must retain the above copyright notice, this 014 list of conditions and the following disclaimer. 015 * Redistributions in binary form must reproduce the above copyright notice, 016 this list of conditions and the following disclaimer in the documentation 017 and/or other materials provided with the distribution. 018 * Neither the name of HL7 nor the names of its contributors may be used to 019 endorse or promote products derived from this software without specific 020 prior written permission. 021 022 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 023 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 024 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 025 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 026 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 027 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 028 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 029 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 030 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 031 POSSIBILITY OF SUCH DAMAGE. 032 033*/ 034 035// Generated on Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2 036import java.util.ArrayList; 037import java.util.Date; 038import java.util.List; 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; 045import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 046import org.hl7.fhir.exceptions.FHIRException; 047/** 048 * Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc. 049 */ 050@ResourceDef(name="Goal", profile="http://hl7.org/fhir/Profile/Goal") 051public class Goal extends DomainResource { 052 053 public enum GoalStatus { 054 /** 055 * A goal is proposed for this patient 056 */ 057 PROPOSED, 058 /** 059 * A goal is planned for this patient 060 */ 061 PLANNED, 062 /** 063 * A proposed goal was accepted 064 */ 065 ACCEPTED, 066 /** 067 * A proposed goal was rejected 068 */ 069 REJECTED, 070 /** 071 * The goal is being sought but has not yet been reached. (Also applies if goal was reached in the past but there has been regression and goal is being sought again) 072 */ 073 INPROGRESS, 074 /** 075 * The goal has been met and no further action is needed 076 */ 077 ACHIEVED, 078 /** 079 * The goal has been met, but ongoing activity is needed to sustain the goal objective 080 */ 081 SUSTAINING, 082 /** 083 * The goal remains a long term objective but is no longer being actively pursued for a temporary period of time. 084 */ 085 ONHOLD, 086 /** 087 * The goal is no longer being sought 088 */ 089 CANCELLED, 090 /** 091 * added to help the parsers 092 */ 093 NULL; 094 public static GoalStatus fromCode(String codeString) throws FHIRException { 095 if (codeString == null || "".equals(codeString)) 096 return null; 097 if ("proposed".equals(codeString)) 098 return PROPOSED; 099 if ("planned".equals(codeString)) 100 return PLANNED; 101 if ("accepted".equals(codeString)) 102 return ACCEPTED; 103 if ("rejected".equals(codeString)) 104 return REJECTED; 105 if ("in-progress".equals(codeString)) 106 return INPROGRESS; 107 if ("achieved".equals(codeString)) 108 return ACHIEVED; 109 if ("sustaining".equals(codeString)) 110 return SUSTAINING; 111 if ("on-hold".equals(codeString)) 112 return ONHOLD; 113 if ("cancelled".equals(codeString)) 114 return CANCELLED; 115 throw new FHIRException("Unknown GoalStatus code '"+codeString+"'"); 116 } 117 public String toCode() { 118 switch (this) { 119 case PROPOSED: return "proposed"; 120 case PLANNED: return "planned"; 121 case ACCEPTED: return "accepted"; 122 case REJECTED: return "rejected"; 123 case INPROGRESS: return "in-progress"; 124 case ACHIEVED: return "achieved"; 125 case SUSTAINING: return "sustaining"; 126 case ONHOLD: return "on-hold"; 127 case CANCELLED: return "cancelled"; 128 default: return "?"; 129 } 130 } 131 public String getSystem() { 132 switch (this) { 133 case PROPOSED: return "http://hl7.org/fhir/goal-status"; 134 case PLANNED: return "http://hl7.org/fhir/goal-status"; 135 case ACCEPTED: return "http://hl7.org/fhir/goal-status"; 136 case REJECTED: return "http://hl7.org/fhir/goal-status"; 137 case INPROGRESS: return "http://hl7.org/fhir/goal-status"; 138 case ACHIEVED: return "http://hl7.org/fhir/goal-status"; 139 case SUSTAINING: return "http://hl7.org/fhir/goal-status"; 140 case ONHOLD: return "http://hl7.org/fhir/goal-status"; 141 case CANCELLED: return "http://hl7.org/fhir/goal-status"; 142 default: return "?"; 143 } 144 } 145 public String getDefinition() { 146 switch (this) { 147 case PROPOSED: return "A goal is proposed for this patient"; 148 case PLANNED: return "A goal is planned for this patient"; 149 case ACCEPTED: return "A proposed goal was accepted"; 150 case REJECTED: return "A proposed goal was rejected"; 151 case INPROGRESS: return "The goal is being sought but has not yet been reached. (Also applies if goal was reached in the past but there has been regression and goal is being sought again)"; 152 case ACHIEVED: return "The goal has been met and no further action is needed"; 153 case SUSTAINING: return "The goal has been met, but ongoing activity is needed to sustain the goal objective"; 154 case ONHOLD: return "The goal remains a long term objective but is no longer being actively pursued for a temporary period of time."; 155 case CANCELLED: return "The goal is no longer being sought"; 156 default: return "?"; 157 } 158 } 159 public String getDisplay() { 160 switch (this) { 161 case PROPOSED: return "Proposed"; 162 case PLANNED: return "Planned"; 163 case ACCEPTED: return "Accepted"; 164 case REJECTED: return "Rejected"; 165 case INPROGRESS: return "In Progress"; 166 case ACHIEVED: return "Achieved"; 167 case SUSTAINING: return "Sustaining"; 168 case ONHOLD: return "On Hold"; 169 case CANCELLED: return "Cancelled"; 170 default: return "?"; 171 } 172 } 173 } 174 175 public static class GoalStatusEnumFactory implements EnumFactory<GoalStatus> { 176 public GoalStatus fromCode(String codeString) throws IllegalArgumentException { 177 if (codeString == null || "".equals(codeString)) 178 if (codeString == null || "".equals(codeString)) 179 return null; 180 if ("proposed".equals(codeString)) 181 return GoalStatus.PROPOSED; 182 if ("planned".equals(codeString)) 183 return GoalStatus.PLANNED; 184 if ("accepted".equals(codeString)) 185 return GoalStatus.ACCEPTED; 186 if ("rejected".equals(codeString)) 187 return GoalStatus.REJECTED; 188 if ("in-progress".equals(codeString)) 189 return GoalStatus.INPROGRESS; 190 if ("achieved".equals(codeString)) 191 return GoalStatus.ACHIEVED; 192 if ("sustaining".equals(codeString)) 193 return GoalStatus.SUSTAINING; 194 if ("on-hold".equals(codeString)) 195 return GoalStatus.ONHOLD; 196 if ("cancelled".equals(codeString)) 197 return GoalStatus.CANCELLED; 198 throw new IllegalArgumentException("Unknown GoalStatus code '"+codeString+"'"); 199 } 200 public Enumeration<GoalStatus> fromType(Base code) throws FHIRException { 201 if (code == null || code.isEmpty()) 202 return null; 203 String codeString = ((PrimitiveType) code).asStringValue(); 204 if (codeString == null || "".equals(codeString)) 205 return null; 206 if ("proposed".equals(codeString)) 207 return new Enumeration<GoalStatus>(this, GoalStatus.PROPOSED); 208 if ("planned".equals(codeString)) 209 return new Enumeration<GoalStatus>(this, GoalStatus.PLANNED); 210 if ("accepted".equals(codeString)) 211 return new Enumeration<GoalStatus>(this, GoalStatus.ACCEPTED); 212 if ("rejected".equals(codeString)) 213 return new Enumeration<GoalStatus>(this, GoalStatus.REJECTED); 214 if ("in-progress".equals(codeString)) 215 return new Enumeration<GoalStatus>(this, GoalStatus.INPROGRESS); 216 if ("achieved".equals(codeString)) 217 return new Enumeration<GoalStatus>(this, GoalStatus.ACHIEVED); 218 if ("sustaining".equals(codeString)) 219 return new Enumeration<GoalStatus>(this, GoalStatus.SUSTAINING); 220 if ("on-hold".equals(codeString)) 221 return new Enumeration<GoalStatus>(this, GoalStatus.ONHOLD); 222 if ("cancelled".equals(codeString)) 223 return new Enumeration<GoalStatus>(this, GoalStatus.CANCELLED); 224 throw new FHIRException("Unknown GoalStatus code '"+codeString+"'"); 225 } 226 public String toCode(GoalStatus code) { 227 if (code == GoalStatus.PROPOSED) 228 return "proposed"; 229 if (code == GoalStatus.PLANNED) 230 return "planned"; 231 if (code == GoalStatus.ACCEPTED) 232 return "accepted"; 233 if (code == GoalStatus.REJECTED) 234 return "rejected"; 235 if (code == GoalStatus.INPROGRESS) 236 return "in-progress"; 237 if (code == GoalStatus.ACHIEVED) 238 return "achieved"; 239 if (code == GoalStatus.SUSTAINING) 240 return "sustaining"; 241 if (code == GoalStatus.ONHOLD) 242 return "on-hold"; 243 if (code == GoalStatus.CANCELLED) 244 return "cancelled"; 245 return "?"; 246 } 247 } 248 249 @Block() 250 public static class GoalOutcomeComponent extends BackboneElement implements IBaseBackboneElement { 251 /** 252 * Details of what's changed (or not changed). 253 */ 254 @Child(name = "result", type = {CodeableConcept.class, Observation.class}, order=1, min=0, max=1, modifier=false, summary=false) 255 @Description(shortDefinition="Code or observation that resulted from goal", formalDefinition="Details of what's changed (or not changed)." ) 256 protected Type result; 257 258 private static final long serialVersionUID = 1994317639L; 259 260 /* 261 * Constructor 262 */ 263 public GoalOutcomeComponent() { 264 super(); 265 } 266 267 /** 268 * @return {@link #result} (Details of what's changed (or not changed).) 269 */ 270 public Type getResult() { 271 return this.result; 272 } 273 274 /** 275 * @return {@link #result} (Details of what's changed (or not changed).) 276 */ 277 public CodeableConcept getResultCodeableConcept() throws FHIRException { 278 if (!(this.result instanceof CodeableConcept)) 279 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.result.getClass().getName()+" was encountered"); 280 return (CodeableConcept) this.result; 281 } 282 283 public boolean hasResultCodeableConcept() { 284 return this.result instanceof CodeableConcept; 285 } 286 287 /** 288 * @return {@link #result} (Details of what's changed (or not changed).) 289 */ 290 public Reference getResultReference() throws FHIRException { 291 if (!(this.result instanceof Reference)) 292 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.result.getClass().getName()+" was encountered"); 293 return (Reference) this.result; 294 } 295 296 public boolean hasResultReference() { 297 return this.result instanceof Reference; 298 } 299 300 public boolean hasResult() { 301 return this.result != null && !this.result.isEmpty(); 302 } 303 304 /** 305 * @param value {@link #result} (Details of what's changed (or not changed).) 306 */ 307 public GoalOutcomeComponent setResult(Type value) { 308 this.result = value; 309 return this; 310 } 311 312 protected void listChildren(List<Property> childrenList) { 313 super.listChildren(childrenList); 314 childrenList.add(new Property("result[x]", "CodeableConcept|Reference(Observation)", "Details of what's changed (or not changed).", 0, java.lang.Integer.MAX_VALUE, result)); 315 } 316 317 @Override 318 public void setProperty(String name, Base value) throws FHIRException { 319 if (name.equals("result[x]")) 320 this.result = (Type) value; // Type 321 else 322 super.setProperty(name, value); 323 } 324 325 @Override 326 public Base addChild(String name) throws FHIRException { 327 if (name.equals("resultCodeableConcept")) { 328 this.result = new CodeableConcept(); 329 return this.result; 330 } 331 else if (name.equals("resultReference")) { 332 this.result = new Reference(); 333 return this.result; 334 } 335 else 336 return super.addChild(name); 337 } 338 339 public GoalOutcomeComponent copy() { 340 GoalOutcomeComponent dst = new GoalOutcomeComponent(); 341 copyValues(dst); 342 dst.result = result == null ? null : result.copy(); 343 return dst; 344 } 345 346 @Override 347 public boolean equalsDeep(Base other) { 348 if (!super.equalsDeep(other)) 349 return false; 350 if (!(other instanceof GoalOutcomeComponent)) 351 return false; 352 GoalOutcomeComponent o = (GoalOutcomeComponent) other; 353 return compareDeep(result, o.result, true); 354 } 355 356 @Override 357 public boolean equalsShallow(Base other) { 358 if (!super.equalsShallow(other)) 359 return false; 360 if (!(other instanceof GoalOutcomeComponent)) 361 return false; 362 GoalOutcomeComponent o = (GoalOutcomeComponent) other; 363 return true; 364 } 365 366 public boolean isEmpty() { 367 return super.isEmpty() && (result == null || result.isEmpty()); 368 } 369 370 public String fhirType() { 371 return "Goal.outcome"; 372 373 } 374 375 } 376 377 /** 378 * This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). 379 */ 380 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 381 @Description(shortDefinition="External Ids for this goal", formalDefinition="This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) 382 protected List<Identifier> identifier; 383 384 /** 385 * Identifies the patient, group or organization for whom the goal is being established. 386 */ 387 @Child(name = "subject", type = {Patient.class, Group.class, Organization.class}, order=1, min=0, max=1, modifier=false, summary=true) 388 @Description(shortDefinition="Who this goal is intended for", formalDefinition="Identifies the patient, group or organization for whom the goal is being established." ) 389 protected Reference subject; 390 391 /** 392 * The actual object that is the target of the reference (Identifies the patient, group or organization for whom the goal is being established.) 393 */ 394 protected Resource subjectTarget; 395 396 /** 397 * The date or event after which the goal should begin being pursued. 398 */ 399 @Child(name = "start", type = {DateType.class, CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 400 @Description(shortDefinition="When goal pursuit begins", formalDefinition="The date or event after which the goal should begin being pursued." ) 401 protected Type start; 402 403 /** 404 * Indicates either the date or the duration after start by which the goal should be met. 405 */ 406 @Child(name = "target", type = {DateType.class, Duration.class}, order=3, min=0, max=1, modifier=false, summary=true) 407 @Description(shortDefinition="Reach goal on or before", formalDefinition="Indicates either the date or the duration after start by which the goal should be met." ) 408 protected Type target; 409 410 /** 411 * Indicates a category the goal falls within. 412 */ 413 @Child(name = "category", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 414 @Description(shortDefinition="E.g. Treatment, dietary, behavioral, etc.", formalDefinition="Indicates a category the goal falls within." ) 415 protected List<CodeableConcept> category; 416 417 /** 418 * Human-readable description of a specific desired objective of care. 419 */ 420 @Child(name = "description", type = {StringType.class}, order=5, min=1, max=1, modifier=false, summary=true) 421 @Description(shortDefinition="What's the desired outcome?", formalDefinition="Human-readable description of a specific desired objective of care." ) 422 protected StringType description; 423 424 /** 425 * Indicates whether the goal has been reached and is still considered relevant. 426 */ 427 @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true) 428 @Description(shortDefinition="proposed | planned | accepted | rejected | in-progress | achieved | sustaining | on-hold | cancelled", formalDefinition="Indicates whether the goal has been reached and is still considered relevant." ) 429 protected Enumeration<GoalStatus> status; 430 431 /** 432 * Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc. 433 */ 434 @Child(name = "statusDate", type = {DateType.class}, order=7, min=0, max=1, modifier=false, summary=true) 435 @Description(shortDefinition="When goal status took effect", formalDefinition="Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc." ) 436 protected DateType statusDate; 437 438 /** 439 * Captures the reason for the current status. 440 */ 441 @Child(name = "statusReason", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false) 442 @Description(shortDefinition="Reason for current status", formalDefinition="Captures the reason for the current status." ) 443 protected CodeableConcept statusReason; 444 445 /** 446 * Indicates whose goal this is - patient goal, practitioner goal, etc. 447 */ 448 @Child(name = "author", type = {Patient.class, Practitioner.class, RelatedPerson.class}, order=9, min=0, max=1, modifier=false, summary=true) 449 @Description(shortDefinition="Who's responsible for creating Goal?", formalDefinition="Indicates whose goal this is - patient goal, practitioner goal, etc." ) 450 protected Reference author; 451 452 /** 453 * The actual object that is the target of the reference (Indicates whose goal this is - patient goal, practitioner goal, etc.) 454 */ 455 protected Resource authorTarget; 456 457 /** 458 * Identifies the mutually agreed level of importance associated with reaching/sustaining the goal. 459 */ 460 @Child(name = "priority", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true) 461 @Description(shortDefinition="high | medium |low", formalDefinition="Identifies the mutually agreed level of importance associated with reaching/sustaining the goal." ) 462 protected CodeableConcept priority; 463 464 /** 465 * The identified conditions and other health record elements that are intended to be addressed by the goal. 466 */ 467 @Child(name = "addresses", type = {Condition.class, Observation.class, MedicationStatement.class, NutritionOrder.class, ProcedureRequest.class, RiskAssessment.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 468 @Description(shortDefinition="Issues addressed by this goal", formalDefinition="The identified conditions and other health record elements that are intended to be addressed by the goal." ) 469 protected List<Reference> addresses; 470 /** 471 * The actual objects that are the target of the reference (The identified conditions and other health record elements that are intended to be addressed by the goal.) 472 */ 473 protected List<Resource> addressesTarget; 474 475 476 /** 477 * Any comments related to the goal. 478 */ 479 @Child(name = "note", type = {Annotation.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 480 @Description(shortDefinition="Comments about the goal", formalDefinition="Any comments related to the goal." ) 481 protected List<Annotation> note; 482 483 /** 484 * Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved. 485 */ 486 @Child(name = "outcome", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 487 @Description(shortDefinition="What was end result of goal?", formalDefinition="Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved." ) 488 protected List<GoalOutcomeComponent> outcome; 489 490 private static final long serialVersionUID = 2029459056L; 491 492 /* 493 * Constructor 494 */ 495 public Goal() { 496 super(); 497 } 498 499 /* 500 * Constructor 501 */ 502 public Goal(StringType description, Enumeration<GoalStatus> status) { 503 super(); 504 this.description = description; 505 this.status = status; 506 } 507 508 /** 509 * @return {@link #identifier} (This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) 510 */ 511 public List<Identifier> getIdentifier() { 512 if (this.identifier == null) 513 this.identifier = new ArrayList<Identifier>(); 514 return this.identifier; 515 } 516 517 public boolean hasIdentifier() { 518 if (this.identifier == null) 519 return false; 520 for (Identifier item : this.identifier) 521 if (!item.isEmpty()) 522 return true; 523 return false; 524 } 525 526 /** 527 * @return {@link #identifier} (This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) 528 */ 529 // syntactic sugar 530 public Identifier addIdentifier() { //3 531 Identifier t = new Identifier(); 532 if (this.identifier == null) 533 this.identifier = new ArrayList<Identifier>(); 534 this.identifier.add(t); 535 return t; 536 } 537 538 // syntactic sugar 539 public Goal addIdentifier(Identifier t) { //3 540 if (t == null) 541 return this; 542 if (this.identifier == null) 543 this.identifier = new ArrayList<Identifier>(); 544 this.identifier.add(t); 545 return this; 546 } 547 548 /** 549 * @return {@link #subject} (Identifies the patient, group or organization for whom the goal is being established.) 550 */ 551 public Reference getSubject() { 552 if (this.subject == null) 553 if (Configuration.errorOnAutoCreate()) 554 throw new Error("Attempt to auto-create Goal.subject"); 555 else if (Configuration.doAutoCreate()) 556 this.subject = new Reference(); // cc 557 return this.subject; 558 } 559 560 public boolean hasSubject() { 561 return this.subject != null && !this.subject.isEmpty(); 562 } 563 564 /** 565 * @param value {@link #subject} (Identifies the patient, group or organization for whom the goal is being established.) 566 */ 567 public Goal setSubject(Reference value) { 568 this.subject = value; 569 return this; 570 } 571 572 /** 573 * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the patient, group or organization for whom the goal is being established.) 574 */ 575 public Resource getSubjectTarget() { 576 return this.subjectTarget; 577 } 578 579 /** 580 * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the patient, group or organization for whom the goal is being established.) 581 */ 582 public Goal setSubjectTarget(Resource value) { 583 this.subjectTarget = value; 584 return this; 585 } 586 587 /** 588 * @return {@link #start} (The date or event after which the goal should begin being pursued.) 589 */ 590 public Type getStart() { 591 return this.start; 592 } 593 594 /** 595 * @return {@link #start} (The date or event after which the goal should begin being pursued.) 596 */ 597 public DateType getStartDateType() throws FHIRException { 598 if (!(this.start instanceof DateType)) 599 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.start.getClass().getName()+" was encountered"); 600 return (DateType) this.start; 601 } 602 603 public boolean hasStartDateType() { 604 return this.start instanceof DateType; 605 } 606 607 /** 608 * @return {@link #start} (The date or event after which the goal should begin being pursued.) 609 */ 610 public CodeableConcept getStartCodeableConcept() throws FHIRException { 611 if (!(this.start instanceof CodeableConcept)) 612 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.start.getClass().getName()+" was encountered"); 613 return (CodeableConcept) this.start; 614 } 615 616 public boolean hasStartCodeableConcept() { 617 return this.start instanceof CodeableConcept; 618 } 619 620 public boolean hasStart() { 621 return this.start != null && !this.start.isEmpty(); 622 } 623 624 /** 625 * @param value {@link #start} (The date or event after which the goal should begin being pursued.) 626 */ 627 public Goal setStart(Type value) { 628 this.start = value; 629 return this; 630 } 631 632 /** 633 * @return {@link #target} (Indicates either the date or the duration after start by which the goal should be met.) 634 */ 635 public Type getTarget() { 636 return this.target; 637 } 638 639 /** 640 * @return {@link #target} (Indicates either the date or the duration after start by which the goal should be met.) 641 */ 642 public DateType getTargetDateType() throws FHIRException { 643 if (!(this.target instanceof DateType)) 644 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.target.getClass().getName()+" was encountered"); 645 return (DateType) this.target; 646 } 647 648 public boolean hasTargetDateType() { 649 return this.target instanceof DateType; 650 } 651 652 /** 653 * @return {@link #target} (Indicates either the date or the duration after start by which the goal should be met.) 654 */ 655 public Duration getTargetDuration() throws FHIRException { 656 if (!(this.target instanceof Duration)) 657 throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.target.getClass().getName()+" was encountered"); 658 return (Duration) this.target; 659 } 660 661 public boolean hasTargetDuration() { 662 return this.target instanceof Duration; 663 } 664 665 public boolean hasTarget() { 666 return this.target != null && !this.target.isEmpty(); 667 } 668 669 /** 670 * @param value {@link #target} (Indicates either the date or the duration after start by which the goal should be met.) 671 */ 672 public Goal setTarget(Type value) { 673 this.target = value; 674 return this; 675 } 676 677 /** 678 * @return {@link #category} (Indicates a category the goal falls within.) 679 */ 680 public List<CodeableConcept> getCategory() { 681 if (this.category == null) 682 this.category = new ArrayList<CodeableConcept>(); 683 return this.category; 684 } 685 686 public boolean hasCategory() { 687 if (this.category == null) 688 return false; 689 for (CodeableConcept item : this.category) 690 if (!item.isEmpty()) 691 return true; 692 return false; 693 } 694 695 /** 696 * @return {@link #category} (Indicates a category the goal falls within.) 697 */ 698 // syntactic sugar 699 public CodeableConcept addCategory() { //3 700 CodeableConcept t = new CodeableConcept(); 701 if (this.category == null) 702 this.category = new ArrayList<CodeableConcept>(); 703 this.category.add(t); 704 return t; 705 } 706 707 // syntactic sugar 708 public Goal addCategory(CodeableConcept t) { //3 709 if (t == null) 710 return this; 711 if (this.category == null) 712 this.category = new ArrayList<CodeableConcept>(); 713 this.category.add(t); 714 return this; 715 } 716 717 /** 718 * @return {@link #description} (Human-readable description of a specific desired objective of care.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 719 */ 720 public StringType getDescriptionElement() { 721 if (this.description == null) 722 if (Configuration.errorOnAutoCreate()) 723 throw new Error("Attempt to auto-create Goal.description"); 724 else if (Configuration.doAutoCreate()) 725 this.description = new StringType(); // bb 726 return this.description; 727 } 728 729 public boolean hasDescriptionElement() { 730 return this.description != null && !this.description.isEmpty(); 731 } 732 733 public boolean hasDescription() { 734 return this.description != null && !this.description.isEmpty(); 735 } 736 737 /** 738 * @param value {@link #description} (Human-readable description of a specific desired objective of care.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 739 */ 740 public Goal setDescriptionElement(StringType value) { 741 this.description = value; 742 return this; 743 } 744 745 /** 746 * @return Human-readable description of a specific desired objective of care. 747 */ 748 public String getDescription() { 749 return this.description == null ? null : this.description.getValue(); 750 } 751 752 /** 753 * @param value Human-readable description of a specific desired objective of care. 754 */ 755 public Goal setDescription(String value) { 756 if (this.description == null) 757 this.description = new StringType(); 758 this.description.setValue(value); 759 return this; 760 } 761 762 /** 763 * @return {@link #status} (Indicates whether the goal has been reached and is still considered relevant.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 764 */ 765 public Enumeration<GoalStatus> getStatusElement() { 766 if (this.status == null) 767 if (Configuration.errorOnAutoCreate()) 768 throw new Error("Attempt to auto-create Goal.status"); 769 else if (Configuration.doAutoCreate()) 770 this.status = new Enumeration<GoalStatus>(new GoalStatusEnumFactory()); // bb 771 return this.status; 772 } 773 774 public boolean hasStatusElement() { 775 return this.status != null && !this.status.isEmpty(); 776 } 777 778 public boolean hasStatus() { 779 return this.status != null && !this.status.isEmpty(); 780 } 781 782 /** 783 * @param value {@link #status} (Indicates whether the goal has been reached and is still considered relevant.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 784 */ 785 public Goal setStatusElement(Enumeration<GoalStatus> value) { 786 this.status = value; 787 return this; 788 } 789 790 /** 791 * @return Indicates whether the goal has been reached and is still considered relevant. 792 */ 793 public GoalStatus getStatus() { 794 return this.status == null ? null : this.status.getValue(); 795 } 796 797 /** 798 * @param value Indicates whether the goal has been reached and is still considered relevant. 799 */ 800 public Goal setStatus(GoalStatus value) { 801 if (this.status == null) 802 this.status = new Enumeration<GoalStatus>(new GoalStatusEnumFactory()); 803 this.status.setValue(value); 804 return this; 805 } 806 807 /** 808 * @return {@link #statusDate} (Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value 809 */ 810 public DateType getStatusDateElement() { 811 if (this.statusDate == null) 812 if (Configuration.errorOnAutoCreate()) 813 throw new Error("Attempt to auto-create Goal.statusDate"); 814 else if (Configuration.doAutoCreate()) 815 this.statusDate = new DateType(); // bb 816 return this.statusDate; 817 } 818 819 public boolean hasStatusDateElement() { 820 return this.statusDate != null && !this.statusDate.isEmpty(); 821 } 822 823 public boolean hasStatusDate() { 824 return this.statusDate != null && !this.statusDate.isEmpty(); 825 } 826 827 /** 828 * @param value {@link #statusDate} (Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value 829 */ 830 public Goal setStatusDateElement(DateType value) { 831 this.statusDate = value; 832 return this; 833 } 834 835 /** 836 * @return Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc. 837 */ 838 public Date getStatusDate() { 839 return this.statusDate == null ? null : this.statusDate.getValue(); 840 } 841 842 /** 843 * @param value Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc. 844 */ 845 public Goal setStatusDate(Date value) { 846 if (value == null) 847 this.statusDate = null; 848 else { 849 if (this.statusDate == null) 850 this.statusDate = new DateType(); 851 this.statusDate.setValue(value); 852 } 853 return this; 854 } 855 856 /** 857 * @return {@link #statusReason} (Captures the reason for the current status.) 858 */ 859 public CodeableConcept getStatusReason() { 860 if (this.statusReason == null) 861 if (Configuration.errorOnAutoCreate()) 862 throw new Error("Attempt to auto-create Goal.statusReason"); 863 else if (Configuration.doAutoCreate()) 864 this.statusReason = new CodeableConcept(); // cc 865 return this.statusReason; 866 } 867 868 public boolean hasStatusReason() { 869 return this.statusReason != null && !this.statusReason.isEmpty(); 870 } 871 872 /** 873 * @param value {@link #statusReason} (Captures the reason for the current status.) 874 */ 875 public Goal setStatusReason(CodeableConcept value) { 876 this.statusReason = value; 877 return this; 878 } 879 880 /** 881 * @return {@link #author} (Indicates whose goal this is - patient goal, practitioner goal, etc.) 882 */ 883 public Reference getAuthor() { 884 if (this.author == null) 885 if (Configuration.errorOnAutoCreate()) 886 throw new Error("Attempt to auto-create Goal.author"); 887 else if (Configuration.doAutoCreate()) 888 this.author = new Reference(); // cc 889 return this.author; 890 } 891 892 public boolean hasAuthor() { 893 return this.author != null && !this.author.isEmpty(); 894 } 895 896 /** 897 * @param value {@link #author} (Indicates whose goal this is - patient goal, practitioner goal, etc.) 898 */ 899 public Goal setAuthor(Reference value) { 900 this.author = value; 901 return this; 902 } 903 904 /** 905 * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates whose goal this is - patient goal, practitioner goal, etc.) 906 */ 907 public Resource getAuthorTarget() { 908 return this.authorTarget; 909 } 910 911 /** 912 * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates whose goal this is - patient goal, practitioner goal, etc.) 913 */ 914 public Goal setAuthorTarget(Resource value) { 915 this.authorTarget = value; 916 return this; 917 } 918 919 /** 920 * @return {@link #priority} (Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.) 921 */ 922 public CodeableConcept getPriority() { 923 if (this.priority == null) 924 if (Configuration.errorOnAutoCreate()) 925 throw new Error("Attempt to auto-create Goal.priority"); 926 else if (Configuration.doAutoCreate()) 927 this.priority = new CodeableConcept(); // cc 928 return this.priority; 929 } 930 931 public boolean hasPriority() { 932 return this.priority != null && !this.priority.isEmpty(); 933 } 934 935 /** 936 * @param value {@link #priority} (Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.) 937 */ 938 public Goal setPriority(CodeableConcept value) { 939 this.priority = value; 940 return this; 941 } 942 943 /** 944 * @return {@link #addresses} (The identified conditions and other health record elements that are intended to be addressed by the goal.) 945 */ 946 public List<Reference> getAddresses() { 947 if (this.addresses == null) 948 this.addresses = new ArrayList<Reference>(); 949 return this.addresses; 950 } 951 952 public boolean hasAddresses() { 953 if (this.addresses == null) 954 return false; 955 for (Reference item : this.addresses) 956 if (!item.isEmpty()) 957 return true; 958 return false; 959 } 960 961 /** 962 * @return {@link #addresses} (The identified conditions and other health record elements that are intended to be addressed by the goal.) 963 */ 964 // syntactic sugar 965 public Reference addAddresses() { //3 966 Reference t = new Reference(); 967 if (this.addresses == null) 968 this.addresses = new ArrayList<Reference>(); 969 this.addresses.add(t); 970 return t; 971 } 972 973 // syntactic sugar 974 public Goal addAddresses(Reference t) { //3 975 if (t == null) 976 return this; 977 if (this.addresses == null) 978 this.addresses = new ArrayList<Reference>(); 979 this.addresses.add(t); 980 return this; 981 } 982 983 /** 984 * @return {@link #addresses} (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. The identified conditions and other health record elements that are intended to be addressed by the goal.) 985 */ 986 public List<Resource> getAddressesTarget() { 987 if (this.addressesTarget == null) 988 this.addressesTarget = new ArrayList<Resource>(); 989 return this.addressesTarget; 990 } 991 992 /** 993 * @return {@link #note} (Any comments related to the goal.) 994 */ 995 public List<Annotation> getNote() { 996 if (this.note == null) 997 this.note = new ArrayList<Annotation>(); 998 return this.note; 999 } 1000 1001 public boolean hasNote() { 1002 if (this.note == null) 1003 return false; 1004 for (Annotation item : this.note) 1005 if (!item.isEmpty()) 1006 return true; 1007 return false; 1008 } 1009 1010 /** 1011 * @return {@link #note} (Any comments related to the goal.) 1012 */ 1013 // syntactic sugar 1014 public Annotation addNote() { //3 1015 Annotation t = new Annotation(); 1016 if (this.note == null) 1017 this.note = new ArrayList<Annotation>(); 1018 this.note.add(t); 1019 return t; 1020 } 1021 1022 // syntactic sugar 1023 public Goal addNote(Annotation t) { //3 1024 if (t == null) 1025 return this; 1026 if (this.note == null) 1027 this.note = new ArrayList<Annotation>(); 1028 this.note.add(t); 1029 return this; 1030 } 1031 1032 /** 1033 * @return {@link #outcome} (Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.) 1034 */ 1035 public List<GoalOutcomeComponent> getOutcome() { 1036 if (this.outcome == null) 1037 this.outcome = new ArrayList<GoalOutcomeComponent>(); 1038 return this.outcome; 1039 } 1040 1041 public boolean hasOutcome() { 1042 if (this.outcome == null) 1043 return false; 1044 for (GoalOutcomeComponent item : this.outcome) 1045 if (!item.isEmpty()) 1046 return true; 1047 return false; 1048 } 1049 1050 /** 1051 * @return {@link #outcome} (Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.) 1052 */ 1053 // syntactic sugar 1054 public GoalOutcomeComponent addOutcome() { //3 1055 GoalOutcomeComponent t = new GoalOutcomeComponent(); 1056 if (this.outcome == null) 1057 this.outcome = new ArrayList<GoalOutcomeComponent>(); 1058 this.outcome.add(t); 1059 return t; 1060 } 1061 1062 // syntactic sugar 1063 public Goal addOutcome(GoalOutcomeComponent t) { //3 1064 if (t == null) 1065 return this; 1066 if (this.outcome == null) 1067 this.outcome = new ArrayList<GoalOutcomeComponent>(); 1068 this.outcome.add(t); 1069 return this; 1070 } 1071 1072 protected void listChildren(List<Property> childrenList) { 1073 super.listChildren(childrenList); 1074 childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); 1075 childrenList.add(new Property("subject", "Reference(Patient|Group|Organization)", "Identifies the patient, group or organization for whom the goal is being established.", 0, java.lang.Integer.MAX_VALUE, subject)); 1076 childrenList.add(new Property("start[x]", "date|CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, java.lang.Integer.MAX_VALUE, start)); 1077 childrenList.add(new Property("target[x]", "date|Duration", "Indicates either the date or the duration after start by which the goal should be met.", 0, java.lang.Integer.MAX_VALUE, target)); 1078 childrenList.add(new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, java.lang.Integer.MAX_VALUE, category)); 1079 childrenList.add(new Property("description", "string", "Human-readable description of a specific desired objective of care.", 0, java.lang.Integer.MAX_VALUE, description)); 1080 childrenList.add(new Property("status", "code", "Indicates whether the goal has been reached and is still considered relevant.", 0, java.lang.Integer.MAX_VALUE, status)); 1081 childrenList.add(new Property("statusDate", "date", "Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.", 0, java.lang.Integer.MAX_VALUE, statusDate)); 1082 childrenList.add(new Property("statusReason", "CodeableConcept", "Captures the reason for the current status.", 0, java.lang.Integer.MAX_VALUE, statusReason)); 1083 childrenList.add(new Property("author", "Reference(Patient|Practitioner|RelatedPerson)", "Indicates whose goal this is - patient goal, practitioner goal, etc.", 0, java.lang.Integer.MAX_VALUE, author)); 1084 childrenList.add(new Property("priority", "CodeableConcept", "Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.", 0, java.lang.Integer.MAX_VALUE, priority)); 1085 childrenList.add(new Property("addresses", "Reference(Condition|Observation|MedicationStatement|NutritionOrder|ProcedureRequest|RiskAssessment)", "The identified conditions and other health record elements that are intended to be addressed by the goal.", 0, java.lang.Integer.MAX_VALUE, addresses)); 1086 childrenList.add(new Property("note", "Annotation", "Any comments related to the goal.", 0, java.lang.Integer.MAX_VALUE, note)); 1087 childrenList.add(new Property("outcome", "", "Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.", 0, java.lang.Integer.MAX_VALUE, outcome)); 1088 } 1089 1090 @Override 1091 public void setProperty(String name, Base value) throws FHIRException { 1092 if (name.equals("identifier")) 1093 this.getIdentifier().add(castToIdentifier(value)); 1094 else if (name.equals("subject")) 1095 this.subject = castToReference(value); // Reference 1096 else if (name.equals("start[x]")) 1097 this.start = (Type) value; // Type 1098 else if (name.equals("target[x]")) 1099 this.target = (Type) value; // Type 1100 else if (name.equals("category")) 1101 this.getCategory().add(castToCodeableConcept(value)); 1102 else if (name.equals("description")) 1103 this.description = castToString(value); // StringType 1104 else if (name.equals("status")) 1105 this.status = new GoalStatusEnumFactory().fromType(value); // Enumeration<GoalStatus> 1106 else if (name.equals("statusDate")) 1107 this.statusDate = castToDate(value); // DateType 1108 else if (name.equals("statusReason")) 1109 this.statusReason = castToCodeableConcept(value); // CodeableConcept 1110 else if (name.equals("author")) 1111 this.author = castToReference(value); // Reference 1112 else if (name.equals("priority")) 1113 this.priority = castToCodeableConcept(value); // CodeableConcept 1114 else if (name.equals("addresses")) 1115 this.getAddresses().add(castToReference(value)); 1116 else if (name.equals("note")) 1117 this.getNote().add(castToAnnotation(value)); 1118 else if (name.equals("outcome")) 1119 this.getOutcome().add((GoalOutcomeComponent) value); 1120 else 1121 super.setProperty(name, value); 1122 } 1123 1124 @Override 1125 public Base addChild(String name) throws FHIRException { 1126 if (name.equals("identifier")) { 1127 return addIdentifier(); 1128 } 1129 else if (name.equals("subject")) { 1130 this.subject = new Reference(); 1131 return this.subject; 1132 } 1133 else if (name.equals("startDate")) { 1134 this.start = new DateType(); 1135 return this.start; 1136 } 1137 else if (name.equals("startCodeableConcept")) { 1138 this.start = new CodeableConcept(); 1139 return this.start; 1140 } 1141 else if (name.equals("targetDate")) { 1142 this.target = new DateType(); 1143 return this.target; 1144 } 1145 else if (name.equals("targetDuration")) { 1146 this.target = new Duration(); 1147 return this.target; 1148 } 1149 else if (name.equals("category")) { 1150 return addCategory(); 1151 } 1152 else if (name.equals("description")) { 1153 throw new FHIRException("Cannot call addChild on a primitive type Goal.description"); 1154 } 1155 else if (name.equals("status")) { 1156 throw new FHIRException("Cannot call addChild on a primitive type Goal.status"); 1157 } 1158 else if (name.equals("statusDate")) { 1159 throw new FHIRException("Cannot call addChild on a primitive type Goal.statusDate"); 1160 } 1161 else if (name.equals("statusReason")) { 1162 this.statusReason = new CodeableConcept(); 1163 return this.statusReason; 1164 } 1165 else if (name.equals("author")) { 1166 this.author = new Reference(); 1167 return this.author; 1168 } 1169 else if (name.equals("priority")) { 1170 this.priority = new CodeableConcept(); 1171 return this.priority; 1172 } 1173 else if (name.equals("addresses")) { 1174 return addAddresses(); 1175 } 1176 else if (name.equals("note")) { 1177 return addNote(); 1178 } 1179 else if (name.equals("outcome")) { 1180 return addOutcome(); 1181 } 1182 else 1183 return super.addChild(name); 1184 } 1185 1186 public String fhirType() { 1187 return "Goal"; 1188 1189 } 1190 1191 public Goal copy() { 1192 Goal dst = new Goal(); 1193 copyValues(dst); 1194 if (identifier != null) { 1195 dst.identifier = new ArrayList<Identifier>(); 1196 for (Identifier i : identifier) 1197 dst.identifier.add(i.copy()); 1198 }; 1199 dst.subject = subject == null ? null : subject.copy(); 1200 dst.start = start == null ? null : start.copy(); 1201 dst.target = target == null ? null : target.copy(); 1202 if (category != null) { 1203 dst.category = new ArrayList<CodeableConcept>(); 1204 for (CodeableConcept i : category) 1205 dst.category.add(i.copy()); 1206 }; 1207 dst.description = description == null ? null : description.copy(); 1208 dst.status = status == null ? null : status.copy(); 1209 dst.statusDate = statusDate == null ? null : statusDate.copy(); 1210 dst.statusReason = statusReason == null ? null : statusReason.copy(); 1211 dst.author = author == null ? null : author.copy(); 1212 dst.priority = priority == null ? null : priority.copy(); 1213 if (addresses != null) { 1214 dst.addresses = new ArrayList<Reference>(); 1215 for (Reference i : addresses) 1216 dst.addresses.add(i.copy()); 1217 }; 1218 if (note != null) { 1219 dst.note = new ArrayList<Annotation>(); 1220 for (Annotation i : note) 1221 dst.note.add(i.copy()); 1222 }; 1223 if (outcome != null) { 1224 dst.outcome = new ArrayList<GoalOutcomeComponent>(); 1225 for (GoalOutcomeComponent i : outcome) 1226 dst.outcome.add(i.copy()); 1227 }; 1228 return dst; 1229 } 1230 1231 protected Goal typedCopy() { 1232 return copy(); 1233 } 1234 1235 @Override 1236 public boolean equalsDeep(Base other) { 1237 if (!super.equalsDeep(other)) 1238 return false; 1239 if (!(other instanceof Goal)) 1240 return false; 1241 Goal o = (Goal) other; 1242 return compareDeep(identifier, o.identifier, true) && compareDeep(subject, o.subject, true) && compareDeep(start, o.start, true) 1243 && compareDeep(target, o.target, true) && compareDeep(category, o.category, true) && compareDeep(description, o.description, true) 1244 && compareDeep(status, o.status, true) && compareDeep(statusDate, o.statusDate, true) && compareDeep(statusReason, o.statusReason, true) 1245 && compareDeep(author, o.author, true) && compareDeep(priority, o.priority, true) && compareDeep(addresses, o.addresses, true) 1246 && compareDeep(note, o.note, true) && compareDeep(outcome, o.outcome, true); 1247 } 1248 1249 @Override 1250 public boolean equalsShallow(Base other) { 1251 if (!super.equalsShallow(other)) 1252 return false; 1253 if (!(other instanceof Goal)) 1254 return false; 1255 Goal o = (Goal) other; 1256 return compareValues(description, o.description, true) && compareValues(status, o.status, true) && compareValues(statusDate, o.statusDate, true) 1257 ; 1258 } 1259 1260 public boolean isEmpty() { 1261 return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (subject == null || subject.isEmpty()) 1262 && (start == null || start.isEmpty()) && (target == null || target.isEmpty()) && (category == null || category.isEmpty()) 1263 && (description == null || description.isEmpty()) && (status == null || status.isEmpty()) 1264 && (statusDate == null || statusDate.isEmpty()) && (statusReason == null || statusReason.isEmpty()) 1265 && (author == null || author.isEmpty()) && (priority == null || priority.isEmpty()) && (addresses == null || addresses.isEmpty()) 1266 && (note == null || note.isEmpty()) && (outcome == null || outcome.isEmpty()); 1267 } 1268 1269 @Override 1270 public ResourceType getResourceType() { 1271 return ResourceType.Goal; 1272 } 1273 1274 @SearchParamDefinition(name="identifier", path="Goal.identifier", description="External Ids for this goal", type="token" ) 1275 public static final String SP_IDENTIFIER = "identifier"; 1276 @SearchParamDefinition(name="patient", path="Goal.subject", description="Who this goal is intended for", type="reference" ) 1277 public static final String SP_PATIENT = "patient"; 1278 @SearchParamDefinition(name="subject", path="Goal.subject", description="Who this goal is intended for", type="reference" ) 1279 public static final String SP_SUBJECT = "subject"; 1280 @SearchParamDefinition(name="targetdate", path="Goal.targetDate", description="Reach goal on or before", type="date" ) 1281 public static final String SP_TARGETDATE = "targetdate"; 1282 @SearchParamDefinition(name="category", path="Goal.category", description="E.g. Treatment, dietary, behavioral, etc.", type="token" ) 1283 public static final String SP_CATEGORY = "category"; 1284 @SearchParamDefinition(name="status", path="Goal.status", description="proposed | planned | accepted | rejected | in-progress | achieved | sustaining | on-hold | cancelled", type="token" ) 1285 public static final String SP_STATUS = "status"; 1286 1287}