Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate patient fields from metadata shared between server and client #185

Merged
merged 34 commits into from
Sep 8, 2022

Commits on Aug 31, 2022

  1. Create Metadata class to store field metadata

    Move patient field setup into metadata/patient.js.
    fwextensions committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    12a86cf View commit details
    Browse the repository at this point in the history
  2. Move metadata into src/metadata

    CRA annoyingly refuses to import anything from outside that folder.
    fwextensions committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    638c97f View commit details
    Browse the repository at this point in the history
  3. Add getters/setters to Ringdown based on field metadata from patient

    Also generate PropTypes from field metadata.
    Use a shared DeliveryStatus in Ringdown.js instead of defining a copy.
    Move deliveryStatus.js to src/constants/DeliveryStatus.js.
    Rename Metadata.js to ModelMetadata.js.
    Add FieldMetadata.js and convertToSequelizeField.js.
    fwextensions committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    0310650 View commit details
    Browse the repository at this point in the history
  4. Prettier nonsense

    fwextensions committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    c021cc6 View commit details
    Browse the repository at this point in the history
  5. Add new fields to patient metadata

    Add PatientFields and Ringdown changes from 169-ems-update-form branch.
    Fix default value for status indicator.
    fwextensions committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    13cacd1 View commit details
    Browse the repository at this point in the history
  6. Add migration for new fields in patient database

    Pass table and model names to ModelMetadata constructor.
    fwextensions committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    b2d558d View commit details
    Browse the repository at this point in the history
  7. Tweak names in migration

    Pass the type instead of the whole field object.
    Prettier and eslint nonsense.
    fwextensions committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    185fb35 View commit details
    Browse the repository at this point in the history
  8. Refactor ModelMetadata

    Use getFieldHash() for getting the prop types as well, passing in convertToPropType.
    fwextensions committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    b4b39ad View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ce55e04 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    f1a4eee View commit details
    Browse the repository at this point in the history
  11. Create Form component to provide context to fields

    Provide ringdown data and onChange handler to form fields via the Form context.
    Create Field component to generate checkboxes, numeric inputs, and text areas based on the metadata type.
    Add label and unit strings to the patient metadata.
    Tweak restraint label.
    fwextensions committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    ea894db View commit details
    Browse the repository at this point in the history
  12. Move Field component into FormField.js

    Add form to wrap children and receive props in Form component.
    Remove unnecessary fragment wrapper on PatientFields.
    Fix degree symbol on temp.
    fwextensions committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    ae71c02 View commit details
    Browse the repository at this point in the history
  13. Add propTypes to Form.js

    Update prettier to 2.7.1.
    Force Prettier to ignore parts of some files and allow it uglify others.
    fwextensions committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    dc3c960 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b0d4154 View commit details
    Browse the repository at this point in the history
  15. Fix wrapping in O2 label and field

    Make "optional" align right in the Header elemens by removing an extra div.
    fwextensions committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    2d9d881 View commit details
    Browse the repository at this point in the history
  16. Move Urgency field up into Incident info section

    Refactor and simplify creation of validationData in Ringdown.js.
    Update section labels in ringdown form.
    Fix Form.children prop type.
    fwextensions committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    c8dc2d5 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2022

  1. Add patientDelivery metadata

    In ModelMetadata, always add the created and updated fields to the model, so they don't have to get included over and over.
    fwextensions committed Sep 1, 2022
    Configuration menu
    Copy the full SHA
    023565e View commit details
    Browse the repository at this point in the history
  2. Add metadata for ambulance, emergencyMedicalServiceCall, and emergenc…

    …yMedicalServiceCallAmbulance
    fwextensions committed Sep 1, 2022
    Configuration menu
    Copy the full SHA
    44635e1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    85e5ba1 View commit details
    Browse the repository at this point in the history
  4. Make sure defaultValue included in Sequelize attributes, fix tests fo…

    …r new defaultValue default for booleans
    francisli committed Sep 1, 2022
    Configuration menu
    Copy the full SHA
    916a5b4 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2022

  1. Configuration menu
    Copy the full SHA
    273b9e3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    347748b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ee6ebda View commit details
    Browse the repository at this point in the history
  4. Add metadata for user

    Add support in convertToSequelizeField() for sequelize getters/setters, validate key and virtual type fields.
    fwextensions committed Sep 3, 2022
    Configuration menu
    Copy the full SHA
    56b95c4 View commit details
    Browse the repository at this point in the history
  5. Add defaultValue for timezone in organization to fix tests

    Simplify convertToSequelizeField.
    fwextensions committed Sep 3, 2022
    Configuration menu
    Copy the full SHA
    a6f084d View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2022

  1. Configuration menu
    Copy the full SHA
    4da5add View commit details
    Browse the repository at this point in the history
  2. Refactor ands simplify ModelMetadata

    Add toString method to FieldMetadata.
    fwextensions committed Sep 4, 2022
    Configuration menu
    Copy the full SHA
    dcad4ad View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    79c90e0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    928020a View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2022

  1. Create payload sub-objects and defaults programmatically

    Add metadata/index.js.
    Change createValidationData() to setValidationData(),.
    Get rid of ambulance and emsCall getters defined in class.
    fwextensions committed Sep 7, 2022
    Configuration menu
    Copy the full SHA
    37d7ae5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f942062 View commit details
    Browse the repository at this point in the history
  3. Add the field getters/setters to the Ringdown prototype

    Don't add them to every instance individually.
    fwextensions committed Sep 7, 2022
    Configuration menu
    Copy the full SHA
    59f96ad View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2022

  1. Configuration menu
    Copy the full SHA
    aeddf4a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bf469e5 View commit details
    Browse the repository at this point in the history