Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- IPS: the source view's banner can sign what is downloaded or shared: as the logged in user (with a key pair in the key store of a type `ips/signatures.js` can use), as the system, or both. The signed copy is made when asked and not kept; the system signs for anyone, no more than once every `modules.ips.signing.systemSeconds` (10) per address. The signing itself (`sign()` in `ips/signatures.js`) is not written yet, and gives the document back as it was
- Keys: an account can't be called System, and a key's owner is shown with its kind (System, or User: name; `ownerKind` in the JWKS); `/keys/api` takes API tokens only; key pairs are made off the event loop; the private key database has no WAL
- Keys: `loadPrivateKey` gives a module a private key to sign with itself (logged, with what it is for, and in the daily report)
- IPS: a Patient Comments tab on a document, for any comments the patient wishes to make about the accuracy or appropriateness of its content (a diagnosis in the problems section, say). One comment per document, in pure markdown (CommonMark): a comment with any HTML in it is refused; everyone can see it, anyone logged in can write, replace or remove it. It is kept apart from the document and its processing results, so processing again leaves it alone; deleting the document deletes it. To keep the document's tabs on one line, National Profiles is now Jurisdictions and AI Assessment is AI Check, and the tabs are a little closer together
- IPS: when a document has patient comments, the source view's banner offers "Include Patient Comments", which, like the Sign choices, applies to every download (JSON, ZIP, PDF) and share (SHL, VHL). Any patient notes section (LOINC 51855-5) in the document is removed before signing; after signing, the comments go in as the Composition's first section - code LOINC 51855-5, title "Patient's Comments", the patient as author, and the comments as narrative (status `additional`), nothing else - so they are not signed. The signatures step checks a document's signatures with any patient notes section removed, for the same reason; and a patient notes section a document arrives with becomes its patient comment, converted to markdown (new dependency: turndown), when it has none yet. `{document}/signed` and `{document}/share` take `comments`
- IPS: the source view's banner also offers "Regenerate narrative": the server generates the narrative of the copy downloaded or shared as the narrative step does (the narrative tab's Generated), before it is signed. `{document}/signed` and `{document}/share` take `narrative`
- IPS: `$document` on a stored document (`GET {project}/Bundle/{id}/$document`, or POST a Parameters resource) gives the API what the source view's banner gives a browser. Parameters `source` (original | modified), `user-sign` (as the owner of the API token; 401 without one, 409 with no key pair), `system-sign`, `patient-notes` (nothing added, and no error, when there are none) and `regenerate-narrative`. By `Accept` or `_format`: the JSON (the default), `application/zip`, `application/pdf`, or an SHL (`application/smart-health-link`) or VHL (`application/verified-health-link`) - the QR code as a PNG, with the link, manifest and expiry in `X-Health-Link*` headers. The ZIP and PDF are made on the server (`ips/export.js`; the PDF is the browser's content laid out as text in the standard fonts, with the document attached). Same rate limit as sharing. Its OperationDefinition is `ips/OperationDefinition-ips-document.json`, which the CapabilityStatement refers to on GitHub
- Registry: a code system resolution that finds nothing says, with `unknown-host`, when no server hosts any code system on the url's host, so clients needn't ask about each of that host's code systems (the tx ecosystem IG's Unknown Hosts)
- tx: the ecosystem resolver remembers an `unknown-host` answer from the registry, and doesn't ask the registry about other code systems on that host for as long as it remembers a code system it was told nothing about; the cached answers viewer shows the hosts
- tx: `$validate-code` on a CodeableConcept says what the ConceptMaps the server can find say about its codings together: for each coding, the maps from its code system to the code system of another coding (packages, libraries, tx-resources, and the maps code systems imply), read forwards, both ways round. A map that says the code is `not-related-to` the other coding, or that it has no map (`noMap`), is a warning; a map that relates it only to other codes is a hint (`TRANSLATION_WARNING_*`). Several maps that say the same thing are named in one message. This is the server side of the core validator's check, with the same messages
Expand All @@ -30,6 +34,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- tx: LOINC `$lookup` gives a property whose value is a LOINC code (COMPONENT and the other axes, parent, child, AnswerList, Answer, answers-for) the display of that code as its `description`
- tx: the HTML view of a `$lookup` response puts its properties and designations in tables of their own, Properties and Designations, below the other parameters, with a column for each part (code, value, description, language, use and so on) instead of a bulleted list in each row. Its `name` parameter is shown as Code System name; a designation's use is shown as its display (Synonym, Fully specified name...), linked to `$lookup` on its code where the server has it, with the system and code in its title; and a Coding's code (a designation's use, say) is linked to `$lookup` on it in whatever code system it is from, if the server has that code system and the code is in it - not only in the code system the response is about
- Home page and dashboard graphs: in a cluster, requests per minute, turnaround time, client cache and node blocking are one line for the cluster instead of one per process: requests and client concepts summed (the shared cache counted once), turnaround averaged over the requests, node blocking the worst process's. Private memory is still drawn per process
- ETags: a stored resource that is read (a CodeSystem, ValueSet or ConceptMap by id) has an ETag worked out from where it came from - the package (id#version) and the resource's type and id, or the hash VSAC's database keeps - with the server's version, the format and the FHIR version: nothing is hashed, and it's the same in every process, across restarts, and on every server running the same release with the same packages. Resources from a folder or file the server loads still have a hash of their content. Clients that keep ETags get each resource once more. Nothing else gets an ETag from Express any more (it hashed every response body, POSTs included, and no client revalidates an operation or a search); static files keep theirs

Expand Down
69 changes: 69 additions & 0 deletions ips/OperationDefinition-ips-document.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"resourceType": "OperationDefinition",
"id": "ips-document",
"url": "https://github.com/HealthIntersections/FHIRsmith/blob/main/ips/OperationDefinition-ips-document.json",
"version": "1.0.0",
"name": "IpsDocument",
"title": "Get a stored IPS document, prepared for sharing",
"status": "active",
"kind": "operation",
"date": "2026-11-22",
"publisher": "Health Intersections Pty Ltd (FHIRsmith)",
"description": "Returns a document stored in a FHIRsmith IPS project as the web page's source view gives it for download or sharing: optionally with the narrative regenerated, signed by the user and/or the system, and with the patient's comments added - in that order. Any existing patient notes section (LOINC 51855-5) is removed before signing, and the patient's comments are added after signing, as the Composition's first section (LOINC 51855-5), so they are not signed.\n\nThe response is chosen by the Accept header, or by _format (a short name or the mime type):\n\n* application/fhir+json or application/json (json - the default): the document\n* application/zip (zip): a ZIP holding the document as {name}.json\n* application/pdf (pdf): a PDF of the document's narrative, with the document attached as {name}.json\n* application/smart-health-link (shl): the document shared as a SMART Health Link; the response is the QR code as a PNG, with the link in the X-Health-Link header, the manifest URL in X-Health-Link-Manifest, and the expiry in X-Health-Link-Expires\n* application/verified-health-link (vhl): the same, as a Verifiable Health Link (GDHCN)\n\nAnything else is 406. Errors are OperationOutcomes. $document shares the rate limit of the web page's sharing and signed downloads.",
"affectsState": false,
"code": "document",
"resource": ["Bundle"],
"system": false,
"type": false,
"instance": true,
"parameter": [
{
"name": "source",
"use": "in",
"min": 0,
"max": "1",
"documentation": "original (the default): the document as submitted; modified: the copy the processing pipeline made (translations, generated narrative, terminology checks). 409 if the document has not been processed yet",
"type": "code"
},
{
"name": "user-sign",
"use": "in",
"min": 0,
"max": "1",
"documentation": "Sign as the user: the owner of the API token in the Authorization header (Bearer). 401 if there is no API token, 409 if the user has no key pair the server can sign with (made on their keys page)",
"type": "boolean"
},
{
"name": "system-sign",
"use": "in",
"min": 0,
"max": "1",
"documentation": "Sign as the system (this server). The system signs for any one address no more often than the server's configured interval: 429 if it is too soon",
"type": "boolean"
},
{
"name": "patient-notes",
"use": "in",
"min": 0,
"max": "1",
"documentation": "Include the patient's comments, as the Composition's first section (LOINC 51855-5, title 'Patient's Comments', the patient as author, the comments as narrative with status additional), added after signing. If the document has no patient comments, nothing is added and this is not an error",
"type": "boolean"
},
{
"name": "regenerate-narrative",
"use": "in",
"min": 0,
"max": "1",
"documentation": "Regenerate the narrative of the Composition and its sections with the server's IPS presenter, as the narrative tab's Generated view shows it, before any signing",
"type": "boolean"
},
{
"name": "return",
"use": "out",
"min": 1,
"max": "1",
"documentation": "The document (a Bundle of type document). For the other formats, the response body is the ZIP, the PDF, or the QR code's PNG, not a Parameters resource",
"type": "Bundle"
}
]
}
Loading
Loading