Skip to content

Conversation

@AugustijnVrolijk
Copy link
Contributor

recommended_fields -> recommended. To make it more machine readable..

recommended_fields -> recommended. To make it more machine readable..
@AugustijnVrolijk
Copy link
Contributor Author

AugustijnVrolijk commented Aug 8, 2025

Somewhat unrelated. For metadata of "type: object". Would people consider moving required/recommended fields for objects with properties to objects.enums. Or objects.metadata?

Making this consistent would make it more machine readable, and allow for treatment of property keys as "strict" objects with an easily findable definition (i.e. shema.objects.metadata.get(name)).

This is sometimes done, i.e. for StimulusPresentation:

StimulusPresentation:
  name: StimulusPresentation
  display_name: Stimulus Presentation
  description: |
    Object containing key-value pairs related to the software used to present
    the stimuli during the experiment.
  type: object
recommended:
    - OperatingSystem
    - ScreenDistance
    - ScreenRefreshRate
    - ScreenResolution
    - ScreenSize
    - SoftwareName
    - SoftwareRRID
    - SoftwareVersion
    - Code
    - HeadStabilization
  properties:
    OperatingSystem:
      $ref: objects.metadata.OperatingSystem
    ScreenDistance:
      $ref: objects.metadata.ScreenDistance
    ScreenRefreshRate:
      $ref: objects.metadata.ScreenRefreshRate

But othertimes ignored, i.e. for DeidentificationMethodCodeSequence:

DeidentificationMethodCodeSequence:
  name: DeidentificationMethodCodeSequence
  display_name: Deidentification Method Code Sequence
  description: |
    A sequence of code objects describing the mechanism or method use to remove the Patient's identity.
    Corresponds to [DICOM Tag 0012, 0064](https://dicomlookup.com/dicomtags/(0012,0064))
    `De-identification Method Code Sequence`.
  type: array
  items:
    type: object
    recommended_fields:
      - CodeValue
      - CodeMeaning
      - CodingSchemeDesignator
      - CodingSchemeVersion
    properties:
      CodeValue:
        name: CodeValue
        type: string
        description: |
          An identifier that is unambiguous within the Coding Scheme
          denoted by Coding Scheme Designator and Coding Scheme Version.
          Corresponds to [DICOM Tag 0008, 0100](https://dicomlookup.com/dicomtags/(0008,0100)) `Code Value`.
      CodeMeaning:
        name: CodeMeaning
        type: string
        description: |
          Text that has meaning to a human and conveys the meaning of the term
          Corresponds to [DICOM Tag 0008, 0104](https://dicomlookup.com/dicomtags/(0008,0104)) `Code Meaning`.
      CodingSchemeDesignator:
        name: CodingSchemeDesignator
        type: string
        description: |
          The identifier of the coding scheme in which the coded entry is defined.
          Corresponds to [DICOM Tag 0008, 0102](https://dicomlookup.com/dicomtags/(0008,0102))
          `Coding Scheme Designator`.
      CodingSchemeVersion:
        name: CodingSchemeVersion
        type: string
        description: |
          An identifier of the version of the coding scheme if necessary to resolve ambiguity.
          Corresponds to [DICOM Tag 0008, 0103](https://dicomlookup.com/dicomtags/(0008,0103)) `Coding Scheme Version`.

Copy link
Collaborator

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Good catch.

@effigies effigies merged commit 6d37b9e into bids-standard:maint/1.10.0 Aug 14, 2025
18 of 19 checks passed
@effigies effigies added schema Issues related to the YAML schema representation of the specification. Patch version release. exclude-from-changelog This item will not feature in the automatically generated changelog labels Aug 14, 2025
@effigies
Copy link
Collaborator

Somewhat unrelated. For metadata of "type: object". Would people consider moving required/recommended fields for objects with properties to objects.enums. Or objects.metadata?

objects.metadata makes sense to me. They aren't really enumerated values, but subfields. Feel free to open a PR. I would do it against master, though, not maint/*.

@AugustijnVrolijk AugustijnVrolijk deleted the patch-1 branch August 19, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exclude-from-changelog This item will not feature in the automatically generated changelog schema Issues related to the YAML schema representation of the specification. Patch version release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants