All Projects → fhir-crucible → fhir_models

fhir-crucible / fhir_models

Licence: Apache-2.0 license
FHIR Resource Models

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to fhir models

fhir-fuel.github.io
Place to prepare proposal to FHIR about JSON, JSON-Schema, Swagger/OpenAPI, JSON native databases and other JSON-frendly formats (yaml, edn, avro, protobuf etc) and technologies
Stars: ✭ 20 (-70.59%)
Mutual labels:  fhir
openmrs-fhir-analytics
A collection of tools for extracting FHIR resources and analytics services on top of that data.
Stars: ✭ 55 (-19.12%)
Mutual labels:  fhir
CyFHIR
A Neo4j Plugin for Handling HL7 FHIR Data
Stars: ✭ 39 (-42.65%)
Mutual labels:  fhir
sundly
💛 Encrypted & decentralized personal health records. Built on Blockstack and powered by Blockchain.
Stars: ✭ 24 (-64.71%)
Mutual labels:  fhir
Openemr
The most popular open source electronic health records and medical practice management solution.
Stars: ✭ 1,762 (+2491.18%)
Mutual labels:  fhir
hedis-ig
HEDIS FHIR-based Quality Reporting
Stars: ✭ 24 (-64.71%)
Mutual labels:  fhir
golang-fhir-models
FHIR Models for Go
Stars: ✭ 27 (-60.29%)
Mutual labels:  fhir
cql
Clincal Quality Language Specification
Stars: ✭ 16 (-76.47%)
Mutual labels:  fhir
id3c
Data logistics system enabling real-time pathogen surveillance. Built for the Seattle Flu Study.
Stars: ✭ 21 (-69.12%)
Mutual labels:  fhir
monai-deploy
MONAI Deploy aims to become the de-facto standard for developing, packaging, testing, deploying and running medical AI applications in clinical production.
Stars: ✭ 56 (-17.65%)
Mutual labels:  fhir
structor
FHIR Questionnaire Form Builder
Stars: ✭ 25 (-63.24%)
Mutual labels:  fhir
FHIR2Dataset
Query FHIR apis with SQL, for analytics and ML.
Stars: ✭ 26 (-61.76%)
Mutual labels:  fhir
fhir-bridge
FHIR Bridge acts as a broker between an HL7 FHIR client and an openEHR server.
Stars: ✭ 22 (-67.65%)
Mutual labels:  fhir
GOSH-FHIRworks2020-React-Dashboard
🩺 Fully Responsive FHIR Dashboard written using @reactjs for NHS and GOSH hackathon
Stars: ✭ 21 (-69.12%)
Mutual labels:  fhir
hl7v2-fhir-converter
Converts HL7 v2 Messages to FHIR Resources
Stars: ✭ 40 (-41.18%)
Mutual labels:  fhir
pathling
Turn your FHIR data set into a powerful API that can be used to develop analytics applications and augment data science workflow.
Stars: ✭ 31 (-54.41%)
Mutual labels:  fhir
youyou
Edit and create FHIR profiles with a shiny interface ✨
Stars: ✭ 13 (-80.88%)
Mutual labels:  fhir
Hammer
Simple, reliable FHIR validator
Stars: ✭ 27 (-60.29%)
Mutual labels:  fhir
php-fhir
Tools for consuming data from a FHIR server with PHP
Stars: ✭ 87 (+27.94%)
Mutual labels:  fhir
openui5-fhir
The openui5-fhir project connects the worlds of UI5 and FHIR®. Build beautiful and enterprise-ready web applications based on the FHIR® specification.
Stars: ✭ 31 (-54.41%)
Mutual labels:  fhir

fhir_models Build Status

FHIR R4 Resource models generated from FHIR StructureDefinitions.

The StructureDefinitions, XML Schemas, and examples are reused from the HL7 FHIR build tools.

Getting Started

$ bundle install
$ bundle exec rake fhir:console

Features

  • FHIR R4 Resource Models
  • XML and JSON support
  • Resource Validation
  • Not Supported
    • Primitive Extensions
    • FHIR Comments

Resource Basics

Using XML...

xml = File.read('patient-example.xml')
patient = FHIR.from_contents(xml)
puts patient.to_xml

Using JSON...

json = File.read('patient-example.json')
patient = FHIR.from_contents(json)
puts patient.to_json

Creating an Observation by hand...

obs = FHIR::Observation.new(
  'status' => 'final',
  'code' => {
    'coding' => [{ 'system' => 'http://loinc.org', 'code' => '3141-9', 'display' => 'Weight Measured' }],
    'text' => 'Weight Measured'
  },
  'category' => {
    'coding' => [{ 'system' => 'http://hl7.org/fhir/observation-category', 'code' => 'vital-signs' }]
  },
  'subject' => { 'reference' => 'Patient/example' },
  'context' => { 'reference' => 'Encounter/example' }
)
obs.valueQuantity = FHIR::Quantity.new(
  'value' => 185,
  'unit' => 'lbs',
  'code' => '[lb_av]',
  'system' => 'http://unitsofmeasure.org'
)

Iterating over all elements in a resource, including nested elements...

patient.each_element do |value, metadata, path|
  puts "Info for #{path}:"
  puts "- value: #{value}"
  puts "- type: #{metadata['type']}"
  puts "- cardinality: #{metadata['min']}..#{metadata['max']}"
end

Validation

Using built in validation...

patient.valid? # returns true or false
patient.validate # returns Hash of errors, empty if valid

Using a profile or structure definition...

sd = FHIR::Definitions.resource_definition('Patient')
sd.validates_resource?(patient) # passing in FHIR::Patient
# Validation failed? Get the errors and warnings...
puts sd.errors
puts sd.warnings

License

Copyright 2014-2021 The MITRE Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].