Skip to content

ZarishSphere-Platform/zarish-fhir-profiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Zarish FHIR Profiles

Part of the ZarishSphere Platform - A No-Code FHIR Healthcare Data Management System

This repository contains FHIR profile definitions, implementation guides, and conformance resources for the ZarishSphere Platform. It defines how FHIR resources should be structured and constrained for use in the platform.

πŸš€ Technology Stack

  • FHIR Version: R4 (4.0.1)
  • Profiling Tool: FHIR Shorthand (FSH)
  • IG Publisher: FHIR IG Publisher
  • Documentation: MkDocs Material with Mermaid diagrams

πŸ“‹ Prerequisites

Checking Your Installation

java -version    # Should show Java 11 or higher
node --version   # Should show v18.x or higher
python3 --version # Should show Python 3.8 or higher

πŸ› οΈ Step-by-Step Development Setup

Step 1: Clone the Repository

cd ~/Desktop
git clone https://github.com/ZarishSphere-Platform/zarish-fhir-profiles.git
cd zarish-fhir-profiles

Step 2: Install SUSHI (FSH Compiler)

# Install SUSHI globally
npm install -g fsh-sushi

# Verify installation
sushi --version

Step 3: Install IG Publisher

# Download IG Publisher
curl -L https://github.com/HL7/fhir-ig-publisher/releases/latest/download/publisher.jar -o publisher.jar

# Or use the update script
./_updatePublisher.sh

Step 4: Build the Implementation Guide

# Compile FSH to FHIR
sushi .

# Run IG Publisher
java -jar publisher.jar -ig ig.ini

The output will be in the output directory.

Step 5: View the Implementation Guide

# Open in browser
open output/index.html

# Or serve with a local server
cd output
python3 -m http.server 8000

πŸ“ Project Structure

zarish-fhir-profiles/
β”œβ”€β”€ input/
β”‚   β”œβ”€β”€ fsh/                    # FHIR Shorthand definitions
β”‚   β”‚   β”œβ”€β”€ profiles/          # Profile definitions
β”‚   β”‚   β”œβ”€β”€ extensions/        # Extension definitions
β”‚   β”‚   β”œβ”€β”€ valuesets/         # Value set definitions
β”‚   β”‚   └── examples/          # Example instances
β”‚   β”œβ”€β”€ pagecontent/           # IG narrative content
β”‚   └── images/                # Diagrams and images
β”œβ”€β”€ docs/                      # MkDocs documentation
β”‚   β”œβ”€β”€ index.md
β”‚   β”œβ”€β”€ profiles/
β”‚   β”œβ”€β”€ extensions/
β”‚   └── guides/
β”œβ”€β”€ output/                    # Generated IG (gitignored)
β”œβ”€β”€ mkdocs.yml                # MkDocs configuration
β”œβ”€β”€ ig.ini                    # IG Publisher configuration
β”œβ”€β”€ sushi-config.yaml         # SUSHI configuration
└── README.md

πŸ“š Defined Profiles

Patient Profiles

  • ZarishPatient: Extended patient profile with Bangladesh-specific extensions
  • ZarishPediatricPatient: Specialized profile for pediatric patients

Clinical Profiles

  • ZarishObservation: Vital signs and clinical observations
  • ZarishCondition: Diagnoses and health conditions
  • ZarishMedicationRequest: Medication prescriptions
  • ZarishEncounter: Patient encounters and visits

Administrative Profiles

  • ZarishPractitioner: Healthcare provider information
  • ZarishOrganization: Healthcare organization details
  • ZarishLocation: Facility and location information

πŸ” Profile Features

Extensions

  • Bangladesh National ID: Extension for national identification
  • Religion: Patient religious affiliation
  • Ethnicity: Ethnic background
  • Occupation: Patient occupation
  • Emergency Contact: Extended emergency contact information

Terminology Bindings

All profiles use appropriate value sets from:

  • SNOMED CT
  • LOINC
  • ICD-10
  • Custom Bangladesh-specific terminologies

πŸ“– Documentation

Comprehensive documentation is available at: https://zarishsphere-platform.github.io/zarish-fhir-profiles/

The documentation includes:

  • Profile definitions with constraints
  • Extension documentation
  • Usage examples
  • Implementation guides
  • Interactive diagrams

Building Documentation Locally

# Install MkDocs Material
pip install mkdocs-material mkdocs-mermaid2-plugin

# Serve documentation
mkdocs serve

# Build documentation
mkdocs build

πŸ”§ Available Commands

Command Description
sushi . Compile FSH to FHIR JSON
java -jar publisher.jar -ig ig.ini Build Implementation Guide
mkdocs serve Serve documentation locally
mkdocs build Build documentation

πŸ§ͺ Validation

Validate Profiles

# Compile FSH
sushi .

# Validate with IG Publisher
java -jar publisher.jar -ig ig.ini

Validate Examples

# All examples are validated during IG build
# Check output/qa.html for validation results

πŸ“ Creating New Profiles

Step 1: Create FSH File

Create a new file in input/fsh/profiles/:

Profile: ZarishNewProfile
Parent: Patient
Id: zarish-new-profile
Title: "Zarish New Profile"
Description: "Description of the new profile"

* identifier 1..* MS
* name 1..* MS
* gender 1..1 MS

Step 2: Compile and Validate

sushi .
java -jar publisher.jar -ig ig.ini

Step 3: Add Documentation

Create documentation in docs/profiles/new-profile.md

Step 4: Update Navigation

Update mkdocs.yml to include the new profile

🌐 FHIR Compliance

  • FHIR Version: R4 (4.0.1)
  • Base Profiles: US Core, International Patient Summary
  • Validation: All profiles validated against FHIR specification
  • Conformance: Meets FHIR conformance requirements

πŸ› Troubleshooting

SUSHI Compilation Fails

# Check FSH syntax
sushi . --log-level debug

# Validate YAML configuration
cat sushi-config.yaml

IG Publisher Fails

# Update publisher
./_updatePublisher.sh

# Run with verbose logging
java -jar publisher.jar -ig ig.ini -tx n/a

Documentation Build Fails

# Check MkDocs configuration
mkdocs build --strict

# Reinstall dependencies
pip install --upgrade mkdocs-material

πŸ“š Learning Resources

🀝 Contributing

  1. Fork the repository
  2. Create/modify FSH profiles
  3. Build and validate
  4. Update documentation
  5. Submit pull request

πŸ“„ License

This project is part of the ZarishSphere Platform.

πŸ”— Related Repositories

πŸ†˜ Getting Help