E1. model.json

Place the provided default model.json in PIPELINE_REFDATA_DIR so the pipeline has a working attribute and observation model from day one. Once that’s working, swap in a site-specific model.json (see the callout below) whenever you’re ready.

Building a site-specific model.json

MSMDAD is BigPicture’s mandatory minimum attribute set. MetaFlex covers optional extensions. To build a model.json tailored to your site, browse and select from both in the bpmetrics-config browser, then use its “Current Selection” panel to “Also export as model.json (SlideTap)”. This produces a SlideTap-ready model.json directly — place the downloaded file in PIPELINE_REFDATA_DIR in place of the default, and restart the stack (see the callout below) to pick it up.

Only want the MSMDAD floor for entity attributes (case, specimen, block, slide, image, …), with none of your own on top? Put {} in model.json. Those entity attributes are compiled into the pipeline itself, so {} declares nothing extra and still gives you that floor.

{} declares no observation models — check your mappers first

Unlike entities, SlideTap has no built-in floor for observations: an empty model.json declares zero observation models, full stop. If any mapper in your mappers.xlsx maps into an observation — a diagnosis or other pathology code is the normal case, and it counts even though the code itself is part of MSMDAD — that observation must still be declared by hand in model.json, or mapper injection for it fails silently at boot and every item using it comes up unmapped, with no error visible in the UI. The provided default model.json above already declares a working diagnose observation as an example. Unless you are certain none of your mappers touch an observation, start from that file rather than {}.

Place the default file

Run make setup-refdata to copy the default model.json into your refdata directory:

make setup-refdata

Expected output (files not yet present):

Setting up refdata in: ./data/refdata
Copying mappers.xlsx from bigpicture-slidetap/tests/test_data...
Copying model.json from bigpicture-slidetap/tests/test_data...

Refdata contents:
  mappers.xlsx (9.0K)
  model.json (3.6K)

✓ Setup complete

If both files were already present from a previous run:

Setting up refdata in: ./data/refdata
✓ mappers.xlsx found
✓ model.json found

Refdata contents:
  mappers.xlsx (9.0K)
  model.json (3.6K)

✓ Setup complete
Verify

Confirm both refdata files are in place:

ls ./data/refdata/

Expected output:

mappers.xlsx  model.json

make doctor checks all preflight conditions including certificates and credentials that have not been created yet. Run the full make doctor check at G. Preflight + boot once all prerequisites are in place.

Already have the stack running? This needs a restart to take effect

Editing model.json in PIPELINE_REFDATA_DIR isn’t picked up until the stack restarts — see When do I need to restart? for the command and why.

Required and optional attributes

Every attribute definition in model.json — inside an observation’s statement.attributes, or an entity’s additional_attributes — is required by default. At export, SlideTap checks that every required attribute has a value; an observation missing one fails the export (see If something goes wrong in H. Run a submission test).

To make an attribute optional, add "optional": true to its existing object in model.json — this is the only line you add, everything else in the object stays as-is:

{
  "attribute_type": "code",
  "tag": "diagnose",
  "optional": true
}

This is an edit to the reference data file itself, so it needs the same restart as any other model.json change — see the callout above.

Editing an MSMDAD attribute’s optional flag

The bpmetrics-config export declares MSMDAD attributes in model.json alongside your site’s own extensions, and SlideTap dedupes any collision with an entity’s fixed attribute on ingest. Still, don’t hand-edit an MSMDAD attribute’s entry directly: re-select it in the bpmetrics-config browser and re-export instead, so the whole file keeps coming from one source and stays in sync with your selection. If you’re not sure whether the attribute named in an error is part of the MSMDAD floor or your own extension, ask Support before changing model.json.

If something goes wrong

FAIL: model.json missing from ... — run make setup-refdata again and confirm model.json appears in PIPELINE_REFDATA_DIR.

Warning: model.json not found in bigpicture-slidetap/tests/test_data — the pipeline submodule was not initialised. Run:

git submodule update --init --recursive

then retry make setup-refdata.

Export reverts to “Completed” with no error, and an observation is missing a coded attribute (e.g. diagnose) — that attribute has no "optional": true flag in model.json, so it is required by default (see Required and optional attributes above). Either supply the missing value for that observation before re-exporting, or mark the attribute optional in model.json and restart the stack. Full symptom, including why Curate can miss this, and where to find the underlying error: H. Run a submission test.