Skip to content

Hook Design Best Practices

Kevin Shekleton edited this page Feb 2, 2018 · 1 revision

This is a draft set of best practices, spurred from the discussion on #162.

Naming

  • Use camelCase when naming fields
  • Field names should be concise and descriptive
  • Consistency amongst other hooks should be valued
  • If the field is an Id rather than resource (Patient.id vs Patient FHIR resource), name the field <resource>Id (eg, patientId)
  • Use plural form for arrays or multiples (eg, patients, not patient, patientList, patientArray, etc)

Data Types

  • If the data can be expressed in FHIR, it should be