• Stars
    star
    136
  • Rank 267,670 (Top 6 %)
  • Language
    Ruby
  • Created over 9 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

API documentation for Cerner's implementation of the HL7® FHIR® standard

fhir.cerner.com

This repository houses the public facing API documentation for Cerner's implementation of the HL7® FHIR® standard, also known as Cerner's Ignite APIs.

The deployed documentation can be viewed at https://fhir.cerner.com/.

Reporting Issues

Bug reports or notes of areas where documentation is unclear are welcome as repository issues.

Viewing Documentation Locally

Install dependencies with bundler.

$ bundle install

Compile the site with nanoc.

$ bundle exec nanoc

Start up a local web server with nanoc.

$ bundle exec nanoc view

Navigate to http://localhost:3000/ to view the site. When making changes to the site, repeat the last two steps to recompile and view the new content.

Development Constructs

Layouts

We've added attributes at the top of some markdown files to assign a layout. These are usually only needed for pages that aren't actual API documentation (our compilation rule uses that layout attribute before falling back to the api layout).

Layouts themselves are defined in the layouts directory. Some layouts (like the API or FAQ layouts) are used as page templates as mentioned above. Other layouts (like resource category layouts or header/footer layouts) are used to include content in other pages.

Versions and Solutions

There are preprocessing rules that use folder matching to add version and solution attributes to all markdown files for the API. The only thing you need to do to make this work is put resource documentation in /[solution]/[version]/ folder path.

The version and solution attributes are currently used to flex CSS classes, page links, and navigation toolbars/sidebars for the API documentation.

Generating a field table

Definition Tables

Create and Update operations typically require JSON bodies which can be tedious to document manually through markdown. To simplify this process and to improve consistency we have added the definition_table helper to generate a table from a yaml content file.

The definition_table helper requires 3 parameters: content, action, and version.

  • content indicates which content file to load.
  • version indicates the version of the content file.
  • action indicates which action specific variations defined in the content file to reflect in the generated table. Typically the action will be :create or :update. The available actions are defined in the content files themselves.

Generating a field table is done by invoking the definition_table method through an ERB call in whichever documentation file needs the table.

For example, the DSTU2 version of DocumentReference Create can be generated using:

<%= definition_table(:document_reference, :create, :dstu2) %>

Whereas other versions of AllergyIntolerance Update can be generated (assuming appropriate definitions are available) using:

<%= definition_table(:allergy_intolerance, :update, :r4) %>

In actuality, the version parameter references a subfolder in lib/resources where the content files for that version are stored. Thus definition_table(:document_reference, :create, :dstu2) is referencing lib/resources/dstu2/document_reference.yaml. Adding new versions or new content files is simply a matter of creating an appropriately named folder and content file.

definition_table reads these fields from the resource's content yaml definition:

  • name
  • field_name_base_url
  • fields
    • name
    • required
    • type
    • description
    • children
      • nested fields
    • example
    • note
    • url
    • action

Terminology Tables

The terminolgy_table helper is available to generate a terminology binding table from the same yaml content file as definition_table.

The terminolgy_table helper requires 2 parameters: content and version.

  • content indicates which content file to load.
  • version indicates the version of the content file.

Generating a terminology table is done by invoking the terminology_table method through an ERB call in whichever documentation file needs the table.

For example, the DSTU2 version of AllergyIntolerance can be generated using:

<%= terminology_table(:allergy_intolerance, :dstu2) %>

The version parameter processing is handled the same as definition_table.

terminology_table reads these fields from the resource's content yaml definition:

  • name
  • fields
    • name
    • note
    • binding
      • terminology
        • display
        • note
        • system
        • values
Content YAML

