
001package org.hl7.fhir.r5.tools; 002 003import org.hl7.fhir.exceptions.FHIRException; 004import org.hl7.fhir.r5.model.*; 005import org.hl7.fhir.r5.extensions.ExtensionsUtils; 006import java.util.List; 007import java.math.BigDecimal; 008 009// generated 010 011/* 012 Copyright (c) 2011+, HL7, Inc. 013 All rights reserved. 014 015 Redistribution and use in source and binary forms, with or without modification, \ 016 are permitted provided that the following conditions are met: 017 018 * Redistributions of source code must retain the above copyright notice, this \ 019 list of conditions and the following disclaimer. 020 * Redistributions in binary form must reproduce the above copyright notice, \ 021 this list of conditions and the following disclaimer in the documentation \ 022 and/or other materials provided with the distribution. 023 * Neither the name of HL7 nor the names of its contributors may be used to 024 endorse or promote products derived from this software without specific 025 prior written permission. 026 027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 028 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 029 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 030 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 031 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 032 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 033 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 034 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 035 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 036 POSSIBILITY OF SUCH DAMAGE. 037 */ 038 039// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 040 041 042 043 044public class Extensions { 045 046// -- BindingDefinition ------------------------------------- 047// http://hl7.org/fhir/tools/StructureDefinition/binding-definition|0.5.0-SNAPSHOT 048// Binding Definition 049 050 public static Extension makeBindingDefinition(String value) { 051 return new Extension(ExtensionConstants.EXT_BINDING_DEFINITION).setValue(new MarkdownType(value)); 052 } 053 054// -- TerminologyBindingStyleEXT ------------------------------------- 055// http://hl7.org/fhir/tools/StructureDefinition/elementdefinition-binding-style|0.5.0-SNAPSHOT 056// Terminology Binding Style Extension 057 058 public static Extension makeTerminologyBindingStyleEXT(String value) { 059 return new Extension(ExtensionConstants.EXT_TERMINOLOGY_BINDING_STYLE_E_X_T).setValue(new CodeType(value)); 060 } 061 062 public static StructureDefinition addTerminologyBindingStyleEXT(StructureDefinition context, String value) { 063 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_TERMINOLOGY_BINDING_STYLE_E_X_T, new CodeType(value)); 064 return context; 065 } 066 067 public static List<String> getTerminologyBindingStyleEXTList(StructureDefinition context) { 068 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_TERMINOLOGY_BINDING_STYLE_E_X_T); 069 } 070 071// -- DateFormat ------------------------------------- 072// http://hl7.org/fhir/tools/StructureDefinition/elementdefinition-date-format|0.5.0-SNAPSHOT 073// Date Format String 074 075 public static Extension makeDateFormat(String value) { 076 return new Extension(ExtensionConstants.EXT_DATE_FORMAT).setValue(new StringType(value)); 077 } 078 079 public static ElementDefinition addDateFormat(ElementDefinition context, String value) { 080 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_DATE_FORMAT, new StringType(value)); 081 return context; 082 } 083 084 public static List<String> getDateFormatList(ElementDefinition context) { 085 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_DATE_FORMAT); 086 } 087 088// -- DateRulesControl ------------------------------------- 089// http://hl7.org/fhir/tools/StructureDefinition/elementdefinition-date-rules|0.5.0-SNAPSHOT 090// Date Validation Rules control 091 092 public static Extension makeDateRulesControl(String value) { 093 return new Extension(ExtensionConstants.EXT_DATE_RULES_CONTROL).setValue(new StringType(value)); 094 } 095 096 public static ElementDefinition addDateRulesControl(ElementDefinition context, String value) { 097 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_DATE_RULES_CONTROL, new StringType(value)); 098 return context; 099 } 100 101 public static List<String> getDateRulesControlList(ElementDefinition context) { 102 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_DATE_RULES_CONTROL); 103 } 104 105// -- ExtensionStylesEXT ------------------------------------- 106// http://hl7.org/fhir/tools/StructureDefinition/extension-style|0.5.0-SNAPSHOT 107// Extension Style Extension 108 109 public static Extension makeExtensionStylesEXT(String value) { 110 return new Extension(ExtensionConstants.EXT_EXTENSION_STYLES_E_X_T).setValue(new CodeType(value)); 111 } 112 113 public static StructureDefinition addExtensionStylesEXT(StructureDefinition context, String value) { 114 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_EXTENSION_STYLES_E_X_T, new CodeType(value)); 115 return context; 116 } 117 118 public static List<String> getExtensionStylesEXTList(StructureDefinition context) { 119 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_EXTENSION_STYLES_E_X_T); 120 } 121 122// -- IdExpectationExt ------------------------------------- 123// http://hl7.org/fhir/tools/StructureDefinition/id-expectation|0.5.0-SNAPSHOT 124// Id Expectation Extension 125 126 public static Extension makeIdExpectationExt(String value) { 127 return new Extension(ExtensionConstants.EXT_ID_EXPECTATION_EXT).setValue(new CodeType(value)); 128 } 129 130 public static ElementDefinition addIdExpectationExt(ElementDefinition context, String value) { 131 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_ID_EXPECTATION_EXT, new CodeType(value)); 132 return context; 133 } 134 135 public static List<String> getIdExpectationExtList(ElementDefinition context) { 136 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_ID_EXPECTATION_EXT); 137 } 138 139// -- ActorExampleURL ------------------------------------- 140// http://hl7.org/fhir/tools/StructureDefinition/ig-actor-example-url|0.5.0-SNAPSHOT 141// Actor Example URL 142 143 public static Extension makeActorExampleURL(String value) { 144 return new Extension(ExtensionConstants.EXT_ACTOR_EXAMPLE_U_R_L).setValue(new UrlType(value)); 145 } 146 147 public static ActorDefinition addActorExampleURL(ActorDefinition context, String value) { 148 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_ACTOR_EXAMPLE_U_R_L, new UrlType(value)); 149 return context; 150 } 151 152 public static List<String> getActorExampleURLList(ActorDefinition context) { 153 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_ACTOR_EXAMPLE_U_R_L); 154 } 155 156// -- ActorForExample ------------------------------------- 157// http://hl7.org/fhir/tools/StructureDefinition/ig-example-actor|0.5.0-SNAPSHOT 158// Actor For Example 159 160 public static Extension makeActorForExample(String value) { 161 return new Extension(ExtensionConstants.EXT_ACTOR_FOR_EXAMPLE).setValue(new CanonicalType(value)); 162 } 163 164// -- IGInternalDependency ------------------------------------- 165// http://hl7.org/fhir/tools/StructureDefinition/ig-internal-dependency|0.5.0-SNAPSHOT 166// IG Internal Dependency 167 168 public static Extension makeIGInternalDependency(String value) { 169 return new Extension(ExtensionConstants.EXT_IGINTERNAL_DEPENDENCY).setValue(new CodeType(value)); 170 } 171 172// -- IGLinkDependency ------------------------------------- 173// http://hl7.org/fhir/tools/StructureDefinition/ig-link-dependency|0.5.0-SNAPSHOT 174// IG Link Dependency 175 176 public static Extension makeIGLinkDependency(String value) { 177 return new Extension(ExtensionConstants.EXT_IGLINK_DEPENDENCY).setValue(new CodeType(value)); 178 } 179 180// -- IGPublisherLoadAsResource ------------------------------------- 181// http://hl7.org/fhir/tools/StructureDefinition/ig-load-as-resource|0.5.0-SNAPSHOT 182// IGPublisher Load As Resource 183 184 public static Extension makeIGPublisherLoadAsResource(boolean value) { 185 return new Extension(ExtensionConstants.EXT_IGPUBLISHER_LOAD_AS_RESOURCE).setValue(new BooleanType(value)); 186 } 187 188 public static StructureDefinition addIGPublisherLoadAsResource(StructureDefinition context, boolean value) { 189 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_IGPUBLISHER_LOAD_AS_RESOURCE, new BooleanType(value)); 190 return context; 191 } 192 193 public static List<Boolean> getIGPublisherLoadAsResourceList(StructureDefinition context) { 194 return ExtensionsUtils.getExtensionBooleanList(context, ExtensionConstants.EXT_IGPUBLISHER_LOAD_AS_RESOURCE); 195 } 196 197// -- IGPageName ------------------------------------- 198// http://hl7.org/fhir/tools/StructureDefinition/ig-page-name|0.5.0-SNAPSHOT 199// IG Page Name 200 201 public static Extension makeIGPageName(String value) { 202 return new Extension(ExtensionConstants.EXT_IGPAGE_NAME).setValue(new UrlType(value)); 203 } 204 205// -- IGPublisherUseAsResourceId ------------------------------------- 206// http://hl7.org/fhir/tools/StructureDefinition/ig-use-as-resource-id|0.5.0-SNAPSHOT 207// IGPublisher Use As Resource Id 208 209 public static Extension makeIGPublisherUseAsResourceId(boolean value) { 210 return new Extension(ExtensionConstants.EXT_IGPUBLISHER_USE_AS_RESOURCE_ID).setValue(new BooleanType(value)); 211 } 212 213 public static ElementDefinition addIGPublisherUseAsResourceId(ElementDefinition context, boolean value) { 214 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_IGPUBLISHER_USE_AS_RESOURCE_ID, new BooleanType(value)); 215 return context; 216 } 217 218 public static List<Boolean> getIGPublisherUseAsResourceIdList(ElementDefinition context) { 219 return ExtensionsUtils.getExtensionBooleanList(context, ExtensionConstants.EXT_IGPUBLISHER_USE_AS_RESOURCE_ID); 220 } 221 222// -- IGPublisherBundle ------------------------------------- 223// http://hl7.org/fhir/tools/StructureDefinition/igpublisher-bundle|0.5.0-SNAPSHOT 224// IG Publisher Bundle 225 226 public static Extension makeIGPublisherBundle(String value) { 227 return new Extension(ExtensionConstants.EXT_IGPUBLISHER_BUNDLE).setValue(new UrlType(value)); 228 } 229 230// -- IGDependencyComment ------------------------------------- 231// http://hl7.org/fhir/tools/StructureDefinition/implementationguide-dependency-comment|0.5.0-SNAPSHOT 232// IG Dependency Comment 233 234 public static Extension makeIGDependencyComment(String value) { 235 return new Extension(ExtensionConstants.EXT_IGDEPENDENCY_COMMENT).setValue(new MarkdownType(value)); 236 } 237 238// -- BinaryResourceFormat ------------------------------------- 239// http://hl7.org/fhir/tools/StructureDefinition/implementationguide-resource-format|0.5.0-SNAPSHOT 240// Binary Resource Format 241 242 public static Extension makeBinaryResourceFormat(String value) { 243 return new Extension(ExtensionConstants.EXT_BINARY_RESOURCE_FORMAT).setValue(new CodeType(value)); 244 } 245 246// -- BinaryResourceLogical ------------------------------------- 247// http://hl7.org/fhir/tools/StructureDefinition/implementationguide-resource-logical|0.5.0-SNAPSHOT 248// Binary Resource Logical 249 250 public static Extension makeBinaryResourceLogical(String value) { 251 return new Extension(ExtensionConstants.EXT_BINARY_RESOURCE_LOGICAL).setValue(new CanonicalType(value)); 252 } 253 254// -- ImpliedStringPrefix ------------------------------------- 255// http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix|0.5.0-SNAPSHOT 256// Implied String Prefix 257 258 public static Extension makeImpliedStringPrefix(String value) { 259 return new Extension(ExtensionConstants.EXT_IMPLIED_STRING_PREFIX).setValue(new StringType(value)); 260 } 261 262 public static ElementDefinition addImpliedStringPrefix(ElementDefinition context, String value) { 263 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_IMPLIED_STRING_PREFIX, new StringType(value)); 264 return context; 265 } 266 267 public static List<String> getImpliedStringPrefixList(ElementDefinition context) { 268 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_IMPLIED_STRING_PREFIX); 269 } 270 271// -- InheritObligations ------------------------------------- 272// http://hl7.org/fhir/tools/StructureDefinition/inherit-obligations|0.5.0-SNAPSHOT 273// Inherit Obligations 274 275 public static Extension makeInheritObligations(String value) { 276 return new Extension(ExtensionConstants.EXT_INHERIT_OBLIGATIONS).setValue(new CanonicalType(value)); 277 } 278 279 public static StructureDefinition addInheritObligations(StructureDefinition context, String value) { 280 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_INHERIT_OBLIGATIONS, new CanonicalType(value)); 281 return context; 282 } 283 284 public static List<String> getInheritObligationsList(StructureDefinition context) { 285 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_INHERIT_OBLIGATIONS); 286 } 287 288// -- JsonEmptyBehavior ------------------------------------- 289// http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior|0.5.0-SNAPSHOT 290// Json Empty Behavior Extension 291 292 public static Extension makeJsonEmptyBehavior(String value) { 293 return new Extension(ExtensionConstants.EXT_JSON_EMPTY_BEHAVIOR).setValue(new CodeType(value)); 294 } 295 296 public static ElementDefinition addJsonEmptyBehavior(ElementDefinition context, String value) { 297 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_JSON_EMPTY_BEHAVIOR, new CodeType(value)); 298 return context; 299 } 300 301 public static List<String> getJsonEmptyBehaviorList(ElementDefinition context) { 302 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_JSON_EMPTY_BEHAVIOR); 303 } 304 305// -- JsonPropertyName ------------------------------------- 306// http://hl7.org/fhir/tools/StructureDefinition/json-name|0.5.0-SNAPSHOT 307// Json Property Name Extension 308 309 public static Extension makeJsonPropertyName(String value) { 310 return new Extension(ExtensionConstants.EXT_JSON_PROPERTY_NAME).setValue(new StringType(value)); 311 } 312 313 public static ElementDefinition addJsonPropertyName(ElementDefinition context, String value) { 314 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_JSON_PROPERTY_NAME, new StringType(value)); 315 return context; 316 } 317 318 public static List<String> getJsonPropertyNameList(ElementDefinition context) { 319 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_JSON_PROPERTY_NAME); 320 } 321 322// -- JsonNullableExt ------------------------------------- 323// http://hl7.org/fhir/tools/StructureDefinition/json-nullable|0.5.0-SNAPSHOT 324// Json Nullable Extension 325 326 public static Extension makeJsonNullableExt(boolean value) { 327 return new Extension(ExtensionConstants.EXT_JSON_NULLABLE_EXT).setValue(new BooleanType(value)); 328 } 329 330 public static ElementDefinition setJsonNullableExt(ElementDefinition context, boolean value) { 331 ExtensionsUtils.setExtension(context, ExtensionConstants.EXT_JSON_NULLABLE_EXT, new BooleanType(value)); 332 return context; 333 } 334 335 public static Boolean getJsonNullableExt(ElementDefinition context) { 336 return ExtensionsUtils.getExtensionBoolean(context, ExtensionConstants.EXT_JSON_NULLABLE_EXT); 337 } 338 339// -- JsonPrimitiveChoiceExt ------------------------------------- 340// http://hl7.org/fhir/tools/StructureDefinition/json-primitive-choice|0.5.0-SNAPSHOT 341// Json Primitive Choice Extension 342 343 public static Extension makeJsonPrimitiveChoiceExt(boolean value) { 344 return new Extension(ExtensionConstants.EXT_JSON_PRIMITIVE_CHOICE_EXT).setValue(new BooleanType(value)); 345 } 346 347 public static ElementDefinition setJsonPrimitiveChoiceExt(ElementDefinition context, boolean value) { 348 ExtensionsUtils.setExtension(context, ExtensionConstants.EXT_JSON_PRIMITIVE_CHOICE_EXT, new BooleanType(value)); 349 return context; 350 } 351 352 public static Boolean getJsonPrimitiveChoiceExt(ElementDefinition context) { 353 return ExtensionsUtils.getExtensionBoolean(context, ExtensionConstants.EXT_JSON_PRIMITIVE_CHOICE_EXT); 354 } 355 356// -- JsonPropertyKey ------------------------------------- 357// http://hl7.org/fhir/tools/StructureDefinition/json-property-key|0.5.0-SNAPSHOT 358// Json Property Key Extension 359 360 public static Extension makeJsonPropertyKey(String value) { 361 return new Extension(ExtensionConstants.EXT_JSON_PROPERTY_KEY).setValue(new CodeType(value)); 362 } 363 364 public static ElementDefinition addJsonPropertyKey(ElementDefinition context, String value) { 365 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_JSON_PROPERTY_KEY, new CodeType(value)); 366 return context; 367 } 368 369 public static List<String> getJsonPropertyKeyList(ElementDefinition context) { 370 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_JSON_PROPERTY_KEY); 371 } 372 373// -- JsonSuppressResourceType ------------------------------------- 374// http://hl7.org/fhir/tools/StructureDefinition/json-suppress-resourcetype|0.5.0-SNAPSHOT 375// Json Suppress resourceType Property 376 377 public static Extension makeJsonSuppressResourceType(boolean value) { 378 return new Extension(ExtensionConstants.EXT_JSON_SUPPRESS_RESOURCE_TYPE).setValue(new BooleanType(value)); 379 } 380 381 public static StructureDefinition addJsonSuppressResourceType(StructureDefinition context, boolean value) { 382 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_JSON_SUPPRESS_RESOURCE_TYPE, new BooleanType(value)); 383 return context; 384 } 385 386 public static List<Boolean> getJsonSuppressResourceTypeList(StructureDefinition context) { 387 return ExtensionsUtils.getExtensionBooleanList(context, ExtensionConstants.EXT_JSON_SUPPRESS_RESOURCE_TYPE); 388 } 389 390// -- LogicalContainer ------------------------------------- 391// http://hl7.org/fhir/tools/StructureDefinition/logical-container|0.5.0-SNAPSHOT 392// Logical Container 393 394 public static Extension makeLogicalContainer(String value) { 395 return new Extension(ExtensionConstants.EXT_LOGICAL_CONTAINER).setValue(new UriType(value)); 396 } 397 398 public static StructureDefinition setLogicalContainer(StructureDefinition context, String value) { 399 ExtensionsUtils.setExtension(context, ExtensionConstants.EXT_LOGICAL_CONTAINER, new UriType(value)); 400 return context; 401 } 402 403 public static String getLogicalContainer(StructureDefinition context) { 404 return ExtensionsUtils.getExtensionString(context, ExtensionConstants.EXT_LOGICAL_CONTAINER); 405 } 406 407// -- LogicalTarget ------------------------------------- 408// http://hl7.org/fhir/tools/StructureDefinition/logical-target|0.5.0-SNAPSHOT 409// Logical Target 410 411 public static Extension makeLogicalTarget(boolean value) { 412 return new Extension(ExtensionConstants.EXT_LOGICAL_TARGET).setValue(new BooleanType(value)); 413 } 414 415 public static StructureDefinition setLogicalTarget(StructureDefinition context, boolean value) { 416 ExtensionsUtils.setExtension(context, ExtensionConstants.EXT_LOGICAL_TARGET, new BooleanType(value)); 417 return context; 418 } 419 420 public static Boolean getLogicalTarget(StructureDefinition context) { 421 return ExtensionsUtils.getExtensionBoolean(context, ExtensionConstants.EXT_LOGICAL_TARGET); 422 } 423 424// -- MatchetypeFlag ------------------------------------- 425// http://hl7.org/fhir/tools/StructureDefinition/matchetype|0.5.0-SNAPSHOT 426// Matchetype Flag 427 428 public static Extension makeMatchetypeFlag(String value) { 429 return new Extension(ExtensionConstants.EXT_MATCHETYPE_FLAG).setValue(new CodeType(value)); 430 } 431 432 public static Resource addMatchetypeFlag(Resource context, String value) { 433 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_MATCHETYPE_FLAG, new CodeType(value)); 434 return context; 435 } 436 437 public static List<String> getMatchetypeFlagList(Resource context) { 438 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_MATCHETYPE_FLAG); 439 } 440 441// -- MatchetypeCountFlag ------------------------------------- 442// http://hl7.org/fhir/tools/StructureDefinition/matchetype-count|0.5.0-SNAPSHOT 443// Matchetype Count Flag 444 445 public static Extension makeMatchetypeCountFlag(String value) { 446 return new Extension(ExtensionConstants.EXT_MATCHETYPE_COUNT_FLAG).setValue(new StringType(value)); 447 } 448 449 public static Element addMatchetypeCountFlag(Element context, String value) { 450 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_MATCHETYPE_COUNT_FLAG, new StringType(value)); 451 return context; 452 } 453 454 public static List<String> getMatchetypeCountFlagList(Element context) { 455 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_MATCHETYPE_COUNT_FLAG); 456 } 457 458// -- MatchetypeOptionalFlag ------------------------------------- 459// http://hl7.org/fhir/tools/StructureDefinition/matchetype-optional|0.5.0-SNAPSHOT 460// Matchetype Optional Flag 461 462 public static Extension makeMatchetypeOptionalFlag(String value) { 463 return new Extension(ExtensionConstants.EXT_MATCHETYPE_OPTIONAL_FLAG).setValue(new StringType(value)); 464 } 465 466 public static Extension makeMatchetypeOptionalFlag(boolean value) { 467 return new Extension(ExtensionConstants.EXT_MATCHETYPE_OPTIONAL_FLAG).setValue(new BooleanType(value)); 468 } 469 470 public static Element addMatchetypeOptionalFlag(Element context, String value) { 471 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_MATCHETYPE_OPTIONAL_FLAG, new StringType(value)); 472 return context; 473 } 474 475 public static List<String> getMatchetypeOptionalFlagStringList(Element context) { 476 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_MATCHETYPE_OPTIONAL_FLAG); 477 } 478 479 public static Element addMatchetypeOptionalFlag(Element context, boolean value) { 480 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_MATCHETYPE_OPTIONAL_FLAG, new BooleanType(value)); 481 return context; 482 } 483 484 public static List<Boolean> getMatchetypeOptionalFlagBooleanList(Element context) { 485 return ExtensionsUtils.getExtensionBooleanList(context, ExtensionConstants.EXT_MATCHETYPE_OPTIONAL_FLAG); 486 } 487 488// -- NoBinding ------------------------------------- 489// http://hl7.org/fhir/tools/StructureDefinition/no-binding|0.5.0-SNAPSHOT 490// No Binding Extension 491 492 public static Extension makeNoBinding(boolean value) { 493 return new Extension(ExtensionConstants.EXT_NO_BINDING).setValue(new BooleanType(value)); 494 } 495 496 public static ElementDefinition setNoBinding(ElementDefinition context, boolean value) { 497 ExtensionsUtils.setExtension(context, ExtensionConstants.EXT_NO_BINDING, new BooleanType(value)); 498 return context; 499 } 500 501 public static Boolean getNoBinding(ElementDefinition context) { 502 return ExtensionsUtils.getExtensionBoolean(context, ExtensionConstants.EXT_NO_BINDING); 503 } 504 505// -- ObligationProfile ------------------------------------- 506// http://hl7.org/fhir/tools/StructureDefinition/obligation-profile|0.5.0-SNAPSHOT 507// Obligation Profile Flag 508 509 public static Extension makeObligationProfile(boolean value) { 510 return new Extension(ExtensionConstants.EXT_OBLIGATION_PROFILE).setValue(new BooleanType(value)); 511 } 512 513 public static StructureDefinition addObligationProfile(StructureDefinition context, boolean value) { 514 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_OBLIGATION_PROFILE, new BooleanType(value)); 515 return context; 516 } 517 518 public static List<Boolean> getObligationProfileList(StructureDefinition context) { 519 return ExtensionsUtils.getExtensionBooleanList(context, ExtensionConstants.EXT_OBLIGATION_PROFILE); 520 } 521 522// -- PackageScope ------------------------------------- 523// http://hl7.org/fhir/tools/StructureDefinition/package-scope|0.5.0-SNAPSHOT 524// Package Scope 525 526 public static Extension makePackageScope(String value) { 527 return new Extension(ExtensionConstants.EXT_PACKAGE_SCOPE).setValue(new CodeType(value)); 528 } 529 530 public static ImplementationGuide addPackageScope(ImplementationGuide context, String value) { 531 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_PACKAGE_SCOPE, new CodeType(value)); 532 return context; 533 } 534 535 public static List<String> getPackageScopeList(ImplementationGuide context) { 536 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_PACKAGE_SCOPE); 537 } 538 539// -- ProfileMapping ------------------------------------- 540// http://hl7.org/fhir/tools/StructureDefinition/profile-mapping|0.5.0-SNAPSHOT 541// Profile Mapping Extension 542 543 public static Extension makeProfileMapping(DataType value) { 544 return new Extension(ExtensionConstants.EXT_PROFILE_MAPPING).setValue(value); 545 } 546 547// -- ResourceSortExt ------------------------------------- 548// http://hl7.org/fhir/tools/StructureDefinition/resource-sort|0.5.0-SNAPSHOT 549// Resource Sort Extension 550 551 public static Extension makeResourceSortExt(int value) { 552 return new Extension(ExtensionConstants.EXT_RESOURCE_SORT_EXT).setValue(new IntegerType(value)); 553 } 554 555// -- SearchParameterBaseType ------------------------------------- 556// http://hl7.org/fhir/tools/StructureDefinition/searchparameter-base-type|0.5.0-SNAPSHOT 557// Search Parameter Base Type 558 559 public static Extension makeSearchParameterBaseType(String value) { 560 return new Extension(ExtensionConstants.EXT_SEARCH_PARAMETER_BASE_TYPE).setValue(new CodeType(value)); 561 } 562 563// -- SnapshotBaseVersion ------------------------------------- 564// http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version|0.5.0-SNAPSHOT 565// Snapshot Base Version 566 567 public static Extension makeSnapshotBaseVersion(String value) { 568 return new Extension(ExtensionConstants.EXT_SNAPSHOT_BASE_VERSION).setValue(new StringType(value)); 569 } 570 571// -- ExtensionSnapshotBehavior ------------------------------------- 572// http://hl7.org/fhir/tools/StructureDefinition/snapshot-behavior|0.5.0-SNAPSHOT 573// Extension Snapshot Behavior 574 575 public static Extension makeExtensionSnapshotBehavior(String value) { 576 return new Extension(ExtensionConstants.EXT_EXTENSION_SNAPSHOT_BEHAVIOR).setValue(new CodeType(value)); 577 } 578 579 public static StructureDefinition addExtensionSnapshotBehavior(StructureDefinition context, String value) { 580 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_EXTENSION_SNAPSHOT_BEHAVIOR, new CodeType(value)); 581 return context; 582 } 583 584 public static List<String> getExtensionSnapshotBehaviorList(StructureDefinition context) { 585 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_EXTENSION_SNAPSHOT_BEHAVIOR); 586 } 587 588// -- RenderingEngineViewHintsExt ------------------------------------- 589// http://hl7.org/fhir/tools/StructureDefinition/view-hint|0.5.0-SNAPSHOT 590// Viewing Hints for Rendering Engines (Extension) 591 592 public static Extension makeRenderingEngineViewHintsExt(String value) { 593 return new Extension(ExtensionConstants.EXT_RENDERING_ENGINE_VIEW_HINTS_EXT).setValue(new CodeType(value)); 594 } 595 596 public static ElementDefinition setRenderingEngineViewHintsExt(ElementDefinition context, String value) { 597 ExtensionsUtils.setExtension(context, ExtensionConstants.EXT_RENDERING_ENGINE_VIEW_HINTS_EXT, new CodeType(value)); 598 return context; 599 } 600 601 public static String getRenderingEngineViewHintsExt(ElementDefinition context) { 602 return ExtensionsUtils.getExtensionString(context, ExtensionConstants.EXT_RENDERING_ENGINE_VIEW_HINTS_EXT); 603 } 604 605 public static StructureDefinition setRenderingEngineViewHintsExt(StructureDefinition context, String value) { 606 ExtensionsUtils.setExtension(context, ExtensionConstants.EXT_RENDERING_ENGINE_VIEW_HINTS_EXT, new CodeType(value)); 607 return context; 608 } 609 610 public static String getRenderingEngineViewHintsExt(StructureDefinition context) { 611 return ExtensionsUtils.getExtensionString(context, ExtensionConstants.EXT_RENDERING_ENGINE_VIEW_HINTS_EXT); 612 } 613 614// -- WebSource ------------------------------------- 615// http://hl7.org/fhir/tools/StructureDefinition/web-source|0.5.0-SNAPSHOT 616// Web Source 617 618 public static Extension makeWebSource(String value) { 619 return new Extension(ExtensionConstants.EXT_WEB_SOURCE).setValue(new UrlType(value)); 620 } 621 622 public static CanonicalResource setWebSource(CanonicalResource context, String value) { 623 ExtensionsUtils.setExtension(context, ExtensionConstants.EXT_WEB_SOURCE, new UrlType(value)); 624 return context; 625 } 626 627 public static String getWebSource(CanonicalResource context) { 628 return ExtensionsUtils.getExtensionString(context, ExtensionConstants.EXT_WEB_SOURCE); 629 } 630 631// -- XMLChoiceGroup ------------------------------------- 632// http://hl7.org/fhir/tools/StructureDefinition/xml-choice-group|0.5.0-SNAPSHOT 633// XML Choice Group 634 635 public static Extension makeXMLChoiceGroup(boolean value) { 636 return new Extension(ExtensionConstants.EXT_XMLCHOICE_GROUP).setValue(new BooleanType(value)); 637 } 638 639 public static ElementDefinition addXMLChoiceGroup(ElementDefinition context, boolean value) { 640 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_XMLCHOICE_GROUP, new BooleanType(value)); 641 return context; 642 } 643 644 public static List<Boolean> getXMLChoiceGroupList(ElementDefinition context) { 645 return ExtensionsUtils.getExtensionBooleanList(context, ExtensionConstants.EXT_XMLCHOICE_GROUP); 646 } 647 648// -- XmlElementName ------------------------------------- 649// http://hl7.org/fhir/tools/StructureDefinition/xml-name|0.5.0-SNAPSHOT 650// Xml Element Name Extension 651 652 public static Extension makeXmlElementName(String value) { 653 return new Extension(ExtensionConstants.EXT_XML_ELEMENT_NAME).setValue(new StringType(value)); 654 } 655 656 public static ElementDefinition addXmlElementName(ElementDefinition context, String value) { 657 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_XML_ELEMENT_NAME, new StringType(value)); 658 return context; 659 } 660 661 public static List<String> getXmlElementNameList(ElementDefinition context) { 662 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_XML_ELEMENT_NAME); 663 } 664 665 public static StructureDefinition addXmlElementName(StructureDefinition context, String value) { 666 ExtensionsUtils.addExtension(context, ExtensionConstants.EXT_XML_ELEMENT_NAME, new StringType(value)); 667 return context; 668 } 669 670 public static List<String> getXmlElementNameList(StructureDefinition context) { 671 return ExtensionsUtils.getExtensionStringList(context, ExtensionConstants.EXT_XML_ELEMENT_NAME); 672 } 673 674// -- Namespace ------------------------------------- 675// http://hl7.org/fhir/tools/StructureDefinition/xml-namespace|0.5.0-SNAPSHOT 676// Namespace 677 678 public static Extension makeNamespace(String value) { 679 return new Extension(ExtensionConstants.EXT_NAMESPACE).setValue(new UriType(value)); 680 } 681 682 public static ElementDefinition setNamespace(ElementDefinition context, String value) { 683 ExtensionsUtils.setExtension(context, ExtensionConstants.EXT_NAMESPACE, new UriType(value)); 684 return context; 685 } 686 687 public static String getNamespace(ElementDefinition context) { 688 return ExtensionsUtils.getExtensionString(context, ExtensionConstants.EXT_NAMESPACE); 689 } 690 691 public static StructureDefinition setNamespace(StructureDefinition context, String value) { 692 ExtensionsUtils.setExtension(context, ExtensionConstants.EXT_NAMESPACE, new UriType(value)); 693 return context; 694 } 695 696 public static String getNamespace(StructureDefinition context) { 697 return ExtensionsUtils.getExtensionString(context, ExtensionConstants.EXT_NAMESPACE); 698 } 699 700// -- XmlNoOrder ------------------------------------- 701// http://hl7.org/fhir/tools/StructureDefinition/xml-no-order|0.5.0-SNAPSHOT 702// No Order in XML 703 704 public static Extension makeXmlNoOrder(boolean value) { 705 return new Extension(ExtensionConstants.EXT_XML_NO_ORDER).setValue(new BooleanType(value)); 706 } 707 708 public static StructureDefinition setXmlNoOrder(StructureDefinition context, boolean value) { 709 ExtensionsUtils.setExtension(context, ExtensionConstants.EXT_XML_NO_ORDER, new BooleanType(value)); 710 return context; 711 } 712 713 public static Boolean getXmlNoOrder(StructureDefinition context) { 714 return ExtensionsUtils.getExtensionBoolean(context, ExtensionConstants.EXT_XML_NO_ORDER); 715 } 716 717 718 719}