Skip to content

Conversation

owais-vd
Copy link
Collaborator

@owais-vd owais-vd commented Oct 6, 2023

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #[issue number]

Description
Clear and concise code change description.

Alternative(s) considered
Have you considered any alternatives? And if so, why have you chosen the approach in this PR?

Type
Choose one: (Bug fix | Feature | Documentation | Testing | Code health | Builds | Releases | Other)

Screenshots (if applicable)

Checklist

  • I have read and acknowledged the Code of conduct.
  • I have read the Contributing page.
  • I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

@owais-vd owais-vd requested review from santosh-pingle and a team as code owners October 6, 2023 08:26
@owais-vd owais-vd requested a review from jingtang10 October 6, 2023 08:26
ndegwamartin added a commit to opensrp/android-fhir that referenced this pull request Oct 11, 2023
@jingtang10
Copy link
Collaborator

@dubdabasoduba @owais-vd thanks for this pr - can you please update the pr description to explain why this is needed and link to an issue? thanks!

ndegwamartin added a commit to opensrp/android-fhir that referenced this pull request Oct 13, 2023
- Disable eTAGS
- Minor Data Capture release with PR google#2230
ndegwamartin added a commit to opensrp/android-fhir that referenced this pull request Oct 13, 2023
  - With unmerged PR #11
  - Wup google#1669
  - Wup #9
  - Wup google#2178
  - Wup #10
  - Wup google#2230
  - Wup google#2262
@owais-vd
Copy link
Collaborator Author

Hi @jingtang10 Getting the following exception because of http://fhir.org/guides/who/core/ValueSet/pregnancystatus-val duplicate URL. I've extracted the package.r4.tgz file and noticed that both files ValueSet-pregnancystatuspregnant-value.json and ValueSet-pregnancystatus-values.json have the same URL. I think both value-set can't have the same URL.

For testing purposes, I extracted the package.r4.tgz file and updated the URL, and see it's working as expected. I think we no longer need this PR change.

I think this should be fixed here https://github.com/WorldHealthOrganization/smart-immunizations

org.hl7.fhir.exceptions.DefinitionException: Duplicate Resource http://fhir.org/guides/who/core/ValueSet/pregnancystatus-val
	at org.hl7.fhir.r4.context.BaseWorkerContext.cacheResource(BaseWorkerContext.java:182)
	at org.hl7.fhir.r4.context.SimpleWorkerContext.loadFromFileJson(SimpleWorkerContext.java:276)
	at org.hl7.fhir.r4.context.SimpleWorkerContext.loadDefinitionItem(SimpleWorkerContext.java:221)
	at org.hl7.fhir.r4.context.SimpleWorkerContext.loadFromPackage(SimpleWorkerContext.java:295)
	at org.hl7.fhir.r4.context.SimpleWorkerContext.fromPackage(SimpleWorkerContext.java:159)
	at com.google.android.fhir.datacapture.DataCaptureConfig$simpleWorkerContext$2.invoke(DataCaptureConfig.kt:74)
	at com.google.android.fhir.datacapture.DataCaptureConfig$simpleWorkerContext$2.invoke(DataCaptureConfig.kt:73)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at com.google.android.fhir.datacapture.DataCaptureConfig.getSimpleWorkerContext$datacapture_release(DataCaptureConfig.kt:
	at com.google.android.fhir.datacapture.mapping.ResourceMapper.extractByStructureMap(ResourceMapper.kt:204)
	at com.google.android.fhir.datacapture.mapping.ResourceMapper.extract(ResourceMapper.kt:142)
	at com.google.android.fhir.datacapture.mapping.ResourceMapper.extract$default(ResourceMapper.kt:106)
	at org.smartregister.fhircore.quest.ui.questionnaire.QuestionnaireViewModel.performExtraction(QuestionnaireViewModel.kt:4
	at org.smartregister.fhircore.quest.ui.questionnaire.QuestionnaireViewModel$handleQuestionnaireSubmission$1.invokeSuspend

cc: @dubdabasoduba

@owais-vd
Copy link
Collaborator Author

closing this PR as we no longer need this

@owais-vd owais-vd closed this Oct 16, 2023
@owais-vd owais-vd deleted the hotifx/simple-worker-context branch October 16, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

3 participants