The content is defined in YAML files and most fields are optional. If they are not provided, the resulting table cell will just be empty.

  • field_name_base_url: definition_table will generate nested links for each field prepended with this url.
  • fields: The list of defined fields.
    • name: The name of the field. This will be generated as a link based on field_name_base_url.
    • required: Whether or not the field is required. This is not necessarily whether the field is required by the FHIR® standard, but rather whether it is required by our server implementation.
    • type: The type of the field. If found in lib/resources/<version>/types.yaml, this field will be linked to the specified resource.
    • description: The description of the field.
    • example: An example of how the field should be populated. The generated examples will be enclosed in <pre> tags to preserve formatting.
    • note: Additional implementation notes.
    • children: A list of nested fields. Each nested field item has the same structure as this fields list.
    • url: Overrides the field_name_base_url generated URL if defined.
    • binding: A list of terminology bindings supported for the field.
      • description: Describes the purpose / intent of the binding.
      • terminology: The list of terminologies supported by the field.
        • display: The terminology's display value.
        • notes: Additional notes about the binding implementation.
        • system: The actual system URI from which values may be returned.
        • values: A list of individually supported values from the system.

Standard YAML formatting rules apply.

Action

In addition to the fields above, each field can have an action field which indicates to which action or actions the field applies. When defined, the field will only be included when generating a table with the specified action. Multiple actions are supported as well and can be defined as a list:

Make the field apply to a single action
- name: subject
  ...
  action: create

Make the field apply to multiple actions
- name: subject
  ...
  action:
  - create
  - update

Similarly, field values can be flexed per action as well:

Alter the required and note values for update and create
- name: id
  required:
  - update: 'Yes'
  - create: 'No'
  type: id
  description: The logical id of the resource to update.
  example: |
    {
      "id": "123412"
    }
  note:
  - update: The id value must match the AllergyIntolerance/<id> value.
  - create: The id field must not be set when performing an update operation.

The name of the action isn't limited to create and update, but only one action can be used at a time when generating a field table.

Linking

Linking is supported in a few forms.

Field names

The field names will be automatically linked based on the base_field_name_url unless overridden by a field's url value.

Type names

The Type table cell will generate links based on URLs key-value pairs defined in lib/resources/<version>/types.yaml. Any word found in a type field will be replaced with the specified URL.

Formatting Tags

The description and note fields also support linking via the use of `` and [] tags. Words enclosed in `` tags will be linked according to the types.yaml file, if possible, or just formatted as <code> tags if not. Words enclosed in [] will be assumed to be references to other fields in the same table.

In general, it is best to not use `` tags in the type field, although it is possible. There can be conflicts which may result in duplicate replacements and unintended results.

More Repositories

1

clara-rules

Forward-chaining rules in Clojure(Script)
Clojure
1,175
star
2

terra-core

Terra offers a set of configurable React components designed to help build scalable and modular application UIs. This UI library was created to solve real-world issues in projects we work on day to day.
JavaScript
182
star
3

smart-on-fhir-tutorial

SMART on FHIR developer tutorial
JavaScript
160
star
4

kaiju

A drag and drop web editor for React components.
Ruby
154
star
5

bunsen

Explore, transform, and analyze FHIR data with Apache Spark
Java
114
star
6

clara-examples

Example Clara Rules
Clojure
88
star
7

terra-clinical

Terra Clinical is a repository for terra react components used only in a clinical setting.
JavaScript
71
star
8

terra-framework

Terra framework houses composed and higher order react components to help developers quickly build out new applications.
JavaScript
66
star
9

ascvd-risk-calculator

SMART ASCVD Risk Calculator
JavaScript
57
star
10

canadarm

A JavaScript logger that works for you!
JavaScript
50
star
11

code-learning-lab

Cerner Code Learning Lab. Some exercises can be found on the wiki
JavaScript
49
star
12

cds-services-tutorial

A tutorial to help you get started running your own CDS Services.
JavaScript
39
star
13

common-kafka

Common utilities for Apache Kafka
Java
35
star
14

terra-ui

The combined doc site for terra-core, terra-framework, and terra-clinical
JavaScript
35
star
15

terra-toolkit

Terra Toolkit is a monorepo that contains utility modules for use when developing using Terra components
JavaScript
32
star
16

cerner_splunk

Cerner's Splunk Cookbook
Ruby
30
star
17

cerner_kafka

A Kafka Cookbook for Chef
Ruby
30
star
18

carbon-graphs

A lightweight, vanilla JavaScript visualization API built using D3 that integrates well with any consumer’s tech stack. https://engineering.cerner.com/carbon-graphs/
JavaScript
24
star
19

beadledom

A simple, composable framework for building RESTful services
Java
24
star
20

bunsen-tutorial

