By EHR

MEDITECH bulk FHIR export for research on Expanse.

Clinical Extract connects to MEDITECH Expanse as a read-only backend app registered through MEDITECH Greenfield and exports the study cohort’s Group through Expanse’s certified US Core FHIR R4 API. You receive the approved variables as study.csv, with a data dictionary.

1 Works with MEDITECH

MEDITECH Expanse support.

Expanse’s certified API (ONC §170.315(g)(10)) exports a Group of patients through HL7 FHIR Bulk Data Access, authorized with SMART Backend Services. Clinical Extract reads the token endpoint from your service base’s SMART configuration, requests a token with read scopes, kicks off the Group export, polls the status and downloads the files, all in your environment.

MEDITECH data extraction uses the same Group export for every protocol: a new cohort and a new variable list, on the connection your organization already enabled.

The study cohort as NDJSON, flattened to CSV
Patient, Encounter, Condition, Observation, MedicationRequest and Procedure files land in your study folder. Clinical Extract turns the approved variables into study.csv and records each column’s source in data-dictionary.json.
Coded columns
Diagnoses, results, medications and procedures come out as ICD-10-CM, LOINC, RxNorm and SNOMED CT codes, each column traced to its FHIR element.
The oncology lens
ER, PR, HER2, PD-L1, EGFR, KRAS, BRAF, ALK, MSI and TNM clinical and pathologic arrive as named columns.
Roster pull and the cohort builder
Match a patient list against Expanse with graded results, or build the cohort from coded criteria and read the feasibility count before the export.

2 Connecting

Registering through Greenfield and enabling Expanse.

The MEDITECH setup runs once, through Greenfield and your Expanse.

  1. Register. Through MEDITECH Greenfield (greenfield.meditech.com), Clinical Extract is a backend app on Expanse’s certified US Core FHIR R4 API, with a signed-JWT client authentication (RS384) and its public key served as a JWKS. Its scopes are one system/<Resource>.read scope per exported type plus system/Group.read, and a client ID is issued.
  2. Activate. Your organization enables the app on your Expanse, gives Clinical Extract the service base URL (the certified endpoint your organization publishes) and names the study Group.
  3. Export. Clinical Extract reads token_endpoint from {service-base}/.well-known/smart-configuration, signs a JWT with the private key that stays in your environment, gets a token with read scopes only, and runs the Group export.

We build interfaces and integrations for MEDITECH as well.

