The Create Bundle Version screen is the curator editor form for publishing a new marketplace bundle at routeDocumentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
/cl/marketplace/curator/new.
Overview
The page renders a form for curators to publish a new bundle row tocl_marketplace_bundles along with its cl_marketplace_bundle_items entries. The form collects bundle_key, version (integer), name, description, accreditation_tags (comma-separated), clinical_area_tags (comma-separated), and an items JSON textarea. The items JSON must be an array of objects each containing item_type, item_key, and payload. Supported item_type values are enumerated in MARKETPLACE_ITEM_TYPES: assessment_template, note_template, cds_rule, pathway_definition, treatment_plan_template, goal_bank_entry, order_set, locus_instrument, group_curriculum, screening_instrument. On submission, usePublishMarketplaceBundleVersion inserts the bundle row then the items in sequence — if the items insert fails after a successful bundle insert, an orphaned empty bundle row is left visible. On success, the user is navigated back to /cl/marketplace/curator. Authorization is enforced at the database layer via the cl_can_curate_marketplace SECURITY DEFINER helper.
Who it’s for
Requires permissioncl.marketplace.publish.
Before you start
You must hold thecl.marketplace.publish permission. A bundle_key identifies the bundle across versions — subsequent versions of the same bundle reuse the same bundle_key with a higher version integer. Prepare the items JSON array before submitting; a sample structure is pre-populated in the textarea.
Steps
Navigate to the curator editor
Go to
/cl/marketplace/curator/new, or click the create action from the curator list at /cl/marketplace/curator.Enter bundle metadata
Fill in the required fields: Bundle key (e.g.,
carf-sud-core), Version (integer starting at 1), and Name (e.g., CARF SUD Core Bundle). Optionally add a Description, accreditation tags (comma-separated), and clinical area tags (comma-separated).Author the items JSON array
Edit the Items textarea. Each element must be a JSON object with
item_type (one of the supported types listed below the field), item_key (non-empty string), and payload (object). An optional ordering integer can be provided; items default to their array index order.Submit the form
Click “Publish”. The form validates the items JSON client-side. If the JSON is invalid or any item fails validation, a destructive alert displays the parse error and submission is blocked. On success a toast confirms the published bundle name and version, and the page navigates back to the curator list.
Key concepts
Supported item types
Supported item types
MARKETPLACE_ITEM_TYPES (from src/cores/cl/types/marketplace.ts): assessment_template, note_template, cds_rule, pathway_definition, treatment_plan_template, goal_bank_entry, order_set, locus_instrument, group_curriculum, screening_instrument. Any other value will cause a client-side parse error.Non-transactional insert
Non-transactional insert
The publish mutation inserts the bundle row first, then inserts the items in a second call. These are not wrapped in a database transaction. An items insert failure after a successful bundle insert leaves an empty bundle visible in the catalogue. A future iteration is noted in the code comment to move publish to an Edge Function.
Parse error state
Parse error state
If the items textarea contains invalid JSON or a validation error (wrong type, missing key, etc.), an alert with variant
destructive appears below the form describing the error. Submission is blocked until the error is resolved.Related
Clinical
Overview of the Clinical core.
Governance & parity
Documentation coverage and governance.
This page documents shipped product behavior. It is not medical, legal, or
billing advice. Verify against your organization’s policies and applicable
regulations before using it for clinical, compliance, or billing decisions.
Protected health information (PHI) shown in the product is governed by your
tenant’s access controls and is never exposed in this documentation.
Documentation sources
Documentation sources
- src/routes/cl.tsx
- src/cores/cl/pages/MarketplaceCuratorEditorPage.tsx
- src/cores/cl/hooks/useMarketplaceCurator.ts
- src/cores/cl/types/marketplace.ts