Skip to content

Add treatment_transfer schema for entity transfer tracking#48

Merged
stevevanhooser merged 1 commit into
mainfrom
claude/ndi-matlab-did2-migration-Dp03V
May 19, 2026
Merged

Add treatment_transfer schema for entity transfer tracking#48
stevevanhooser merged 1 commit into
mainfrom
claude/ndi-matlab-did2-migration-Dp03V

Conversation

@stevevanhooser
Copy link
Copy Markdown
Contributor

Summary

This PR introduces a new treatment_transfer schema class to the V_delta stable tier, enabling documentation and tracking of entity transfers between subjects in experimental or clinical settings.

Key Changes

  • New schema file: schemas/V_delta/stable/treatment_transfer.json

    • Defines a new document class treatment_transfer (v1.0.0) that extends the base class
    • Marked as stable maturity level
  • Schema structure:

    • Dependencies: Requires recipient_id (non-empty) and optional donor_id to track transfer source and destination
    • Core fields:
      • timestamp: Transfer occurrence time (supports both global and local clocks)
      • clocktype: Clock type specification for the timestamp
      • entity_name and entity_ontology_node: Paired fields to identify what was transferred (e.g., 'blood', 'medium') with ontology support
      • method_name and method_ontology_node: Paired fields to describe the transfer method (e.g., 'blood transfusion', 'titanium pick') with ontology support
  • Index update: Registered the new treatment_transfer class in schemas/V_delta/index.json with appropriate metadata

Notable Details

  • All fields except recipient_id are optional, allowing flexible documentation of transfers
  • Ontology node fields use CURIE format (e.g., 'EMPTY:0000002', 'UBERON:3373') for standardized entity and method identification
  • Timestamp supports a wide range of values (-10M to 10M) to accommodate various clock systems
  • All text fields have reasonable length constraints (128-256 characters)

https://claude.ai/code/session_01DtHfxqZ6bqCSFoNFmS2h7E

Imported from NDI-matlab's v1
src/ndi/ndi_common/schema_documents/treatment/treatment_transfer_schema.json
with the universal V_alpha -> V_delta renames applied:

- Top-level: classname/superclasses promoted under document_class
  with class_version 1.0.0, maturity_level stable, and the
  V_delta {class_name} superclass-reference shape.
- depends_on: mustbenotempty (lowercase, 0/1) -> mustBeNonEmpty
  (camelCase boolean); documentation strings filled; empty
  must_refer_to_document_class to match the treatment/treatment_drug
  pattern.
- fields: string -> char; queryable 0/1 -> boolean; v1 parameters
  collapsed into V_delta constraints (min/max for timestamp,
  maxLength for char fields); blank_value/default_value separated;
  mustBeScalar/mustNotHaveNaN populated.
- snake_case rename: entity_ontologyNode -> entity_ontology_node,
  method_ontologyNode -> method_ontology_node.

Sibling of treatment and treatment_drug in V_delta/stable. Registered
in V_delta/index.json. Preserves the v1 paired-fields shape (name +
ontology_node), matching what treatment.json currently ships rather
than the future ontology_term collapse described in
conversions/from_did_v1/treatment.md.

Closes the only blocking gap for NDI-matlab issue #774c (deprecate
the bundled schema_documents directory): the other two v1 NDI
schemas missing from V_delta (animalsubject, subjectmeasurement)
are being retired upstream.
@stevevanhooser stevevanhooser merged commit 5290176 into main May 19, 2026
4 checks passed
@stevevanhooser stevevanhooser deleted the claude/ndi-matlab-did2-migration-Dp03V branch May 19, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants