Giter Club home page Giter Club logo

igpop's Introduction

igpop is Sugar FHIR Profiling

Build Status npm version


Specification

DRY FHIR profiling for programming beings

  • 80/20 of profiling
  • convention over configuration
  • to be manually written
  • Data DSL - no grammars and parsers

Features

  • generate JSON Schema
  • generate FHIR StructureDefinition, ValueSets etc
  • generate IG static site
  • linter for profiles

New Project

Install igpop util and start your project

src/
  Patient.yaml <- basic profile for Patient
  Observation/smoking-status.yaml <- smoking status profile for Observation
  vs.smoking-status.yaml <- valuset for smoking status
  vs.smoking-status.csv <- you can put concepts as a csv file
  ...
build/
  fhir/ <- SD, VS etc
  json-schema/ <- json-schema
  igpop/ <- igpop build
  site/  <- static site
ig.yaml <- manifest file
package.json

Profiles

You create basic profile for resource type by creating src/<resource-type>.yaml file.

For example src/Patient.yaml is your basic Patient. Id and url for generated structure definition will be deduced from ig.yaml id and url by convetion.

Basic structure of your profile is:

# profile description
description: ...
  
# constraints & extensions definitions
elements: ...

# REST API definitions
api: ...

# Examples section
examples: ...

elements

Object which defines element selectors to put constraints or define extensions. Complex elements can have nested elements definitions.

Each element can have keys:

  • description - description
  • type - primitive or complex type name
  • valuset - binding to valueset
  • elements - nested elements for complex elements
  • constant - check for equality
  • Collections:
    • maxItems & minItems - constraints for collection
    • contains - rule wich check inclusion of pattern in collection
  • Single elements
    • required - make element required
    • match - rule wich check inclusion of pattern

Example src/Patient.yaml:

description: My Basic Patient Profile
elements:
  identifier: # []
    # require at least one element in collection
    minItems: 1
    elements:
      # require value in identifier
      value: { required: true }
      system:
        required: true
        # define binding and inline definition for valuset
        valueset:
          id: patient-systems
          strength: extensible
          system: local
          concepts:
          - {code: 'ssn'}
          - {code: 'driver-license}
  name:
    minItems: 1
    elements:
      family: { required: true }
      given:  { minItems: 1 }
  # if element listed without attributes - that means 'mustSupport' will be added
  birthDate: {}

Development notes

This section is for people doing development on this package.

Local development

Run repl in project's home directory:

make repl

Then connect to repl, eval ./src/igpop/site/core.clj file and it's lines:

(def hm (.getAbsolutePath (io/file  "example")))

and

(def srv (start hm 8899))

Open browser on localhost:8899.

Building static pages

Build jar file:

make build

Build static pages:

cd example
java -jar "../npm/igpop/bin/igpop.jar" build "/igpop" igpop.core

igpop's People

Contributors

mput avatar niquola avatar qdzo avatar thezorkij avatar victorgus avatar virnkord avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.