-
To get the app to run I changed the
main
entry in thepackage.json
. This was pointing to a non-existing file before, so I pointed it to theindex.tsx
. -
I analysed the native code and tried to build both the
android
andios
folders using Android Studio and Xcode respectively in an effort to circumvent Expo CNG. However, I couldn't get the builds to fail or find any runtime error. The native code seems to be purely auto-generated code that bridges between the native app and React Native.
- I added a new
User
type. For this demo it only contains anid
but more properties could be added. - I added a new
ConsentAgreement
type such that the consent agreements are not inherently linked to patients. This way we can use the same type for users as well. - To distinguish between patient consents and user consents, I created the
PatientConsents
andUserConsents
types, which contain the patient/userid
and their correspondingConsentAgreement[]
.
- To add types to the API but keep the functions for reading/writing data generic, I chose to make the generic functions private (e.g. not export the from the
api
module) and export typed verions of those functions.
- To make the UI for displaying and editing consents reusable, such that we can use it for both patients and users, I encapsulated this functionality in a
Consents
component.