Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-ignatov committed Sep 25, 2020
1 parent 1dddd29 commit 105543b
Show file tree
Hide file tree
Showing 56 changed files with 391 additions and 389 deletions.
6 changes: 4 additions & 2 deletions docs/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ The **fhirOptions** object is optional and can contain the following properties:
- If the target is an array of references (E.g. [Patient.generalPractitioner](http://hl7.org/fhir/R4/patient-definitions.html#Patient.generalPractitioner)), you can request one or more of them by index (E.g. `generalPractitioner.0`). If the index is not specified, all the references in the array will be resolved.
- The order in which the reference paths are specified does not matter. For example, if you use `["subject", "encounter.serviceProvider", "encounter"]`, the library should figure out that `encounter.serviceProvider` must be fetched after `encounter`. In fact, in this case it will first fetch subject and encounter in parallel, and then proceed to encounter.serviceProvider.
- This option does not work with contained references (they are "already resolved" anyway).
- You can use `..` to loop through arrays. For example `identifier..assigner` will match if `identifier` is an array of objects having an `assigner` reference property. This is not recursive, meaning that `..` can only be used once in each path expression and paths like `identifier..assigner..whatever` will not work.
- **useRefreshToken** `Boolean` - **Defaults to `true`**. If the client is authorized, it will possess an access token and pass it with the requests it makes. When that token expires, you should get back a `401 Unauthorized` response. To prevent this from happening, the client will check the access token expiration time before making requests. If the token is expired, or if it is about to expire in the next 10 seconds, a refresh call will be made to obtain new access token before making the actual request. By setting `useRefreshToken` to `false` you can disable this behavior. There are `refresh` and `refreshIfNeeded` methods on the client (described below) that can be called manually to renew the access token.

***Examples:***
Expand Down Expand Up @@ -96,8 +97,9 @@ client.request(
resolveReferences: [
"context", // The Encounter
"context.serviceProvider", // The Organization (hospital)
"performer.0", // The Practitioner
"subject" // The Patient
"performer.0", // The Practitioner (or use "performer" to get all practitioners)
"subject", // The Patient
"identifier..assigner" // All identifier assigners
]
);
```
Expand Down
26 changes: 13 additions & 13 deletions docs/typedoc/classes/_adapters_browseradapter_.browseradapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/8b5884a/src/adapters/BrowserAdapter.ts#L24">src/adapters/BrowserAdapter.ts:24</a></li>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/1dddd29/src/adapters/BrowserAdapter.ts#L24">src/adapters/BrowserAdapter.ts:24</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -169,7 +169,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> _storage</h3>
<div class="tsd-signature tsd-kind-icon">_storage<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_types_d_.fhirclient.storage.html" class="tsd-signature-type">Storage</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> =&nbsp;null</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/8b5884a/src/adapters/BrowserAdapter.ts#L19">src/adapters/BrowserAdapter.ts:19</a></li>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/1dddd29/src/adapters/BrowserAdapter.ts#L19">src/adapters/BrowserAdapter.ts:19</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -184,7 +184,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> _url</h3>
<div class="tsd-signature tsd-kind-icon">_url<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">URL</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> =&nbsp;null</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/8b5884a/src/adapters/BrowserAdapter.ts#L14">src/adapters/BrowserAdapter.ts:14</a></li>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/1dddd29/src/adapters/BrowserAdapter.ts#L14">src/adapters/BrowserAdapter.ts:14</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -200,7 +200,7 @@ <h3>options</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_types_d_.fhirclient.adapter.html">Adapter</a>.<a href="../interfaces/_types_d_.fhirclient.adapter.html#options">options</a></p>
<ul>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/8b5884a/src/adapters/BrowserAdapter.ts#L24">src/adapters/BrowserAdapter.ts:24</a></li>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/1dddd29/src/adapters/BrowserAdapter.ts#L24">src/adapters/BrowserAdapter.ts:24</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -222,7 +222,7 @@ <h3>fhir</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/8b5884a/src/adapters/BrowserAdapter.ts#L79">src/adapters/BrowserAdapter.ts:79</a></li>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/1dddd29/src/adapters/BrowserAdapter.ts#L79">src/adapters/BrowserAdapter.ts:79</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -250,7 +250,7 @@ <h3>atob</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_types_d_.fhirclient.adapter.html">Adapter</a>.<a href="../interfaces/_types_d_.fhirclient.adapter.html#atob">atob</a></p>
<ul>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/8b5884a/src/adapters/BrowserAdapter.ts#L130">src/adapters/BrowserAdapter.ts:130</a></li>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/1dddd29/src/adapters/BrowserAdapter.ts#L130">src/adapters/BrowserAdapter.ts:130</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -279,7 +279,7 @@ <h3>btoa</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_types_d_.fhirclient.adapter.html">Adapter</a>.<a href="../interfaces/_types_d_.fhirclient.adapter.html#btoa">btoa</a></p>
<ul>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/8b5884a/src/adapters/BrowserAdapter.ts#L138">src/adapters/BrowserAdapter.ts:138</a></li>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/1dddd29/src/adapters/BrowserAdapter.ts#L138">src/adapters/BrowserAdapter.ts:138</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -308,7 +308,7 @@ <h3>get<wbr>Abort<wbr>Controller</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_types_d_.fhirclient.adapter.html">Adapter</a>.<a href="../interfaces/_types_d_.fhirclient.adapter.html#getabortcontroller">getAbortController</a></p>
<ul>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/8b5884a/src/adapters/BrowserAdapter.ts#L122">src/adapters/BrowserAdapter.ts:122</a></li>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/1dddd29/src/adapters/BrowserAdapter.ts#L122">src/adapters/BrowserAdapter.ts:122</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -352,7 +352,7 @@ <h3>get<wbr>Smart<wbr>Api</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_types_d_.fhirclient.adapter.html">Adapter</a>.<a href="../interfaces/_types_d_.fhirclient.adapter.html#getsmartapi">getSmartApi</a></p>
<ul>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/8b5884a/src/adapters/BrowserAdapter.ts#L150">src/adapters/BrowserAdapter.ts:150</a></li>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/1dddd29/src/adapters/BrowserAdapter.ts#L150">src/adapters/BrowserAdapter.ts:150</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -379,7 +379,7 @@ <h3>get<wbr>Storage</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_types_d_.fhirclient.adapter.html">Adapter</a>.<a href="../interfaces/_types_d_.fhirclient.adapter.html#getstorage">getStorage</a></p>
<ul>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/8b5884a/src/adapters/BrowserAdapter.ts#L110">src/adapters/BrowserAdapter.ts:110</a></li>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/1dddd29/src/adapters/BrowserAdapter.ts#L110">src/adapters/BrowserAdapter.ts:110</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -403,7 +403,7 @@ <h3>get<wbr>Url</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_types_d_.fhirclient.adapter.html">Adapter</a>.<a href="../interfaces/_types_d_.fhirclient.adapter.html#geturl">getUrl</a></p>
<ul>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/8b5884a/src/adapters/BrowserAdapter.ts#L89">src/adapters/BrowserAdapter.ts:89</a></li>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/1dddd29/src/adapters/BrowserAdapter.ts#L89">src/adapters/BrowserAdapter.ts:89</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -427,7 +427,7 @@ <h3>redirect</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_types_d_.fhirclient.adapter.html">Adapter</a>.<a href="../interfaces/_types_d_.fhirclient.adapter.html#redirect">redirect</a></p>
<ul>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/8b5884a/src/adapters/BrowserAdapter.ts#L101">src/adapters/BrowserAdapter.ts:101</a></li>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/1dddd29/src/adapters/BrowserAdapter.ts#L101">src/adapters/BrowserAdapter.ts:101</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -457,7 +457,7 @@ <h3>relative</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_types_d_.fhirclient.adapter.html">Adapter</a>.<a href="../interfaces/_types_d_.fhirclient.adapter.html#relative">relative</a></p>
<ul>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/8b5884a/src/adapters/BrowserAdapter.ts#L69">src/adapters/BrowserAdapter.ts:69</a></li>
<li>Defined in <a href="https://github.com/smart-on-fhir/client-js/blob/1dddd29/src/adapters/BrowserAdapter.ts#L69">src/adapters/BrowserAdapter.ts:69</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
Loading

0 comments on commit 105543b

Please sign in to comment.