Schema for Cleo Clinical Parameter Settings

From ClinicalParameterSettings.schema.yaml (cleo/ClinicalParameterSettings.schema)

---
$id: https://skeleton.botmd.io/cleo/ClinicalParameterSettings.schema
$schema: http://json-schema.org/draft-07/schema#

title: Clinical Parameter Settings
description: Settings for configuring miscellaneous monitoring formset and form settings. Note that the same settings are used for both monitoring formset and forms.

type: object
additionalProperties: false
required: []

properties:
  qa_parser:
    $ref: "/onform/QAParserSettings.schema"

  from_patient_metadata:
    title: From Patient Metadata (Deprecated)
    description: Deprecated. Use `create_submission_value_from_patient_metadata` instead. If `true`, a `SubmissionValue` will be created from the corresponding `PatientMetadataEntry`. Defaults to `false`.
    type: boolean

  from_patient_form_metadata:
    title: From Patient-Form Metadata (Deprecated)
    description: Deprecated. Use `create_submission_value_from_patient_form_metadata` instead. If `true`, a `SubmissionValue` will be created from the corresponding `PatientFormMetadataEntry`. Defaults to `false`.
    type: boolean

  hide_in_alert:
    title: Hide In Alert
    description: This clinical parameter will not be shown in the alert messages sent to clinicians. Defaults to `false`.

    type: boolean

  sort_order:
    title: Sort Order
    description: An arbitrary order of preference for display purposes. Default value is `1000`. Parameters with smaller `sortOrder` should appear earlier in the list.
    type: integer

  number_precision:
    title: Number Precision
    description: >-
      For numerical clinical parameters, this is used to control the precision for display purposes.
      _Note the misnomer: Precision here refers to number of decimal points._ Thus, `0` refers to whole number representation.
      Defaults to `null` where we dont set the precision on the returned values.

    type: integer
    minimum: 0

  is_temporary_url:
    title: Is temporary URL?
    description: Mark the string clinical parameter value as a temporary URL. Temporary URL will redirect to stitch link which will check for validity.
    type: boolean

  temporary_url_expiry:
    title: Temporary link expiry
    description: Validity (Hours) for url before it expired.

    type: integer
    minimum: 1

  expired_message:
    title: Expired Message
    description: Message to be display when temporary URL expired.
    type: string
    minLength: 1

  datetime_format:
    title: Datetime Format
    description: Format date-time clinical parameter using this [Python strftime style format](https://strftime.org/). Defaults to clinic's `datetime_format`.
    type: string
    minLength: 1

  time_format:
    title: Time Format
    description: Format time clinical parameter using this [Python strftime style format](https://strftime.org/). Defaults to `%H:%M`.
    type: string
    minLength: 1

  create_patient_metadata_entry:
    title: Create Patient Metadata Entry
    description: Create/Update the `PatientMetadataEntry` for submissions including this clinical parameter. Defaults to `false`.
    type: boolean

  create_patient_form_metadata_entry:
    title: Create Patient-Form Metadata Entry
    description: Create/Update the `PatientFormMetadataEntry` for submissions including this clinical parameter. Defaults to `false`.
    type: boolean

  create_patient_program_metadata_entry:
    title: Create Patient-Program Metadata Entry
    description: Create/Update the `PatientProgramMetadataEntry` for submissions including this clinical parameter. Defaults to `false`.
    type: boolean

  create_patient_program_form_metadata_entry:
    title: Create Patient-Program-Form Metadata Entry
    description: Create/Update the `PatientProgramFormMetadataEntry` for submissions including this clinical parameter. Defaults to `false`.
    type: boolean

  create_submission_value_from_patient_metadata:
    title: Create Submission Value From Patient Metadata
    description: If `true`, a `SubmissionValue` will be created from the corresponding `PatientMetadataEntry`. Defaults to `false`.
    type: boolean

  create_submission_value_from_patient_form_metadata:
    title: Create Submission Value From Patient-Form Metadata
    description: If `true`, a `SubmissionValue` will be created from the corresponding `PatientFormMetadataEntry`. Defaults to `false`.
    type: boolean

  create_submission_value_from_patient_program_metadata:
    title: Create Submission Value From Patient-Program Metadata
    description: If `true`, a `SubmissionValue` will be created from the corresponding `PatientProgramMetadataEntry`. Defaults to `false`.
    type: boolean

  create_submission_value_from_patient_program_form_metadata:
    title: Create Submission Value From Patient-Program-Form Metadata
    description: If `true`, a `SubmissionValue` will be created from the corresponding `PatientProgramFormMetadataEntry`. Defaults to `false`.
    type: boolean

  used_for_patient_metadata_entry:
    title: Used for Patient Metadata Entry
    description: If `true`, this clinicial parameter will be available for creation by clinician in the Patient metadata modal. Defaults to `false`.
    type: boolean

  used_for_patient_form_metadata_entry:
    title: Used for Patient-Form Metadata Entry
    description: If `true`, this clinicial parameter will be available for creation by clinician in the Patient-Form metadata modal. Defaults to `false`.
    type: boolean

  used_for_patient_program_metadata_entry:
    title: Used for Patient-Program Metadata Entry
    description: If `true`, this clinicial parameter will be available for creation by clinician in the Patient-Program metadata modal. Defaults to `false`.
    type: boolean

  used_for_patient_program_form_metadata_entry:
    title: Used for Patient-Program-Form Metadata Entry
    description: If `true`, this clinicial parameter will be available for creation by clinician in the Patient-Program-Form metadata modal. Defaults to `false`.
    type: boolean

  used_for_patient_event_metadata_entry:
    title: Used for Patient-Event Metadata Entry
    description: If `true`, this clinicial parameter will be available for creation by clinician in the Patient-Event metadata modal. Defaults to `false`.
    type: boolean

  formula:
    $ref: "#/definitions/Formula"

  options:
    $ref: "#/definitions/Options"
#end properties

definitions:
  Formula:
    title: Formula
    description: >-
      Use a Python formula to compute the value of this clinical parameter.
      Python code may be used here which is executed using [`exec`](https://docs.python.org/3/library/functions.html#exec).
      Note that `locals`/`globals` will be restricted and only populated with:

      1. extracted clinical parameters: `parameters: Mapping[str, ClinicalParameterValueT]`,
      2. patient metadata: `patient_metadata: Mapping[str, ClinicalParameterValueT]`),
      3. patient-form metadata: `patient_form_metadata: Mapping[str, ClinicalParameterValueT]`.

      The calculated value should be stored in a variable named `calculated`.

    type: string
    minLength: 1
  Options:
    title: Options
    description: For frontend to display possible value of the clinical parameters.
    type: array
    minItems: 1
    items:
      type: string
      minLength: 1
#end properties

[Main Page] [Schema Documentation] [Examples]