Connecting Clinical Extract to MEDITECHThree numbered steps from left to right. Step 1, register, at MEDITECH Greenfield (greenfield.meditech.com), outside your environment: Certified API: Expanse, US Core FHIR R4, (g)(10); Client authentication: signed JWT, RS384, Clinical Extract’s public key, as a JWKS; System scopes: system/Patient.read, system/Group.read, system/Encounter.read, system/Condition.read, system/Observation.read, system/MedicationRequest.read, system/Procedure.read; Issued: client ID. An arrow carries the client ID to step 2. Step 2, activate, at Your MEDITECH Expanse (your organization): Application: enabled on your Expanse; Service base URL: your Expanse FHIR R4 endpoint; Group: the study cohort, by Group ID. An arrow carries the service base and Group ID to step 3. Step 3, export, from Clinical Extract in your environment: request GET {service-base}/.well-known/smart-configuration (token_endpoint, from the SMART configuration); request POST {token_endpoint} (grant_type=client_credentials, client_assertion: JWT signed RS384, scope=system/Patient.read …); request GET {service-base}/Group/{id}/$export (?_type=Patient,Encounter,Condition,Observation,MedicationRequest,Procedure, Prefer: respond-async), highlighted; response 202 Accepted (Content-Location: {status-url}); request GET {status-url} (202 Accepted while the export runs, with Retry-After); response 200 OK, JSON manifest (transactionTime, request,, requiresAccessToken, error[],, output[{type, url, count}]); request GET {output-url} (NDJSON, one resource per line); result study.csv, data-dictionary.json (flattened, approved variables only).1REGISTERMEDITECH Greenfieldgreenfield.meditech.comCERTIFIED APIExpanse, US Core FHIR R4, (g)(10)CLIENT AUTHENTICATIONsigned JWT, RS384Clinical Extract’s public key, asa JWKSSYSTEM SCOPESsystem/Patient.readsystem/Group.readsystem/Encounter.readsystem/Condition.readsystem/Observation.readsystem/MedicationRequest.readsystem/Procedure.readISSUEDclient ID2ACTIVATEYour MEDITECH Expanseyour organizationAPPLICATIONenabled on your ExpanseSERVICE BASE URLyour Expanse FHIR R4 endpointGROUPthe study cohort, by Group ID3EXPORTClinical Extractin your environmentrequestresponseGET {service-base}/.well-known/smart-configurationtoken_endpoint, from the SMARTconfigurationPOST {token_endpoint}grant_type=client_credentialsclient_assertion: JWT signed RS384scope=system/Patient.read …GET {service-base}/Group/{id}/$export?_type=Patient,Encounter,Condition,Observation,MedicationRequest,ProcedurePrefer: respond-async202 AcceptedContent-Location: {status-url}GET {status-url}202 Accepted while the exportruns, with Retry-After200 OK, JSON manifesttransactionTime, request,requiresAccessToken, error[],output[{type, url, count}]GET {output-url}NDJSON, one resource per linestudy.csv, data-dictionary.jsonflattened, approved variables onlyclient IDservice baseGroup ID
Connecting Clinical Extract to MEDITECHThree numbered steps from left to right. Step 1, register, at MEDITECH Greenfield (greenfield.meditech.com), outside your environment: Certified API: Expanse, US Core FHIR R4, (g)(10); Client authentication: signed JWT, RS384, Clinical Extract’s public key, as a JWKS; System scopes: system/Patient.read, system/Group.read, system/Encounter.read, system/Condition.read, system/Observation.read, system/MedicationRequest.read, system/Procedure.read; Issued: client ID. An arrow carries the client ID to step 2. Step 2, activate, at Your MEDITECH Expanse (your organization): Application: enabled on your Expanse; Service base URL: your Expanse FHIR R4 endpoint; Group: the study cohort, by Group ID. An arrow carries the service base and Group ID to step 3. Step 3, export, from Clinical Extract in your environment: request GET {service-base}/.well-known/smart-configuration (token_endpoint, from the SMART configuration); request POST {token_endpoint} (grant_type=client_credentials, client_assertion: JWT signed RS384, scope=system/Patient.read …); request GET {service-base}/Group/{id}/$export (?_type=Patient,Encounter,Condition,Observation,MedicationRequest,Procedure, Prefer: respond-async), highlighted; response 202 Accepted (Content-Location: {status-url}); request GET {status-url} (202 Accepted while the export runs, with Retry-After); response 200 OK, JSON manifest (transactionTime, request,, requiresAccessToken, error[],, output[{type, url, count}]); request GET {output-url} (NDJSON, one resource per line); result study.csv, data-dictionary.json (flattened, approved variables only).1REGISTERMEDITECH Greenfieldgreenfield.meditech.comCERTIFIED APIExpanse, US Core FHIR R4, (g)(10)CLIENT AUTHENTICATIONsigned JWT, RS384Clinical Extract’s public key, as a JWKSSYSTEM SCOPESsystem/Patient.readsystem/Group.readsystem/Encounter.readsystem/Condition.readsystem/Observation.readsystem/MedicationRequest.readsystem/Procedure.readISSUEDclient IDclient ID2ACTIVATEYour MEDITECH Expanseyour organizationAPPLICATIONenabled on your ExpanseSERVICE BASE URLyour Expanse FHIR R4 endpointGROUPthe study cohort, by Group IDservice baseGroup ID3EXPORTClinical Extractin your environmentrequestresponseGET {service-base}/.well-known/smart-configurationtoken_endpoint, from the SMARTconfigurationPOST {token_endpoint}grant_type=client_credentialsclient_assertion: JWT signed RS384scope=system/Patient.read …GET {service-base}/Group/{id}/$export?_type=Patient,Encounter,Condition,Observation,MedicationRequest,ProcedurePrefer: respond-async202 AcceptedContent-Location: {status-url}GET {status-url}202 Accepted while the export runs, withRetry-After200 OK, JSON manifesttransactionTime, request,requiresAccessToken, error[],output[{type, url, count}]GET {output-url}NDJSON, one resource per linestudy.csv, data-dictionary.jsonflattened, approved variables only
Figure 1. Connecting Clinical Extract to MEDITECH. Clinical Extract is registered once through MEDITECH Greenfield as a backend app on Expanse’s certified US Core FHIR R4 API; your organization enables it on your Expanse and gives the service base URL; Clinical Extract reads the token endpoint from that base’s SMART configuration and runs the Group export in your environment. Resource lists and URLs are abridged.

3 Export time

Export time on Expanse.

An Expanse export for a 212-patient study reads only that cohort’s records and finishes in hours. Clinical Extract follows Retry-After while it polls the status URL, then downloads the files the manifest lists and writes the CSV and its dictionary.

Every header of the kickoff, status and manifest exchange is in our guide to bulk FHIR export.

4 Facts

MEDITECH connection facts.

