Skip to content

Prototype

Jonathan Payne edited this page Oct 28, 2026 · 4 revisions

Open the prototype

Pick each rule's options in the bar at the top. Each scenario shows what the expansion contains under those options. The address in your browser keeps the scenario and the options you chose, so you can share a link to exactly what you're looking at.

Reading a result

  • The tree shows the concept the reference starts from, then its set members and answers, level by level. The PIH and CIEL chips show each concept's source, and the IDs link to the concept in OCL.
  • "replaces CIEL:…": Rule 2 put this concept in place of its lower-ranked equivalent. Hover over it to see which source stores the SAME-AS mapping.
  • "re-pointed from …": the stored mapping points to the replaced concept, and the dictionary uses it as if it pointed here (Rule 4).
  • "not linked in OpenMRS": with Rule 4 set to "stay as stored", the stored mapping points to a concept that isn't in the dictionary, so OpenMRS wouldn't link these two concepts.
  • "left out": with Rule 2 set to "is left out", the concept is dropped, along with everything under it.
  • "listed above": an expansion contains each concept once, so any later appearance points back to the first.
  • Why lists each decision in the order the rules made it.

Comparing

Compare with puts a preset next to your options. Concepts that appear on only one side are highlighted.

Preset What it is
Draft defaults Every rule's draft default
OCL today $cascade with omitIfExistsIn pointed at the collection: it checks only what the collection already contains, and leaves concepts out rather than replacing them
Follow the referenced concept The draft, with Rule 3 following the referenced concept: the "Follows CIEL" results on Scenarios
Union The draft, with Rule 3's union
Step by step The draft, with Rule 3's literal step-by-step reading
No equivalency Plain expansion, with no substitution

Any concept

The Any concept tab expands any CIEL or PIH concept, reading live from OCL with the same ranked list (PIH, then CIEL).

  • It needs your OCL API token, which you'll find on your OCL account page. The token stays in the page's memory, goes only to api.openconceptlab.org, and is gone when you reload or close the page. It's never saved in the browser or put in the page's address. Other sites share the github.io address, and could read a saved token.
  • It reads three things per concept: the concept, its mappings, and the SAME-AS mappings to it from the other source. A large cascade can take a few seconds.

Limits

  • One reference at a time. Collections with several references, overlapping references, and exclusions aren't modeled.
  • Two ranked sources, PIH and CIEL.
  • HEAD repo versions only.
  • "The collection only" (Rule 1) assumes the collection contains nothing else yet.
  • Rule 6 shows only the message someone would see, not a working "add reference" dialog.
  • The union (Rule 3) expands each replacement once. If referenced concepts in different branches resolve to the same replacement, only the first one reached contributes its extra answers and members. Siblings under the same parent are handled. No scenario has this case.

The data and the code

The five scenarios use a stored copy of their concepts and mappings, read from OCL. The page footer shows when it was taken.

The code is in the repository, and its README explains how to refresh the data and run the tests. The tests hold each scenario to the results on Rules, for the draft defaults and for "follow the referenced concept". A new rule option goes into RULES in app/engine.js, with a test.

Clone this wiki locally