Skip to content

fhir-drills/fhir-drills.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

FHIR Drills

Interactive tutorials for learning FHIR.

Server Selection

The site automatically selects a working FHIR server on page load by performing health checks against multiple public servers (HAPI FHIR R4, Firely Server R4). This ensures the tutorials continue to work even if one server is unavailable. The server selection is transparent to users and happens in the background.

HTML

Decide on an exercise name - in this example, the exercise name is patient-with-references.

Full URL

To use the full server URL of a resource, use class="<exercise>-location-full" id="<html resource tag>" - you can use this on any HTML element. For example,

<note class="patient-with-references-location-full" id="rf-patient"><i>press Upload to get a Patient</i></note>

Server-assigned Resource ID only

To use the server ID only, use class="<exercise>-serverid" id="<html resource tag>".

Base server URL

To use the base URL only, use class="<exercise>-baseurl" id="<html resource tag>".

Embedding XML resources

To embed XML inside a page and get syntax highlighting, use these tags:

<textarea class="fhir-resource-xml">
//my FHIR XML here
</textarea> 

Embedding JSON resources

To embed JSON inside a page and get syntax highlighting, use these tags:

<textarea class="fhir-resource-json">
// my FHIR JSON here
</textarea> 

Javascript

To upload your resources, use the uploadFiles("<exercise>", servers.<pick a server>, [an array of arrays with the html resource tag and the file location]). For example:

uploadFiles("patient-with-references", servers.hapiFhirR4, [
    ["rf-patient", "resource-examples/Patient-f001.json"],
    ["rf-encounter", "resource-examples/Encounter-f001.json"],
    ["rf-procedurerequest", "resource-examples/ProcedureRequest-f001.json"],
    ["rf-observation1", "resource-examples/Observation-f001.json"],
    ["rf-observation2", "resource-examples/Observation-f002.json"],
    ["rf-diagnosticreport", "resource-examples/DiagnosticReport-f001.json"]]);

Code examples

Use this template to add C# and Java code examples:

<div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
	<div class="mdl-tabs__tab-bar">
		<a href="#csharp-panel" class="mdl-tabs__tab is-active csharp">C#</a>
		<a href="#java-panel" class="mdl-tabs__tab java">Java</a>
	</div>

	<div class="mdl-tabs__panel is-active" id="csharp-panel">
		<textarea class="csharp-code">
// C# code here
		</textarea>
	</div>
	<div class="mdl-tabs__panel" id="java-panel">
		<textarea class="java-code">
// Java code here
		</textarea>
	</div>
</div>

About

Educational website to learn FHIR at your own pace

Topics

Resources

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
MDL-LICENSE

Stars

Watchers

Forks

Contributors 8