Tutorial for exploring FHIR data with Apache Spark in an interactive notebook
Jupyter Notebook
22
star
21

cerner-smart-embeddable-lib

npm project for developers to use in their SMART web app to be embeddable in Cerner’s MPage Workflow
JavaScript
21
star
22

ignite-endpoints

API endpoints for Millennium's HL7 FHIR implementation for patient access
20
star
23

f-twelve

Render client console output to the DOM for troubleshooting environments that do not have a dev console
JavaScript
18
star
24

xfc

A javascript library for Cross Frame Communication
JavaScript
17
star
25

splunk-pickaxe

A tool for syncing a repo of splunk objects with a splunk instance
Ruby
16
star
26

cucumber-forge-desktop

Cucumber Feature Reports Made Easy
JavaScript
16
star
27

ccl-testing

A collection of maven plugins and their dependencies to perform CCL Unit tests and static analyses and to generate reports from the results.
Java
16
star
28

cerner.github.io

Cerner Engineering blog
HTML
15
star
29

scrimp

A Sinatra ruby gem for dynamically creating web interfaces for thrift IDLs
Ruby
14
star
30

terra-dev-site

A development environment for React UI components for documentation and testing
JavaScript
13
star
31

jwala

A web application that provides management for a group of Tomcat servers
Java
12
star
32

cclunit-framework

A collection of CCL source code for executing CCL Unit tests and generating code coverage data.
PHP
11
star
33

knife-tar

Chef gem for uploading configuration in tar files
Ruby
10
star
34

jsonrpc-dispatch

JSONRPC is a module for managing JSONRPC requests and responses in JavaScript.
JavaScript
10
star
35

terra-consumer

Consumer reusable components
JavaScript
10
star
36

smart-on-fhir-scheduling-tutorial

SMART on FHIR developer tutorial for Scheduling workflows
JavaScript
9
star
37

one-cerner-style-icons

8
star
38

generator-terra-module

Yeoman based generator to help scaffold out new terra-ui components
JavaScript
8
star
39

terra-application

A framework to support application development with Terra components
JavaScript
8
star
40

terra-graphs

A lightweight, JavaScript visualization API built using D3. Includes a vanilla javascript and react implementation.
JavaScript
7
star
41

cerner_tomcat

A Chef cookbook to assist with installing, configuring, and deploying applications to Apache Tomcat
Ruby
7
star
42

gc_stats

Ruby gem that provides garbage collection statistics for your Rails application
Ruby
6
star
43

cucumber-forge-report-generator

Cucumber Feature Reports Made Easy
JavaScript
6
star
44

fhir-client-cerner-additions

JavaScript
5
star
45

stylelint-config-terra

Terra's stylelint config
JavaScript
5
star
46

ops_tcpdump_handler

Report handler for local testing that prints out the tcp traffic from the run
Ruby
5
star
47

inspec_delta

Ruby
5
star
48

terra-kaiju-plugin

The Kaiju plugin for Terra UI.
JavaScript
4
star
49

icontrol_rest

IcontrolRest provides a simple client to interact with Icontrol.
Ruby
4
star
50

clara-site

Clara Web Site source
HTML
4
star
51

eslint-config-terra

Terra eslint config
JavaScript
4
star
52

terra-aggregate-translations

A pre-build tool to assist with creating the translation and loader files needed for internationalized Terra components to render correctly.
JavaScript
3
star
53

browserslist-config-terra

Shared Browserlist config
JavaScript
3
star
54

terra-toolkit-boneyard

Terra Toolkit is a utility module used to facilitate independent development of Terra projects. This toolkit is designed to help support Webdriver.io testing for Terra UI components
JavaScript
3
star
55

cerner-oauth1a

Cerner OAuth 1.0a Library for Consumers and Service Providers
Ruby
3
star
56

kaiju-plugin-utils

Kaiju plugin utils is a helpful library of common optional utilities used when creating plugins for Kaiju.
JavaScript
2
star
57

version_databag

A Chef cookbook which centrally manages version information in a data bag
Ruby
1
star
58

terra-enzyme-intl

Helpers for running tests with react intl and enzyme
JavaScript
1
star
59

cerner_splunk_ingredient

Ruby
1
star