This project contains FHIR Shorthand (FSH) definitions for custom FHIR profiles used with Medplum. It includes Patient and HealthcareService profiles with custom vocabularies.
The project uses FHIR Shorthand (FSH) to define custom FHIR profiles. FSH is a domain-specific language for defining FHIR Implementation Guides, profiles, extensions and other FHIR artifacts.
Current profiles:
MedplumTestPatient: Extends the base FHIR Patient resource and requires a birth dateServiceManagementHealthcareService: Extends HealthcareService with custom service types and categories
The project includes custom vocabularies for healthcare service classification:
ServiceTypes: Defines service domains (task management, order management, etc.)ServiceCategories: Defines specific service categories (lab orders, imaging orders, etc.)- Corresponding value sets that reference these code systems
├── src/
│ └── profiles/ # FSH profile definitions
│ ├── patient-test.fsh # Patient profile
│ └── health-care-service.fsh # HealthcareService profile and vocabularies
├── dist/ # Built FHIR artifacts (generated)
├── sushi-config.yaml # SUSHI configuration
└── package.json
- Clone this repository
- Install dependencies:
npm installTo build the FSH profiles into FHIR JSON resources:
npm run build:profilesThis will process the FSH files in src/profiles and output the generated FHIR resources to the dist directory.
- FHIR Version: 4.0.1
- Canonical URL: https://medplum.com/profiles/example-fsh-profiles
To create new profiles:
- Add new FSH files to the src/profiles directory
- Run the build command to validate and compile
- Find the generated FHIR resources in the dist directory
The outputted FHIR resources in the dist directory are StructureDefinitions with two blocks: snapshot, which is the full specification of the schema, and differential, the difference between this profile and the profile it extends. The server tooling only looks at snapshot, so while differential can be left in, it also can be safely removed if we want to keep the resource smaller.
The ServiceManagementHealthcareService profile enables consistent categorization of healthcare services by:
- Requiring exactly one service type and category
- Using custom value sets through required bindings
- Marking these fields as must-support (MS)
Example use cases include:
- Organizing clinical task management services
- Categorizing order management systems
- Structuring scheduling and referral services