Skip to content

Commit

Permalink
Update simplifierWriteConnector.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
paulacuc committed Mar 18, 2016
1 parent edb7a63 commit 98b025c
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions docs_simplifier/simplifierWriteConnector.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,28 @@ To redirect to a different page, with a POST body payload:
$.redirect(url, body);
Place holders
Helpers
-------------

Your script may contain place holders, that will be filled in before your connector script is executed:

{endpoint}
When your connector is executed by a user, he will do that from the page that shows a resource.
The {endpoint} placeholder contain the url of the FHIR endpoint of that resource.

{returnurl}
You have access to several variables that will be filled in before your connector script is executed:

fhirServer
Wrapper of fhir.js client with a jQuery adapter. You will instantiate a new client by providing the base url and you will have
access to all the functionality provided by fhir.js with an embedded jQuery adapter (which is required by the plain fhir.js constructor). For example:
.. code-block:: Javascript
var client = fhirServer("www.example.com");
simplifierServer
Wrapper of simplifhier client which hides the fhir.js client construction. When your connector is executed by a user, he will do that from the page that shows a resource. The FHIR endpoint of that resource can be accessed in the following manner:
.. code-block:: Javascript
simplifierServer.ResourceEndpoint
You will also have access to the resource in XML and Json in case of post calls to another server
.. code-block:: Javascript
simplifierServer.ResourceXml
simplifierServer.ResourceJson
Since in essence it is a fhir.js client, simplifierServer also exposes all the methods implemented in fhir.js
.. code-block:: Javascript
simplifierServer.read(...)
returnUrl
This placeholder will contain the url of the page from where your connector script is executed.



0 comments on commit 98b025c

Please sign in to comment.