Skip to content

Calibration editor: PHI acknowledgment checkbox for controls #677

Description

@bencap

Summary

Add a PHI acknowledgment checkbox to CalibrationFields.vue that is displayed when one or more controls are present, wired to the controls_not_phi field in the draft calibration state.

Background

Submitters must affirmatively assert that control data is not PHI before a calibration with controls can be published. The backend enforces this gate; the frontend must surface it clearly and require it to be checked before saving a non-private calibration.

Proposed Behavior

  • A checkbox labeled "I confirm that the control variant data provided does not contain protected health information (PHI)" appears in the calibration editor below the controls table, visible only when draft.controls is non-empty
  • The checkbox is bound to draft.controls_not_phi
  • If the user clears all controls, the checkbox is hidden (but controls_not_phi is not automatically reset — the backend ignores it when no controls are present)
  • An attempt to save a non-private calibration with controls but without the checkbox checked shows an inline validation error

Acceptance Criteria

  • Checkbox is shown when and only when controls are present in the editor
  • Checking/unchecking the box updates draft.controls_not_phi
  • Saving a non-private calibration with controls but unchecked shows a validation error
  • Checkbox is hidden when no controls are present
  • The checkbox label clearly states the PHI assertion in plain language

Implementation Notes

  • Checkbox visibility is driven purely by draft.controls?.length > 0
  • Use inline validation error messaging consistent with the existing useValidationErrors pattern — do not disable the save button
  • Depends on controls wiring issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions