# CMS-0057-F Compliance: Installing and Validating IGs

This guide provides step-by-step instructions for installing and configuring a set of IGs commonly used for CMS-0057-F compliance. Please note that this guide targets **FHIR R4**. The module types (`PERSISTENCE_R4`) and all IGs listed are R4-based.

- **R4B** requires no changes. R4B uses the same `PERSISTENCE_R4` module type in Smile CDR.
- For **R5**, replace `PERSISTENCE_R4` with [`PERSISTENCE_R5`](/content/docs/modules/persistence_r5.html) for both repositories. Note that `ENDPOINT_PACKAGE_REGISTRY` does not currently support R5. The CMS-0057-F compliance IGs listed in this guide are all R4-based, and R5 equivalents are not yet established for these IGs.

## Contents

- [Step 1. Set up the environment](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#step-1-set-up-the-environment/index.html)
- [Step 2. Install external CodeSystems](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#step-2-install-external-codesystems/index.html)
  - [Option A: Remote terminology server](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#option-a-remote-terminology-server/index.html)
  - [Option B: Manual upload](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#option-b-manual-upload/index.html)
- [Step 3. Install terminology and validation resources](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#step-3-install-terminology-and-validation-resources/index.html)
  - [3a. Install required IGs](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#3a-install-required-igs/index.html)
  - [3b. Troubleshoot ValueSet expansion failures](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#3b-troubleshoot-valueset-expansion-failures/index.html)
- [\[Optional\] Step 4. Load example non-conformance resources](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#optional-step-4-load-example-non-conformance-resources/index.html)
- [Step 5. Verify terminology operations and profile validation](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#step-5-verify-terminology-operations-and-profile-validation/index.html)
  - [5a. Verify ValueSet expansion (`$expand`)](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#5a-verify-valueset-expansion-expand/index.html)
  - [5b. Verify code validation (`$validate-code`)](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#5b-verify-code-validation-validate-code/index.html)
  - [5c. Verify code lookup (`$lookup`)](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#5c-verify-code-lookup-lookup/index.html)
  - [5d. Validate resources against profiles (`$validate`)](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#5d-validate-resources-against-profiles-validate/index.html)
- [Step 6. Install other conformance resources](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#step-6-install-other-conformance-resources/index.html)
  - [6a. Install SearchParameters](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#6a-install-searchparameters/index.html)
  - [6b. Verify search](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#6b-verify-search/index.html)

## Step 1. Set up the environment

For larger deployments, separating conformance resources (StructureDefinitions, ValueSets, CodeSystems) from clinical data (`Patient`, `ExplanationOfBenefit`, `Coverage`) into two repositories allows each to be scaled and maintained independently. This guide uses that **two-repository layout**, with a **Conformance Repository** for conformance resources and a **Content Repository** for operational data, but a single repository can serve both roles. If you are using a single repository, all `{CONFORMANCE_*}` and `{CONTENT_*}` placeholders resolve to the same endpoints.

The user performing these steps needs the following [permissions](/content/docs/security/roles_and_permissions.html): [`PACKAGE_REGISTRY_WRITE`](/content/docs/security/roles_and_permissions.html#PACKAGE_REGISTRY_WRITE/index.html) (Steps 3, 4, and 6a), [`FHIR_UPLOAD_EXTERNAL_TERMINOLOGY`](/content/docs/security/roles_and_permissions.html#FHIR_UPLOAD_EXTERNAL_TERMINOLOGY/index.html) (Steps 2–3), [`FHIR_MANUAL_VALIDATION`](/content/docs/security/roles_and_permissions.html#FHIR_MANUAL_VALIDATION/index.html) (Step 5d), and [`ROLE_FHIR_TERMINOLOGY_READ`](/content/docs/security/roles_and_permissions.html#ROLE_FHIR_TERMINOLOGY_READ_CLIENT/index.html) (Steps 5a–5c). Alternatively, [`ROLE_SUPERUSER`](/content/docs/security/roles_and_permissions.html#ROLE_SUPERUSER/index.html) grants all of these.

Set up the modules below via the Web Admin Console or [Node Configuration Properties File](/content/docs/guide_installation/configuring_smile_cdr.html#node-config-properties-file/index.html). See [FHIR Storage (Relational) Module](/content/docs/fhir_storage_relational/fhir_storage_relational_module.html), [FHIR Endpoint Module](/content/docs/fhir_repository/fhir_endpoint_module.html), and [Package Registry Endpoint Module](/content/docs/validation_and_conformance/package_registry_endpoint_module.html) for details.

```properties
# ===== Conformance Repository - conformance resources (StructureDefinitions, ValueSets, CodeSystems, ConceptMaps, etc.) =====
module.conformance_persistence.type=PERSISTENCE_R4
module.conformance_persistence.config.search_parameter_seeding.support_default_search_parameters=true
module.conformance_persistence.config.scheduled_tasks.pre_expand_valuesets.enabled=true

# {CONFORMANCE_FHIR}
module.conformance_fhir_endpoint.type=ENDPOINT_FHIR_REST
module.conformance_fhir_endpoint.requires.PERSISTENCE_ALL=conformance_persistence
module.conformance_fhir_endpoint.config.base_url.fixed=https://cdr.acme.com:8000

# {CONFORMANCE_PKG_REGISTRY}
module.conformance_package_registry.type=ENDPOINT_PACKAGE_REGISTRY
module.conformance_package_registry.requires.PACKAGE_CACHE=conformance_persistence
module.conformance_package_registry.config.base_url.fixed=https://cdr.acme.com:8002

# ===== Content Repository - operational data + SearchParameters (Patient, ExplanationOfBenefit, Coverage, etc.) =====
module.content_persistence.type=PERSISTENCE_R4
module.content_persistence.config.dao_config.mark_resources_for_reindexing_after_sp_change=true
# [Optional] Required for Step 4 - allows the installer to auto-create stub targets for unresolved references.
module.content_persistence.config.dao_config.auto_create_placeholder_reference_targets.enabled=true

# {CONTENT_FHIR}
module.content_fhir_endpoint.type=ENDPOINT_FHIR_REST
module.content_fhir_endpoint.requires.PERSISTENCE_ALL=content_persistence
module.content_fhir_endpoint.config.base_url.fixed=https://cdr.acme.com:8010

# {CONTENT_PKG_REGISTRY}
module.content_package_registry.type=ENDPOINT_PACKAGE_REGISTRY
module.content_package_registry.requires.PACKAGE_CACHE=content_persistence
module.content_package_registry.config.base_url.fixed=https://cdr.acme.com:8012
```

Copy

Settings above can be updated (e.g. reverted back to original) once the setup is complete.

## Step 2. Install external CodeSystems

The IGs you will install in Step 3 reference large external terminologies (e.g. ICD-10-CM, SNOMED CT, CPT) that are not bundled in the IG packages. There are two ways to resolve them:

- With **Option A (Remote terminology server)**, Smile CDR forwards terminology operations to an external server. No downloads or format conversion required; `$validate-code`, `$lookup`, and on-demand `$expand` are handled by the remote server.
- With **Option B (Manual upload)**, each `CodeSystem` is downloaded and uploaded into the local repository. Required for `ValueSet` pre-expansion with hierarchy filters (`is-a`, `descendent-of`), or when a remote terminology server is not available.
Since a remote server can't cover pre-expansion with hierarchy filters, most deployments end up using both, with a remote server for some CodeSystems and manual upload for others.

**Option A: Remote terminology server**

Configure the  [Remote Terminology Service](/content/docs/validation_and_conformance/remote_terminology_services.html) on the `conformance_persistence` module. When enabled, `$validate-code`, `$lookup`, and `$expand` requests for external CodeSystems are forwarded to the remote server automatically.

**Limitation:** The background [pre-expansion job](https://hapifhir.io/hapi-fhir/docs/server_jpa/valueset_expansion.html) runs locally and cannot delegate to a remote server. ValueSets with hierarchy filters (`is-a`, `descendent-of`) on external CodeSystems will still fail to pre-expand unless those CodeSystems are also uploaded locally (Option B). If pre-expanded ValueSets are not required for your use case, the remote server alone is sufficient for validation and lookup.

**Option B: Manual upload**
Download and upload each `CodeSystem` locally. This is required when pre-expansion with hierarchy filters is needed, or when a remote terminology server is unavailable.

The table below lists external CodeSystems commonly referenced by the IGs installed in Step 3. Not all are required for every use case; load the ones your data actually uses.

| CodeSystem | URL | Source | Upload Format | HL7 Guidance |
| --- | --- | --- | --- | --- |
| ICD-10-CM | [hl7.org/fhir/sid/icd-10-cm](http://hl7.org/fhir/sid/icd-10-cm) | [CDC](https://ftp.cdc.gov/pub/health_statistics/nchs/publications/ICD10CM/) | XML (tabular) | [HL7 Guide](https://terminology.hl7.org/en/ICD.html) |
| ICD-10-PCS | [cms.gov/.../ICD10](http://www.cms.gov/Medicare/Coding/ICD10) | [CMS](https://www.cms.gov/Medicare/Coding/ICD10) | CSV | [HL7 Guide](https://terminology.hl7.org/en/ICD.html) |
| CPT | [ama-assn.org/go/cpt](http://www.ama-assn.org/go/cpt) | [AMA](https://www.ama-assn.org/practice-management/cpt) (licensed) | CSV | [HL7 Guide](https://terminology.hl7.org/en/CPT.html) |
| NDC | [hl7.org/fhir/sid/ndc](http://hl7.org/fhir/sid/ndc) | [FDA](https://www.fda.gov/drugs/drug-approvals-and-databases/national-drug-code-directory) | CSV | [HL7 Guide](https://terminology.hl7.org/en/NDC.html) |
| CMS Place of Service | [cms.gov/.../Place\_of\_Service\_Code\_Set](https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set) | [CMS](https://www.cms.gov/Medicare/Coding/place-of-service-codes) | CSV |  |
| CMS Present on Admission | [cms.gov/.../HospitalAcqCond/Coding](https://www.cms.gov/Medicare/Medicare-Fee-for-Service-Payment/HospitalAcqCond/Coding) | [CMS](https://www.cms.gov/Medicare/Medicare-Fee-for-Service-Payment/HospitalAcqCond/Coding) | CSV |  |
| MS-DRG | [cms.gov/.../MS-DRG-Classifications-and-Software](https://www.cms.gov/Medicare/Medicare-Fee-for-Service-Payment/AcuteInpatientPPS/MS-DRG-Classifications-and-Software) | [CMS](https://www.cms.gov/Medicare/Medicare-Fee-for-Service-Payment/AcuteInpatientPPS/MS-DRG-Classifications-and-Software) | CSV |  |
| X12 Claim Adjustment Reason Codes | [x12.org/codes/claim-adjustment-reason-codes](https://x12.org/codes/claim-adjustment-reason-codes) | [X12](https://x12.org/) | CSV |  |
| X12 Service Type Codes | [x12.org/codes/service-type-codes](https://x12.org/codes/service-type-codes) | [X12](https://x12.org/) | CSV |  |
| X12 Ambulance Transport Reason Codes | [x12.org/.../ambulance-transport-reason-codes](https://x12.org/codesystem.x12.org/ambulance-transport-reason-codes) | [X12](https://x12.org/) | CSV |  |
| X12 External Code 886 | [codesystem.x12.org/external/886](https://codesystem.x12.org/external/886) | [X12](https://x12.org/) | CSV |  |
| NUBC Patient Discharge Status | [nubc.org/.../PatDischargeStatus](https://www.nubc.org/CodeSystem/PatDischargeStatus) | NUBC (licensed) | CSV |  |
| NUBC Point of Origin | [nubc.org/.../PointOfOrigin](https://www.nubc.org/CodeSystem/PointOfOrigin) | NUBC (licensed) | CSV |  |
| NUBC Priority Type of Admission | [nubc.org/.../PriorityTypeOfAdmitOrVisit](https://www.nubc.org/CodeSystem/PriorityTypeOfAdmitOrVisit) | NUBC (licensed) | CSV |  |
| NUBC Revenue Codes | [nubc.org/.../RevenueCodes](https://www.nubc.org/CodeSystem/RevenueCodes) | NUBC (licensed) | CSV |  |
| NUBC Type of Bill | [nubc.org/.../TypeOfBill](https://www.nubc.org/CodeSystem/TypeOfBill) | NUBC (licensed) | CSV |  |
| ADA CDT (dental procedures) | [ada.org/cdt](http://www.ada.org/cdt) | [ADA](https://www.ada.org/) (licensed) | CSV |  |
| ADA Tooth Surface Codes | [terminology.hl7.org/.../ADAToothSurfaceCodes](http://terminology.hl7.org/CodeSystem/ADAToothSurfaceCodes) | [ADA](https://www.ada.org/) (licensed) | CSV |  |
| ADA Universal Tooth Designation | [terminology.hl7.org/.../ADAUniversalToothDesignationSystem](http://terminology.hl7.org/CodeSystem/ADAUniversalToothDesignationSystem) | [ADA](https://www.ada.org/) (licensed) | CSV |  |
| NCPDP Brand Generic Indicator | [terminology.hl7.org/.../NCPDPBrandGenericIndicator](http://terminology.hl7.org/CodeSystem/NCPDPBrandGenericIndicator) | [NCPDP](https://www.ncpdp.org/) | CSV |  |
| NCPDP Compound Code | [terminology.hl7.org/.../NCPDPCompoundCode](http://terminology.hl7.org/CodeSystem/NCPDPCompoundCode) | [NCPDP](https://www.ncpdp.org/) | CSV |  |
| NCPDP Dispensed as Written | [terminology.hl7.org/.../NCPDPDispensedAsWritten...](http://terminology.hl7.org/CodeSystem/NCPDPDispensedAsWrittenOrProductSelectionCode) | [NCPDP](https://www.ncpdp.org/) | CSV |  |
| NCPDP Prescription Origin Code | [terminology.hl7.org/.../NCPDPPrescriptionOriginCode](http://terminology.hl7.org/CodeSystem/NCPDPPrescriptionOriginCode) | [NCPDP](https://www.ncpdp.org/) | CSV |  |
| NCPDP Reject Code | [terminology.hl7.org/.../NCPDPRejectCode](http://terminology.hl7.org/CodeSystem/NCPDPRejectCode) | [NCPDP](https://www.ncpdp.org/) | CSV |  |
| SNOMED CT | [snomed.info/sct](http://snomed.info/sct) | [NLM UMLS](https://www.nlm.nih.gov/healthit/snomedct/) | RF2 ZIP | [HL7 Guide](https://terminology.hl7.org/en/SNOMEDCT.html) |
| LOINC | [loinc.org](http://loinc.org/) | [Regenstrief/LOINC](https://loinc.org/downloads/) | LOINC ZIP | [HL7 Guide](https://terminology.hl7.org/en/LOINC.html) |
| RxNorm | [nlm.nih.gov/.../rxnorm](http://www.nlm.nih.gov/research/umls/rxnorm) | [NLM UMLS](https://www.nlm.nih.gov/research/umls/rxnorm/docs/rxnormfiles.html) | CSV | [HL7 Guide](https://terminology.hl7.org/en/RxNorm.html) |
| CVX | [hl7.org/fhir/sid/cvx](http://hl7.org/fhir/sid/cvx) | [CDC](https://www2a.cdc.gov/vaccines/iis/iisstandards/vaccines.asp?rpt=cvx) | CSV | [HL7 Guide](https://terminology.hl7.org/en/CVX.html) |
| HCPCS | [cms.gov/.../HCPCSReleaseCodeSets](https://www.cms.gov/Medicare/Coding/HCPCSReleaseCodeSets) | [CMS](https://www.cms.gov/Medicare/Coding/HCPCSReleaseCodeSets) | CSV |  |
| NUCC Provider Taxonomy | [nucc.org/provider-taxonomy](http://nucc.org/provider-taxonomy) | [NUCC](https://nucc.org/) | CSV |  |

Upload each `CodeSystem` (see  [Uploading CodeSystems](/content/docs/terminology/uploading.html)). CodeSystems with a native Upload Format in the table above (XML, RF2 ZIP, LOINC ZIP) can be uploaded using their standard distribution files. CodeSystems listed as CSV must first be converted to a [Vocabulary Input File Format](/content/docs/terminology/uploading.html#vocabulary-input-file-formats/index.html). See [How Uploaded Terminology Interacts with IG Packages](/content/docs/terminology/uploading.html#uploaded-terminology-and-ig-packages/index.html) for details on how uploaded terminology interacts with the `content=not-present` placeholder CodeSystems created during IG installation.

After each upload, verify the `CodeSystem` was loaded correctly using `$lookup`:

```none
GET {CONFORMANCE_FHIR}/CodeSystem/$lookup?system=http://hl7.org/fhir/sid/icd-10-cm&code=I27.2
```

Copy

Expected result: `Parameters` with the code's display value (e.g. "Other secondary pulmonary hypertension").

Not every CodeSystem above may be needed for your use case, and conversely, some ValueSets may still fail to pre-expand once the IGs are installed if they reference a CodeSystem not covered here. See [Step 3](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#step-3-install-terminology-and-validation-resources/index.html) for troubleshooting those failures and re-expanding.

## Step 3. Install terminology and validation resources

Install the required IGs on the **conformance repository**, then confirm that all ValueSets pre-expanded successfully and troubleshoot any that didn't.

**3a. Install required IGs**

See  [NPM Packages and Implementation Guides](/content/docs/validation_and_conformance/packages_and_igs.html) for background on package installation.

The following IGs are commonly required for CMS-0057-F compliance (in package\_name#package\_version format):

- hl7.fhir.us.carin-bb#2.1.0
- hl7.fhir.us.davinci-pdex#2.1.0
- hl7.fhir.us.davinci-pdex-plan-net#1.2.0
- hl7.fhir.us.davinci-drug-formulary#2.1.0

For each package, invoke the install operation via `PUT``{CONFORMANCE_PKG_REGISTRY}/write/install/by-spec`:

```json
{
  "name": "hl7.fhir.us.carin-bb",
  "version": "2.1.0",
  "installMode": "INSTALL_ONLY",
  "installResourceTypes": ["NamingSystem", "CodeSystem", "ValueSet", "StructureDefinition", "ConceptMap"],
  "fetchDependencies": true
}
```

Copy

Key parameters to note:

- **`installResourceTypes`** excludes `SearchParameter` from this installation. SearchParameters will be installed separately in Step 6a on the content repository, where they are needed for search indexing. Depending on your use case, you may need to add other resource types (e.g. `OperationDefinition`, `Questionnaire`, `Measure`, `Library`). See [Customizing Installed Resource Types](/content/docs/validation_and_conformance/packages_and_igs.html#customizing-resource-types/index.html) for common candidates and how this parameter interacts with defaults.
- Setting **`fetchDependencies`** to `true` automatically downloads and installs all transitive dependencies. Alternatively, you can install all dependency packages explicitly in bottom-up order (e.g. `hl7.fhir.r4.core`, then `hl7.fhir.us.core`, then the main IGs) with `fetchDependencies` set to `false`. This gives full control over which dependency versions are installed, but requires knowing the full dependency tree in advance.
- \[Optional\] For large IGs with many dependencies, consider using [asynchronous installation](/content/docs/validation_and_conformance/package_registry_endpoint_module.html#batch-processing/index.html) with the `Prefer: respond-async` header to avoid HTTP timeouts.

If the install operation fails, see [Troubleshooting Package Installation](/content/docs/validation_and_conformance/packages_and_igs.html#troubleshooting/index.html) for common issues including broken dependencies, network failures, FHIR version mismatches, and resource version conflicts.

**3b. Troubleshoot ValueSet expansion failures**

After installation, the  [pre-expansion job](https://hapifhir.io/hapi-fhir/docs/server_jpa/valueset_expansion.html) will attempt to expand all installed ValueSets. Some may still fail — most commonly because they reference an external CodeSystem that wasn't uploaded in [Step 2](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#option-b-manual-upload/index.html), or one outside that table entirely. Use [Checking Expansion Status](/content/docs/terminology/valueset_expansion.html#checking-expansion-status/index.html) to see which ValueSets failed, then [Troubleshooting Expansion Failures](/content/docs/terminology/valueset_expansion.html#troubleshooting/index.html) to diagnose why — that page and [Re-expanding ValueSets after uploading external CodeSystems](/content/docs/terminology/valueset_expansion.html#re-expanding-after-codesystem-upload/index.html) walk through uploading the missing CodeSystem and re-expanding as a pair.

If you are using Option A (remote terminology server) exclusively and pre-expanded ValueSets are not required for your use case, you can skip to [Step 4](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#optional-step-4-load-example-non-conformance-resources/index.html). Otherwise, upload any missing CodeSystem following the same procedure described in Step 2, then re-expand the affected ValueSets.

As a quick check, verify that a previously failing `ValueSet` now expands:

```none
GET {CONFORMANCE_FHIR}/ValueSet/$expand?url=http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBEOBInstitutionalClaimSubType
```

Copy

Expected result: a `ValueSet` with a populated `expansion`. If it still fails, re-check the `CodeSystem` upload with `$lookup` as described in Step 2. Step 5 covers broader spot-checking of terminology operations across all installed IGs.

## \[Optional\] Step 4. Load example (non-conformance) resources

Load IG-published example resources into the **content repository** to have ready-made data for profile validation in [Step 5d](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#5d-validate-resources-against-profiles-validate/index.html) and search verification in [Step 6b](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#6b-verify-search/index.html). Skip this step if you will supply your own test data.

> **Prerequisite:**`auto_create_placeholder_reference_targets` must be enabled (Step 1), as example resources reference each other across types. See [References between instance resources](/content/docs/guide_installation/pre_seeding.html#additional-resource-folders/index.html) for details.

For each package, install using `PUT``{CONTENT_PKG_REGISTRY}/write/install/by-spec`:

```json
{
  "name": "hl7.fhir.us.carin-bb",
  "version": "2.1.0",
  "installMode": "INSTALL_ONLY",
  "installResourceTypes": ["Patient", "Coverage", "ExplanationOfBenefit", "Organization",\
                            "Practitioner", "PractitionerRole", "InsurancePlan", "Provenance"],
  "additionalResourceFolders": ["example"],
  "fetchDependencies": false
}
```

Copy

`installResourceTypes` lists the instance resource types present in the `example` folder. `fetchDependencies` is `false` because dependencies were already installed in Step 3.

Repeat for each of the four packages listed in [Step 3](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#step-3-install-terminology-and-validation-resources/index.html).

## Step 5. Verify terminology operations and profile validation

Verify that terminology operations and profile validation work correctly against the conformance repository. See [Validation](/content/docs/validation_and_conformance/introduction.html) and [Conformance Data](/content/docs/validation_and_conformance/conformance_data.html) for background.

**5a. Verify ValueSet expansion (`$expand`)**
Confirm the REST API returns correct expansion results.

```none
GET {CONFORMANCE_FHIR}/ValueSet/$expand?url=http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBClaimCareTeamRole
```

Copy

Expected result: expansion containing codes such as `attending`, `referring`, `performing`, `supervising`.

```none
GET {CONFORMANCE_FHIR}/ValueSet/$expand?url=http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBSupportingInfoType
```

Copy

Expected result: expansion containing codes such as `clmrecvddate`, `billingnetworkcontractingstatus`.

Repeat with at least one `ValueSet` from each installed IG, including ValueSets that depend on external CodeSystems uploaded in Step 2. If an expansion returns an error or empty result, investigate using the approach in Step 3.
**5b. Verify code validation (`$validate-code`)**
Confirm that code validation against installed ValueSets works end-to-end.

```none
GET {CONFORMANCE_FHIR}/ValueSet/$validate-code?url=http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBClaimCareTeamRole&code=referring&system=http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole
```

Copy

Expected result: `Parameters` with `result = true`.

```none
GET {CONFORMANCE_FHIR}/ValueSet/$validate-code?url=http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBClaimCareTeamRole&code=nonexistent&system=http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole
```

Copy

Expected result: `Parameters` with `result = false`.

**If you uploaded CodeSystems locally (Option B):** a `result = true` on a valid code alone does not confirm local content is being consulted. For `content=not-present` CodeSystems with no local concepts, the server falls through to the next validator in the chain rather than returning "not found" (see  [Debugging missing `content=not-present` CodeSystems](/content/docs/terminology/valueset_expansion.html#debugging-not-present-codesystem/index.html)). Test with a **known invalid code** to confirm local content is authoritative:

```none
GET {CONFORMANCE_FHIR}/ValueSet/$validate-code?url=http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBDiagnosisType&code=INVALID-CODE&system=http://hl7.org/fhir/sid/icd-10-cm
```

Copy

Expected result: `Parameters` with `result = false`. Use `$lookup` (Step 5c) as an additional confirmation. A `CodeSystem` with local concepts will return a display value; one without will not.

**5c. Verify code lookup (`$lookup`)**
Confirm that `$lookup` returns display values for installed CodeSystems.

```none
GET {CONFORMANCE_FHIR}/CodeSystem/$lookup?system=http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType&code=clmrecvddate
```

Copy

Expected result: `Parameters` with `display = "Claim Received Date"` (or similar display text from the CodeSystem).

Repeat with codes from external CodeSystems loaded in Step 2. A successful `$lookup` with a `display` value confirms those CodeSystems are loaded and authoritative locally.
**5d. Validate resources against profiles (`$validate`)**
Use the `$validate` operation to confirm that profile validation is enforcing constraints from the installed IGs. Pick at least one profile from each installed IG.

To do this you need example resources to validate against. If you completed  [Step 4](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html#optional-step-4-load-example-non-conformance-resources/index.html), retrieve an example from the content repository and `POST` it directly. Otherwise, download the examples from the IG specification websites:

- [CARIN BB 2.1.0](https://hl7.org/fhir/us/carin-bb/STU2.1/artifacts.html#example-example-instances), e.g. `EOBProfessional1`, `Coverage1`, `Patient1`
- [Da Vinci PDex 2.1.0](https://hl7.org/fhir/us/davinci-pdex/STU2.1/artifacts.html#example-example-instances), e.g. `MemberMatchExample`
- [Da Vinci Plan Net 1.2.0](https://hl7.org/fhir/us/davinci-pdex-plan-net/STU1.2/artifacts.html#example-example-instances), e.g. `AcmeOfCTStdNet`, `PharmChainAOrg`
- [Da Vinci Drug Formulary 2.1.0](https://hl7.org/fhir/us/davinci-drug-formulary/STU2.1/artifacts.html#example-example-instances), e.g. `FormularyD1002`, `FormularyItem-D1002-1000091`

For a **positive test**, `POST` an example resource as the request body to `$validate` (e.g. `EOBProfessional1` from CARIN BB):

```none
POST {CONFORMANCE_FHIR}/ExplanationOfBenefit/$validate
Content-Type: application/fhir+json

<resource body>
```

Copy

Expected result: `OperationOutcome` with no `error`-severity issues (warnings are acceptable).

For a **negative test**, remove a required element (e.g. `type`) from the example resource and `POST` it to `$validate` again. Expected result: `OperationOutcome` with an `error`-severity issue indicating the missing element. This confirms profile validation is actively enforcing constraints.

**Profiles to spot-check (at least one per IG):**

| IG | Profile | Resource Type | Example |
| --- | --- | --- | --- |
| CARIN BB | `C4BB-ExplanationOfBenefit-Professional-NonClinician` | `ExplanationOfBenefit` | `EOBProfessional1` |
| CARIN BB | `C4BB-Coverage` | `Coverage` | `Coverage1` |
| Da Vinci PDex | `pdex-provenance` | `Provenance` | Published IG examples |
| Da Vinci Plan Net | `plannet-Organization` | `Organization` | `AcmeOfCTStdNet` |
| Da Vinci Drug Formulary | `usdf-PayerInsurancePlan` | `InsurancePlan` | `PayerInsurancePlanA1002` |

## Step 6. Install other conformance resources

Install `SearchParameter` and any other resource types excluded from Step 3 that belong on the **content repository**, such as `Subscription` or `OperationDefinition`. See [Custom Search Parameters](/content/docs/fhir_standard/fhir_search_custom_search_parameters.html) and [Customizing Installed Resource Types](/content/docs/validation_and_conformance/packages_and_igs.html#customizing-resource-types/index.html) for details.

**6a. Install SearchParameters**
Iterate through the same packages and install only `SearchParameter` resources using the content Package Registry:

`PUT``{CONTENT_PKG_REGISTRY}/write/install/by-spec`

```json
{
  "name": "hl7.fhir.us.carin-bb",
  "version": "2.1.0",
  "installMode": "INSTALL_ONLY",
  "installResourceTypes": ["SearchParameter", "Subscription"],
  "additionalResourceFolders": ["example"],
  "fetchDependencies": true
}
```

Copy

The optional `additionalResourceFolders` installs IG-published example resources (`Patient`, `Coverage`, `ExplanationOfBenefit`, etc.) alongside the SearchParameters, which is useful for verifying search in Step 6b because these examples contain real values in the FHIR elements each SearchParameter indexes (e.g. `ExplanationOfBenefit.type`, `ExplanationOfBenefit.billablePeriod`), so the Step 6b queries will return matches immediately without loading additional data.

**6b. Verify search**
Before verifying, ensure you have content resources (e.g. `Patient`, `ExplanationOfBenefit`, `Coverage`, `Organization`) in the **content repository**. You have two options:

- If you included `"additionalResourceFolders": ["example"]` in the Step 6a install spec, the **IG-published examples** are already loaded and no further action is needed.
- Alternatively, upload **your own resources** (`Patient`, `ExplanationOfBenefit`, `Coverage`, or other resources) via `POST` or `PUT` to `{CONTENT_FHIR}`. Use your own test data or production-representative samples that exercise the fields the SearchParameters index.

Confirm the SearchParameters were installed:

```none
GET {CONTENT_FHIR}/SearchParameter?name=ExplanationOfBenefit-type
```

Copy

Then search content resources using the installed SearchParameters:

```none
GET {CONTENT_FHIR}/ExplanationOfBenefit?patient=Patient/Patient1
GET {CONTENT_FHIR}/ExplanationOfBenefit?type=professional
GET {CONTENT_FHIR}/ExplanationOfBenefit?service-date=ge2026-01-01
```

Copy

Expected result: the matching resources are returned. If a search parameter returns no results when matches are expected, verify that reindexing has completed.

[Consent Tutorial](/content/docs/guide_tutorials/tutorial_consent.html)

CMS-0057-F IG Setup Tutorial

Tutorials

[Introduction](/content/docs/guide_tutorials/tutorial_intro.html)
[Integration Testing Tutorial](/content/docs/guide_tutorials/tutorial_integration_test.html)
[Custom Operations Tutorial](/content/docs/guide_tutorials/tutorial_custom_operations.html)
[HL7 v2.x Ingestion Tutorial](/content/docs/guide_tutorials/tutorial_processing_hl7_v2x_feeds.html)
[Federated OAuth2/OIDC Tutorial](/content/docs/guide_tutorials/tutorial_federated_oauth2.html)
[MDM Tutorial](/content/docs/guide_tutorials/tutorial_mdm.html)
[MDM UI Tutorial](/content/docs/guide_tutorials/tutorial_mdm_ui.html)
[MDM First Golden Resource Tutorial](/content/docs/guide_tutorials/first_golden_resource.html)
[MDM Advanced Rule Authoring Tutorial](/content/docs/guide_tutorials/advanced_rule_authoring.html)
[MDM Web UI Admin Setup Tutorial](/content/docs/guide_tutorials/mdm_web_ui_admin_setup.html)
[CDA Import Tutorial](/content/docs/guide_tutorials/tutorial_cda_import.html)
[CDA Export Tutorial](/content/docs/guide_tutorials/tutorial_cda_export.html)
[CDA Export - Custom Narrative Generation Tutorial](/content/docs/guide_tutorials/tutorial_cda_export_narrative_generation.html)
[CDA Import JSON example](/content/docs/guide_tutorials/tutorial_cda_import_json.html)
[CDA Export Template JSON example](/content/docs/guide_tutorials/tutorial_cda_export_json.html)
[Consent Tutorial](/content/docs/guide_tutorials/tutorial_consent.html)
[CMS-0057-F IG Setup Tutorial](/content/docs/guide_tutorials/tutorial_terminology_cms57f.html)
