001/*-
002 * #%L
003 * HAPI FHIR - Core Library
004 * %%
005 * Copyright (C) 2014 - 2025 Smile CDR, Inc.
006 * %%
007 * Licensed under the Apache License, Version 2.0 (the "License");
008 * you may not use this file except in compliance with the License.
009 * You may obtain a copy of the License at
010 *
011 *      http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing, software
014 * distributed under the License is distributed on an "AS IS" BASIS,
015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016 * See the License for the specific language governing permissions and
017 * limitations under the License.
018 * #L%
019 */
020package ca.uhn.fhir.util;
021
022public class HapiExtensions {
023
024        /**
025         * <p>
026         * This extension should be of type <code>string</code> and should be
027         * placed on the <code>Subscription.channel</code> element
028         * </p>
029         */
030        public static final String EXT_SUBSCRIPTION_SUBJECT_TEMPLATE =
031                        "http://hapifhir.io/fhir/StructureDefinition/subscription-email-subject-template";
032
033        /**
034         * This extension URL indicates whether a REST HOOK delivery should
035         * include the version ID when delivering.
036         * <p>
037         * This extension should be of type <code>boolean</code> and should be
038         * placed on the <code>Subscription.channel</code> element.
039         * </p>
040         */
041        public static final String EXT_SUBSCRIPTION_RESTHOOK_STRIP_VERSION_IDS =
042                        "http://hapifhir.io/fhir/StructureDefinition/subscription-resthook-strip-version-ids";
043
044        /**
045         * This extension URL indicates whether a REST HOOK delivery should
046         * reload the resource and deliver the latest version always. This
047         * could be useful for example if a resource which triggers a
048         * subscription gets updated many times in short succession and there
049         * is no value in delivering the older versions.
050         * <p>
051         * Note that if the resource is now deleted, this may cause
052         * the delivery to be cancelled altogether.
053         * </p>
054         *
055         * <p>
056         * This extension should be of type <code>boolean</code> and should be
057         * placed on the <code>Subscription.channel</code> element.
058         * </p>
059         */
060        public static final String EXT_SUBSCRIPTION_RESTHOOK_DELIVER_LATEST_VERSION =
061                        "http://hapifhir.io/fhir/StructureDefinition/subscription-resthook-deliver-latest-version";
062
063        /**
064         * Indicate which strategy will be used to match this subscription
065         */
066        public static final String EXT_SUBSCRIPTION_MATCHING_STRATEGY =
067                        "http://hapifhir.io/fhir/StructureDefinition/subscription-matching-strategy";
068
069        /**
070         * <p>
071         * This extension should be of type <code>string</code> and should be
072         * placed on the <code>Subscription.channel</code> element
073         * </p>
074         */
075        public static final String EXT_SUBSCRIPTION_EMAIL_FROM =
076                        "http://hapifhir.io/fhir/StructureDefinition/subscription-email-from";
077
078        /**
079         * Extension ID for external binary references
080         */
081        public static final String EXT_EXTERNALIZED_BINARY_ID =
082                        "http://hapifhir.io/fhir/StructureDefinition/externalized-binary-id";
083
084        /**
085         * Extension ID for the SHA-256 hash of external binary content
086         */
087        public static final String EXT_EXTERNALIZED_BINARY_HASH_SHA_256 =
088                        "http://hapifhir.io/fhir/StructureDefinition/externalized-binary-hash-sha256";
089
090        /**
091         * For subscription, deliver a bundle containing a search result instead of just a single resource
092         */
093        public static final String EXT_SUBSCRIPTION_PAYLOAD_SEARCH_CRITERIA =
094                        "http://hapifhir.io/fhir/StructureDefinition/subscription-payload-search-criteria";
095
096        /**
097         * Message added to expansion valueset
098         */
099        public static final String EXT_VALUESET_EXPANSION_MESSAGE =
100                        "http://hapifhir.io/fhir/StructureDefinition/valueset-expansion-message";
101
102        /**
103         * Extension URL for extension on a SearchParameter indicating that text values should not be indexed
104         */
105        public static final String EXT_SEARCHPARAM_TOKEN_SUPPRESS_TEXT_INDEXING =
106                        "http://hapifhir.io/fhir/StructureDefinition/searchparameter-token-suppress-text-index";
107        /**
108         * <p>
109         * This extension represents the equivalent of the
110         * <code>Resource.meta.source</code> field within R4+ resources, and is for
111         * use in DSTU3 resources. It should contain a value of type <code>uri</code>
112         * and will be located on the Resource.meta
113         * </p>
114         */
115        public static final String EXT_META_SOURCE = "http://hapifhir.io/fhir/StructureDefinition/resource-meta-source";
116
117        public static final String EXT_SP_UNIQUE = "http://hapifhir.io/fhir/StructureDefinition/sp-unique";
118
119        public static final String EXT_SP_COMBO_UPLIFT_CHAIN =
120                        "http://hapifhir.io/fhir/StructureDefinition/sp-combo-uplift-chain";
121
122        /**
123         * URL for extension on a Search Parameter which determines whether it should be enabled for searching for resources
124         */
125        public static final String EXT_SEARCHPARAM_ENABLED_FOR_SEARCHING =
126                        "http://hapifhir.io/fhir/StructureDefinition/searchparameter-enabled-for-searching";
127
128        /**
129         * URL for extension on a Phonetic String SearchParameter indicating that text values should be phonetically indexed with the named encoder
130         */
131        public static final String EXT_SEARCHPARAM_PHONETIC_ENCODER =
132                        "http://hapifhir.io/fhir/StructureDefinition/searchparameter-phonetic-encoder";
133
134        /**
135         * URL for boolean extension added to all placeholder resources
136         */
137        public static final String EXT_RESOURCE_PLACEHOLDER =
138                        "http://hapifhir.io/fhir/StructureDefinition/resource-placeholder";
139
140        /**
141         * URL for extension in a Group Bulk Export which identifies the golden patient of a given exported resource.
142         */
143        public static final String ASSOCIATED_GOLDEN_RESOURCE_EXTENSION_URL =
144                        "https://hapifhir.org/associated-patient-golden-resource/";
145
146        /**
147         * This extension provides an example value for a parameter value for
148         * a REST operation (eg for an OperationDefinition)
149         */
150        public static final String EXT_OP_PARAMETER_EXAMPLE_VALUE =
151                        "http://hapifhir.io/fhir/StructureDefinition/op-parameter-example-value";
152
153        /**
154         * This extension provides a way for subscribers to provide
155         * a "retry-count".
156         * If provided, subscriptions will be retried this many times
157         * (to a total of retry-count + 1 (for original attempt)
158         */
159        public static final String EX_RETRY_COUNT =
160                        "http://hapifhir.io/fhir/StructureDefinition/subscription-delivery-retry-count";
161
162        /**
163         * This extension provides a way for subscribers to indicate if DELETE messages must be sent (default is ignoring them)
164         */
165        public static final String EX_SEND_DELETE_MESSAGES =
166                        "http://hapifhir.io/fhir/StructureDefinition/subscription-send-delete-messages";
167
168        /**
169         * This entension allows subscriptions to be marked as cross partition and with correct settings, listen to incoming resources from all partitions.
170         */
171        public static final String EXTENSION_SUBSCRIPTION_CROSS_PARTITION =
172                        "https://smilecdr.com/fhir/ns/StructureDefinition/subscription-cross-partition";
173
174        /**
175         * This extension is used for "uplifted refchains" on search parameters. See the
176         * HAPI FHIR documentation for an explanation of how these work.
177         */
178        public static final String EXTENSION_SEARCHPARAM_UPLIFT_REFCHAIN =
179                        "https://smilecdr.com/fhir/ns/StructureDefinition/searchparameter-uplift-refchain";
180
181        /**
182         * This extension is used to enable auto version references at path for resource instances.
183         * This extension should be of type <code>string</code> and should be
184         * placed on the <code>Resource.meta</code> element.
185         * It is allowed to add multiple extensions with different paths.
186         */
187        public static final String EXTENSION_AUTO_VERSION_REFERENCES_AT_PATH =
188                        "http://hapifhir.io/fhir/StructureDefinition/auto-version-references-at-path";
189
190        /**
191         * This extension is used for "uplifted refchains" on search parameters. See the
192         * HAPI FHIR documentation for an explanation of how these work.
193         */
194        public static final String EXTENSION_SEARCHPARAM_UPLIFT_REFCHAIN_PARAM_CODE = "code";
195        /**
196         * This extension is used for "uplifted refchains" on search parameters. See the
197         * HAPI FHIR documentation for an explanation of how these work.
198         */
199        public static final String EXTENSION_SEARCHPARAM_UPLIFT_REFCHAIN_ELEMENT_NAME = "element-name";
200
201        public static final String EXTENSION_SEARCHPARAM_CUSTOM_BASE_RESOURCE =
202                        "http://hl7.org/fhir/tools/CustomBaseResource";
203        public static final String EXTENSION_SEARCHPARAM_CUSTOM_TARGET_RESOURCE =
204                        "http://hl7.org/fhir/tools/CustomTargetResource";
205
206        /**
207         * When an OperationOutcome returned by the JPA server includes a declaration that a placeholder
208         * reference was automatically created, this extension indicates the ID of the placeholder.
209         */
210        public static final String EXTENSION_PLACEHOLDER_ID =
211                        "http://hapifhir.io/fhir/StructureDefinition/oo-placeholder-id";
212
213        /**
214         * When a resource is replacing another resource, this extension can be added
215         * to include a reference to the resource that is being replaced.
216         */
217        public static final String EXTENSION_REPLACES = "http://hapifhir.io/fhir/StructureDefinition/replaces";
218
219        /**
220         * When a resource is replaced by another resource, this extension can be added
221         * to include a reference to the resource that is replacing it.
222         */
223        public static final String EXTENSION_REPLACED_BY = "http://hapifhir.io/fhir/StructureDefinition/replaced-by";
224
225        /**
226         * This extension is to specify the partition IDs for a request entry in a transaction bundle.
227         * This allows overriding partition id for a request entry in a transaction bundle so that a single transaction can
228         * have entries destined for different storage partitions. The expected value is a comma-separated string
229         * of partition IDs.
230         */
231        public static final String EXTENSION_TRANSACTION_ENTRY_PARTITION_IDS =
232                        "http://hapifhir.io/fhir/ns/StructureDefinition/request-partition-ids";
233        /**
234         * Non instantiable
235         */
236        private HapiExtensions() {}
237}