Skip to content
Alpha: see what works today →
Menu

The sandbox's tests

The newest run on main of the tests of cascade-sandbox, read as a tree of package, capability and situation, each with what it is for and each case linked to its source. Failures come first within a capability, and the levels that hold one are open.

@the-cascade-protocol/sandbox 0.0.0unreleasedAll 380 cases pass · commit f1a59b8 · · 2.79 s · the run 380 passed 0 skipped

npm test, node:test over the sandbox. For an agent: cascade-sandbox.ctrf.json.

@the-cascade-protocol/sandbox 0.0.0 · commit f1a59b8 · unreleased: what main does today, not a compatibility promise

Pretend hospitals with made-up patients, which an app or a test signs in to and pulls records from with no account and no network.

Glossary
aud
the parameter of an authorize request in which the app names the FHIR base it means to read from; a hospital refuses one that is not its own.
authorization code (authorization codes)
the one-time code that arrives at the redirect URI from a sign-in, which the app trades for the token.
brands bundle (brands bundles)
the list of the hospitals that use a vendor's system, as the vendor publishes it in SMART's User-access Brands format: a FHIR Bundle of Organizations, each pointing to the endpoint its records are served from. https://hl7.org/fhir/smart-app-launch/brands.html
Bundle (Bundles)
FHIR's resource that holds a list of other resources, each in an `entry`; its `type` says what the list is, such as `collection`, `history` or `searchset`.
C-CDA
Consolidated Clinical Document Architecture: HL7's standard for the XML summary documents patient portals hand out.
client id (client ids)
the name an app gives for itself when it asks to sign a patient in; a demo hospital accepts any.
clinical date (clinical dates)
the date a record gives for the thing it records, such as a result's `effectiveDateTime` or a condition's `onsetDateTime`.
code system (code systems)
a published list of codes for one kind of thing, such as RxNorm for medicines, LOINC for lab tests and SNOMED CT for clinical findings.
deletion (deletions, deleted)
an entry of a record's history that says the hospital removed the record at that time; it carries no resource.
demo hospital (demo hospitals)
a pretend hospital with made-up patients, which an app or a test signs in to and pulls from with no account and no network; Cascade North and Cascade South are the two this package carries.
difference (differences, declared difference)
a place where one hospital's record of a person disagrees with who the person is, such as a misspelt name, which the person's `person.json` declares so that the load accepts it.
discovery
the request for a hospital's SMART configuration, with which every sign-in begins.
Endpoint (Endpoints)
FHIR's resource for an address a system is reached at; in a brands bundle, a hospital's FHIR base.
etag (etags)
the version stamp of a history entry, written `W/"<version id>"`.
FHIR
Fast Healthcare Interoperability Resources: HL7's standard for health records as JSON. https://hl7.org/fhir/R4/
FHIR base (FHIR bases)
the URL of a hospital's FHIR server; each record there is at `<FHIR base>/<type>/<id>`. cascade:serverBaseUrl
Forwarded
the HTTP header in which a go-between says which host and protocol the client asked for; `demoRemapFetch()` sends it to the listener.
generated people (generated person, generated patient)
the people this package made with Synthea: ten years of visits, conditions, medications and results each.
hand-written people
the people written by hand for tests, which this package copies from cascade-vocabulary and does not edit.
history (histories)
every version of one record, newest first, as a hospital answers `<type>/<id>/_history`; also the type of a patient file that holds one entry for each version.
Host
the HTTP header in which a client says which server name it asked for.
instant (instants)
a date and time to the second with its time zone, such as `2024-02-01T00:00:00Z`.
kit (kits)
a story and the exports it uses, which the vocabulary carries for testing, such as `alex-rivera`.
launcher
the SMART Health IT launcher, `launch.smarthealthit.org`: a public test hospital on the internet, kept by the SMART project, which this project did not write. Its code is smart-launcher-v2.
listener (listeners)
the demo hospitals served on a port of this machine by `serveDemo()` or `npm run serve`, each at `<origin>/<id>/fhir`.
metadata
`<FHIR base>/metadata`, where a FHIR server says what it supports: the types it serves, how each is searched, and where its sign-in is.
official name
the name of a Patient marked `use: "official"`, or its only name.
OperationOutcome
FHIR's resource for a server's warning or error message; it is no record of the patient.
Organization (Organizations)
FHIR's resource for a hospital, a clinic, a laboratory or another body that gives care. cascade:Organization
origin (origins)
the scheme, server name and port of a URL, such as `https://hospital.example`: what a browser treats as one site.
patient (patients)
a person as one hospital knows them, under that hospital's own patient id.
patient file (patient files)
the file of what one hospital holds of one person, `people/<person>/sources/<hospital>/fhir.json`: a FHIR Bundle of type `collection` or `history`.
person (people)
a made-up human being, with a name, a birth date and a gender in `person.json`, who is a patient at one hospital or more.
PKCE
Proof Key for Code Exchange, RFC 7636: the part of a sign-in by which an app shows, at the token exchange, that it is the app that began the sign-in. A demo hospital takes only its S256 method.
plain record (plain records, plain collection)
a record written once in a `collection` file, with no version: it is there at every date and is served as written.
preflight
the OPTIONS request a browser sends before a page on one origin calls a server on another, to ask whether it may.
pull (pulls, pulled)
the records one patient has at one hospital, fetched in one go: a search of each type, page by page, and a read of the Patient.
record (records)
one thing said about a person's health, such as an allergy, a medication or a lab result. cascade:Record
record time (record times)
when a hospital recorded a version, the entry's `response.lastModified`.
redirect URI (redirect URIs)
the app's own URL to which a hospital sends the person's browser when the sign-in is over.
reference tables (reference table)
public code lists, such as RxNorm for medicines, that tell an app when two codes mean one thing; the hand-written people carry codes chosen to reach them.
resource (resources)
one record in FHIR, named by its type and its id, such as `Observation/ldl-1`.
root (roots)
a folder of hospital folders or of person folders that a load reads; a load takes a list of them.
scope (scopes)
what an app asks to be let read, in SMART's notation: `patient/Observation.rs` is to read and search the patient's Observations.
searchset
the type of Bundle a hospital answers a search with: one page of matches and, where there are more, a link to the next.
shorthand
a way to write a record's change in a patient file as two dates, `active` and `stopped`, in place of two versions.
sign-in page (sign-in pages)
the page a hospital shows at its authorize address, where the patient is picked and allows or cancels what the app asks.
SMART configuration
what a hospital's server publishes at `<FHIR base>/.well-known/smart-configuration`: where its sign-in page and its token exchange are, and what they support.
SMART on FHIR
the standard by which an app signs a person in to a hospital and is then let read that person's records: OAuth 2.0 as HL7's SMART App Launch profiles it for FHIR servers. https://hl7.org/fhir/smart-app-launch/
source (sources)
what one hospital holds of one person: the folder `sources/<hospital>/` of the person, with a patient file, C-CDA documents, or both.
state
a value the app sends with the authorize request and the hospital sends back unchanged, so the app can tell its own sign-in's answer.
story (stories)
a made-up patient at a demo hospital whose records were written to show one outcome, such as a lab result that falls after a medication starts, with that outcome written down beside them.
Synthea
an open-source program that makes up whole patient histories; the generated people came from it.
token (tokens, access token)
the access token a hospital issues when a person signs in: the credential an app sends with each request for that person's records.
key
the secret a hospital signs its tokens with (`hospital.json`'s `key`).
invalid_client
OAuth's error for a client the server does not accept; the token exchange answers 401 with it. The launcher's switch for it is named `token_invalid_token`, which differs from the error it gives.
token exchange
the request in which an app trades the authorization code for the token.
version (versions)
what a record says at one time; when a hospital changes a record, its history keeps the old version and adds a new one.
world's date (world date)
the date a hospital answers for, an instant given as `asOf`: it serves each record as it stood then. With none, it serves each record's latest version.
Build and packaging 53 passed