Table 1. Endpoint, registration, authentication, export type and output on MEDITECH. Checked September 2026.
Endpoint Your Expanse service base URL, the certified US Core FHIR R4 endpoint your organization publishes; the token endpoint read from {service-base}/.well-known/smart-configuration
Registration MEDITECH Greenfield (greenfield.meditech.com): a backend app on Expanse’s (g)(10) API, Clinical Extract’s public key as a JWKS, one system/<Resource>.read scope per exported type plus system/Group.read; a client ID
Authentication SMART Backend Services: a JWT signed RS384 with Clinical Extract’s private key, exchanged at the token_endpoint the SMART configuration names for an access token with one system/<Resource>.read scope per exported type plus system/Group.read
Export type Group export: GET {service-base}/Group/{group-id}/$export with _type; 202 Accepted with a Content-Location status URL
Status and files 202 with Retry-After while the export runs; 200 with the JSON manifest; NDJSON files fetched with the bearer token, one resource per line
Output study.csv (UTF-8, one row per cohort patient, one column per approved variable) with data-dictionary.json (description, fhirSource and example per column); the NDJSON files and the manifest kept beside them in your study folder

The table scrolls sideways.

Sources: MEDITECH Greenfield, US Core FHIR R4, HL7 Bulk Data Access.

5 Specimens

What the exchange and the output look like.

Every value is synthetic. The cohort is a 212-patient breast cancer study with 24 approved variables; the manifest counts and the row shown come from it.

Listing 1. The export kickoff: one request for the study cohort's Group and the resource types the protocol names, answered at once with the status URL.
GET {service-base}/Group/{group-id}/$export
    ?_type=Patient,Encounter,Condition,Observation,MedicationRequest,Procedure
Accept: application/fhir+json
Prefer: respond-async
Authorization: Bearer {access token}

202 Accepted
Content-Location: {status-url}
Listing 2. The completed status response: the manifest lists one NDJSON file per requested type with its line count, and says the files need the bearer token.
{
  "transactionTime": "2026-09-28T14:02:11Z",
  "request": "{service-base}/Group/{group-id}/$export?_type=Patient,Encounter,Condition,Observation,MedicationRequest,Procedure",
  "requiresAccessToken": true,
  "output": [
    { "type": "Patient", "url": "{file-url-1}", "count": 212 },
    { "type": "Encounter", "url": "{file-url-2}", "count": 3120 },
    { "type": "Condition", "url": "{file-url-3}", "count": 1684 },
    { "type": "Observation", "url": "{file-url-4}", "count": 48310 },
    { "type": "MedicationRequest", "url": "{file-url-5}", "count": 3905 },
    { "type": "Procedure", "url": "{file-url-6}", "count": 912 }
  ],
  "error": []
}
Listing 3. One line of Observation.ndjson: a complete FHIR resource per line, here the estrogen receptor status of patient eKx3p9Qa (LOINC 16112-5; SNOMED CT 10828004, Positive).
{"resourceType":"Observation","id":"eObs-3f9a","status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"laboratory"}]}],"code":{"coding":[{"system":"http://loinc.org","code":"16112-5","display":"Estrogen receptor [Interpretation] in Tissue"}]},"subject":{"reference":"Patient/eKx3p9Qa"},"effectiveDateTime":"2024-03-20","valueCodeableConcept":{"coding":[{"system":"http://snomed.info/sct","code":"10828004","display":"Positive"}]}}
Listing 4. study.csv, the header row and row 1 of 212: one row per patient in the cohort, one column per approved variable (10 of 24 columns shown). Values are synthetic.
patient_ref,birth_year,gender,dx_code,dx_date,stage_group,er_status,pr_status,her2_status,first_chemo
eKx3p9Qa,1961,female,C50.412,2024-03-14,IIA,Positive,Positive,Negative,paclitaxel
Listing 5. The er_status entry in data-dictionary.json: the description with its code system, the FHIR element the value came from, and an example value.
{
  "er_status": {
    "description": "Estrogen receptor status (LOINC 16112-5)",
    "fhirSource": "Observation.valueCodeableConcept",
    "example": "Positive"
  }
}

6 Questions

Questions about MEDITECH

Does MEDITECH support bulk FHIR export?

MEDITECH Expanse is certified to ONC §170.315(g)(10), and its US Core FHIR R4 API exposes the Group export with backend-services authorization. Clinical Extract runs it as a backend app registered through Greenfield.

What is the service base URL?

The certified FHIR R4 endpoint your organization publishes for its Expanse. Clinical Extract reads the token endpoint from that base’s SMART configuration, so the only address you hand over is the base itself.

What does our organization set up?

The backend app on your Expanse, one time. After that, each study needs only its Group ID.

Which files does a MEDITECH export produce?

study.csv and data-dictionary.json for the analysts, with the NDJSON files and the manifest from Expanse kept in the same study folder.

Next

See Clinical Extract run on one of your studies.

Tell us which EHR you run and what the study or registry needs. We reply within one business day to set a meeting time.

Request a demo