A Node.js and browser module for interacting with an HL7 Fast Health Interoperable Resources (FHIR) endpoint.
var FHIR, fhir;
FHIR = require("fhir");
fhir = new FHIR({
url: "https://fhir.example.com"
});
fhir.read("Patient", "e7cbe73f808a4943ba7769db96aa2fea", function (err, res) {
console.log(res);
});
-
Include it:
<script src="http://agrueneberg.github.io/FHIR-JS/fhir.min.js"></script> -
Require it:
var FHIR = require("fhir"); -
Instantiate a FHIR client
var fhir = new FHIR({ url: "https://fhir.example.com", }); -
Provide credentials
fhir.credentials("username", "password");
Read the current state of a resource.
typeidcallback
Read the state of a specific version of a resource.
typeidvidcallback
Update an existing resource by its id (or create it if it is new).
typeiddoccallback
Delete a resource.
typeidcallback
Retrieve the update history for a particular resource.
[type][id]callback
Create a new resource with a server assigned ID.
typecallback
Search the resource type based on some filter criteria.
[type]paramscallback
Set FHIR credentials for requests.
usernamepassword