Neza-Backend merge requestshttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests2020-04-23T12:36:11+07:00https://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/41Setup CORS2020-04-23T12:36:11+07:00Jonathan Christopher JakubSetup CORSSetup CORS policy to allow all (temporary)Setup CORS policy to allow all (temporary)Jonathan Christopher JakubJonathan Christopher Jakubhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/40Add additional fields and filter fields for MonitoringCase2020-04-20T23:18:31+07:00Dave NathanaelAdd additional fields and filter fields for MonitoringCaseThis PR adds several addition on `MonitoringCase` and `MonitoringCaseHistory` and its filter/search/ordering fields:
- `is_medicated` to specify if the medication is finished
- `medication_outcome` to specify the outcome of the finished ...This PR adds several addition on `MonitoringCase` and `MonitoringCaseHistory` and its filter/search/ordering fields:
- `is_medicated` to specify if the medication is finished
- `medication_outcome` to specify the outcome of the finished medication
Also added more filter/search/ordering fields for `MonitoringCase` and `MonitoringCaseHistory` against its `investigation_case` relation field:
- `investigation_case__case_subject__name`,
- `investigation_case__case_subject__age`,
- `investigation_case__case_subject__is_male`,
- `investigation_case__case_subject__address`,
- `investigation_case__case_subject__district`,
- `investigation_case__case_subject__sub_district`,
- `investigation_case__case_subject__created_at`,
- `investigation_case__reference_case__case_relation`,
- `investigation_case__reference_case__medical_symptoms`,
- `investigation_case__reference_case__risk_factors`,
- `investigation_case__reference_case__is_referral_needed`,
- `investigation_case__reference_case__medical_facility_reference`,
- `investigation_case__reference_case__outcome`,
- `investigation_case__reference_case__created_at`,Dave NathanaelDave Nathanaelhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/39Increase depth of investigation case serializer recursive depth2020-04-20T23:13:10+07:00Jonathan Christopher JakubIncrease depth of investigation case serializer recursive depthJonathan Christopher JakubJonathan Christopher Jakubhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/38Increase Investigation Serializer Depth2020-04-20T11:11:02+07:00Jonathan Christopher JakubIncrease Investigation Serializer DepthJonathan Christopher JakubJonathan Christopher Jakubhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/37Fix Logs Pagination2020-04-20T01:36:02+07:00Jonathan Christopher JakubFix Logs Pagination* Fix logs being paginated but the queryset is not sliced per page size.* Fix logs being paginated but the queryset is not sliced per page size.Jonathan Christopher JakubJonathan Christopher Jakubhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/36[Bugfix] Generalized related ID field on History creation method2020-04-19T20:37:17+07:00Jonathan Christopher Jakub[Bugfix] Generalized related ID field on History creation methodThis commits include:
* Generalization of the related field (previously only accept UUID)
* Registration of history models to Django admin page
* Sort logs by recording timeThis commits include:
* Generalization of the related field (previously only accept UUID)
* Registration of history models to Django admin page
* Sort logs by recording timeJonathan Christopher JakubJonathan Christopher Jakubhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/35Implement rework on model revisions2020-04-19T18:28:33+07:00Dave NathanaelImplement rework on model revisionsDid some rework on how we handled revisions on `Account`, `CaseSubject`, `InvestigationCase`, and `MonitoringCase`. Introduced some new models to work with, especialy `HistoryModel`s
Very minimal change on API contract, will be reflecte...Did some rework on how we handled revisions on `Account`, `CaseSubject`, `InvestigationCase`, and `MonitoringCase`. Introduced some new models to work with, especialy `HistoryModel`s
Very minimal change on API contract, will be reflected on Postman API docs soonDave NathanaelDave Nathanaelhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/34Rework Monitoring, Account, Log2020-04-19T16:03:26+07:00Jonathan Christopher JakubRework Monitoring, Account, Log* Rework all monitoring
* Rework account, now have `author` (history of account has `author` but in UUID form)
* Rework logs to fetch histories from cases and accounts
* Fix save and delete method overriding
* Now uses `ModelViewSet`...* Rework all monitoring
* Rework account, now have `author` (history of account has `author` but in UUID form)
* Rework logs to fetch histories from cases and accounts
* Fix save and delete method overriding
* Now uses `ModelViewSet` with built-in filters
## Notes
* Careful when deleting or saving instance, make sure you pass (author=request.user.account), just like in the serializers and the perform_destroy
* The author assignment needs more checking (see /commons/models/save)
* String representations, properties, and model managers need testing (current coverage is 99%)
* **Needs heavy refactoring**Jonathan Christopher JakubJonathan Christopher Jakubhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/33Fix: set author on case_subject to reduce chaining the author value from case2020-04-15T19:14:22+07:00Jonathan Christopher JakubFix: set author on case_subject to reduce chaining the author value from case* Adding new field `author` on `case_subject` (same with the author field from `investigation_case`)
* Fix the log `object_id` field value to get from the `case_subject` author* Adding new field `author` on `case_subject` (same with the author field from `investigation_case`)
* Fix the log `object_id` field value to get from the `case_subject` authorJonathan Christopher JakubJonathan Christopher Jakubhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/32Reimplement MonitoringCase2020-04-14T20:33:45+07:00Dave NathanaelReimplement MonitoringCaseDave NathanaelDave Nathanaelhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/31PBI-8: Bugfix - Implement password validator and standardize all username to ...2020-04-14T20:33:12+07:00Jonathan Christopher JakubPBI-8: Bugfix - Implement password validator and standardize all username to lowercaseUpon registering, passwords are validated using:
* Minimum Length (8)
* Common Password
* All Numeric Password
Also, all usernames are lowercased.Upon registering, passwords are validated using:
* Minimum Length (8)
* Common Password
* All Numeric Password
Also, all usernames are lowercased.Jonathan Christopher JakubJonathan Christopher Jakubhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/30Remove unneeded fields from old MonitoringCase model2020-04-14T15:59:28+07:00Dave NathanaelRemove unneeded fields from old MonitoringCase modelRemoved:
- `outcome`: it's now part of `InvestigationCase`
- `checking_date`: related to `outcome`
- changed `is_regularly_treated` to `regular_medicine_intake` as a TextField for storing array of medicine intake history encoded as strin...Removed:
- `outcome`: it's now part of `InvestigationCase`
- `checking_date`: related to `outcome`
- changed `is_regularly_treated` to `regular_medicine_intake` as a TextField for storing array of medicine intake history encoded as stringified JSON.Dave NathanaelDave Nathanaelhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/29Remove positive case2020-04-13T23:57:32+07:00Dave NathanaelRemove positive caseDave NathanaelDave Nathanaelhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/28Implement Account Password Complexity Validator2020-04-14T20:33:14+07:00Jonathan Christopher JakubImplement Account Password Complexity Validator* On register serializer, password complexity is checked with a regex to assure it is not too simple* On register serializer, password complexity is checked with a regex to assure it is not too simpleJonathan Christopher JakubJonathan Christopher Jakubhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/27Bugfix: Fix is_verified on permission2020-04-09T17:35:50+07:00Jonathan Christopher JakubBugfix: Fix is_verified on permissionJonathan Christopher JakubJonathan Christopher Jakubhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/26Register Models to Django-Admin Page2020-04-08T21:51:41+07:00Jonathan Christopher JakubRegister Models to Django-Admin PageJonathan Christopher JakubJonathan Christopher Jakubhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/25Fix Account Creation Log Anonymous Author2020-04-08T13:22:57+07:00Jonathan Christopher JakubFix Account Creation Log Anonymous Author* Author is set to the newly created account
* Fix basename URL to achieve consistency between each route* Author is set to the newly created account
* Fix basename URL to achieve consistency between each routehttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/24Implement Profile Endpoint2020-04-07T20:46:34+07:00Jonathan Christopher JakubImplement Profile EndpointJonathan Christopher JakubJonathan Christopher Jakubhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/23Implement log listing for admin accounts2020-04-07T18:17:41+07:00Dave NathanaelImplement log listing for admin accountsShow all `Log` records when the request comes from an admin account, instead of showing only the owned `Log` records (by the account).Show all `Log` records when the request comes from an admin account, instead of showing only the owned `Log` records (by the account).Dave NathanaelDave Nathanaelhttps://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/ppti-mobile-apps-monitoring-wabah-tuberkolosis/neza-backend/-/merge_requests/22Implement Activity Log2020-04-07T19:28:04+07:00Jonathan Christopher JakubImplement Activity LogThese changes consist of:
* Implemented Log model
* Implemented Log list endpoint, filtered by the current user (all for admins)
* Integrate Log creation to cases' edit, creation, and deletionThese changes consist of:
* Implemented Log model
* Implemented Log list endpoint, filtered by the current user (all for admins)
* Integrate Log creation to cases' edit, creation, and deletion