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

Add Location co-ordinates on questionnaire submission #2997

Merged
merged 77 commits into from
Mar 18, 2024

Conversation

DebbieArita
Copy link
Contributor

@DebbieArita DebbieArita commented Jan 22, 2024

IMPORTANT: Where possible all PRs must be linked to a Github issue

Fixes #3072

Engineer Checklist

  • I have written Unit tests for any new feature(s) and edge cases for bug fixes
  • I have added any strings visible on UI components to the strings.xml file
  • I have updated the CHANGELOG.md file for any notable changes to the codebase
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the project's style guide
  • I have built and run the FHIRCore app to verify my change fixes the issue and/or does not break the app
  • I have checked that this PR does NOT introduce breaking changes that require an update to Content and/or Configs? If it does add a sample here or a link to exactly what changes need to be made to the content.

Code Reviewer Checklist

  • I have verified Unit tests have been written for any new feature(s) and edge cases
  • I have verified any strings visible on UI components are in the strings.xml file
  • I have verifed the CHANGELOG.md file has any notable changes to the codebase
  • I have verified the solution has been implemented in a configurable and generic way for reuseable components
  • I have built and run the FHIRCore app to verify the change fixes the issue and/or does not break the app

@DebbieArita DebbieArita marked this pull request as draft January 22, 2024 14:28
Copy link

codecov bot commented Jan 22, 2024

Codecov Report

Attention: Patch coverage is 14.40678% with 101 lines in your changes are missing coverage. Please review.

Project coverage is 29.6%. Comparing base (992b993) to head (ac82739).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main   #2997     +/-   ##
=========================================
- Coverage     29.8%   29.6%   -0.2%     
- Complexity     652     658      +6     
=========================================
  Files          236     239      +3     
  Lines        11086   11204    +118     
  Branches      1929    1948     +19     
=========================================
+ Hits          3306    3323     +17     
- Misses        7350    7447     +97     
- Partials       430     434      +4     
Flag Coverage Δ
engine 66.2% <ø> (ø)
geowidget 47.2% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...smartregister/fhircore/quest/util/ResourceUtils.kt 88.8% <88.8%> (ø)
...e/quest/ui/questionnaire/QuestionnaireViewModel.kt 3.5% <33.3%> (+0.2%) ⬆️
...artregister/fhircore/quest/util/PermissionUtils.kt 21.4% <21.4%> (ø)
...smartregister/fhircore/quest/util/LocationUtils.kt 15.1% <15.1%> (ø)
...re/quest/ui/questionnaire/QuestionnaireActivity.kt 2.9% <0.0%> (-1.2%) ⬇️


if (applicationConfiguration.logQuestionnaireLocation) {
fusedLocationClient = LocationServices.getFusedLocationProviderClient(this)
getLocation()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this running in the foreground or background? If there is not a GPS fix, what happens?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pld There are some updates to the flow.

The GPS location request is made in the background when a questionnaire is launched. This is done after config, permissions and location services checks are complete. On submit, the GPS location - if available - is used to create the location resource.

@pld
Copy link
Member

pld commented Feb 9, 2024

is this tied to a specific issue?

@pld pld dismissed their stale review March 12, 2024 09:33

addressed

@qiarie qiarie linked an issue Mar 12, 2024 that may be closed by this pull request
return true
}

fun getLocationPermissionLauncher(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qiarie Update the link shared above. The above is a PR link for branch 0.2.5 but not a GitHub issue.

android/quest/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
@dubdabasoduba dubdabasoduba merged commit 402511d into main Mar 18, 2024
3 of 5 checks passed
@dubdabasoduba dubdabasoduba deleted the questionnaire-location branch March 18, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Location Logging Config Enums Capture GPS Coordinates of Where a Questionnaire was Filled
8 participants