Skip to content

Commit

Permalink
Code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
calmwalija committed Jul 31, 2024
1 parent 2a3732e commit b311d01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ constructor(val fhirEngine: FhirEngine, val transformSupportServices: TransformS
fhirEngine.get<Task>(id).apply {
this.status = encounterStatusToTaskStatus(encounterStatus)
this.lastModified = Date()
if (encounterReference != null) {
this.encounter = Reference(encounterReference)
}
this.encounter = Reference(encounterReference)
}
resourcesToUpdate.add(task)
val carePlanId = task.getCarePlanId()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,7 @@ constructor(
val taskReference = backReference.asReference(ResourceType.Task)
val taskID = taskReference.extractId()
val encounterStatus = resource.status
val encounterReference = resource.asReference().extractId().removePrefix("#")

val encounterReference = resource.logicalId.removePrefix("#")
fhirCarePlanGenerator.completeTask(taskID, encounterStatus, encounterReference)
}
}
Expand Down

0 comments on commit b311d01

Please sign in to comment.