Skip to content

adriaanpardoel/melatech-interview-mobile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

Notes

Errors that prevent the app from running

  • To get the app to run I changed the main entry in the package.json. This was pointing to a non-existing file before, so I pointed it to the index.tsx.

  • I analysed the native code and tried to build both the android and ios 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.

Refactoring

Types

  • I added a new User type. For this demo it only contains an id 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 and UserConsents types, which contain the patient/user id and their corresponding ConsentAgreement[].

API

  • 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.

UI

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •