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

Refactor FHIRCarePlanGenerator Class #3386

Open
1 task
f-odhiambo opened this issue Jul 17, 2024 · 1 comment
Open
1 task

Refactor FHIRCarePlanGenerator Class #3386

f-odhiambo opened this issue Jul 17, 2024 · 1 comment
Labels
Enhancement New feature or request

Comments

@f-odhiambo
Copy link
Contributor

f-odhiambo commented Jul 17, 2024

This is a follow-up for #3385 to be worked on in the next CHT

Sample code

listOf(CanonicalType("PlanDefinition/$canonicalValue"))
@f-odhiambo
Copy link
Contributor Author

Here is one

 // TODO refactor this code to remove hardcoded appended "PlanDefinition/" on https://github.com/opensrp/fhircore/issues/3386
  private fun CarePlan.cleanPlanDefinitionCanonical() {
    val canonicalValue = this.instantiatesCanonical.first().value
    if (canonicalValue.contains('/').not()) {
      this.instantiatesCanonical = listOf(CanonicalType("PlanDefinition/$canonicalValue"))
    }
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant