Skip to content

Commit

Permalink
Merge branch 'main' into measure-format-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dubdabasoduba authored Aug 14, 2023
2 parents e4eb0fe + d9fddf7 commit 715473b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/release
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# .github/release.yml

---
changelog:
exclude:
labels:
- ignore-for-release
authors:
- dependabot
categories:
- title: Added :tada:
- title: Added 🎉
labels:
- new-feature
- Enhancement
- breaking-change
- title: Fixed 🛠
- title: Fixed 🛠
labels:
- bug-fix
- enhancement
- title: Changed
labels:
- "*"
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ constructor(
val subject =
loadResource(ResourceType.valueOf(subjectIdType.resourceType), subjectIdType.idPart)

if (subject != null && bundle != null) {
if (subject != null) {
val newBundle = bundle.copyBundle(currentQuestionnaireResponse)
generateCarePlan(
subject = subject,
Expand All @@ -246,14 +246,14 @@ constructor(
softDeleteResources(questionnaireConfig)

val idTypes =
bundle?.entry?.map { IdType(it.resource.resourceType.name, it.resource.logicalId) }
bundle.entry?.map { IdType(it.resource.resourceType.name, it.resource.logicalId) }
?: emptyList()
onSuccessfulSubmission(idTypes, currentQuestionnaireResponse)
}
}

suspend fun saveExtractedResources(
bundle: Bundle?,
bundle: Bundle,
questionnaire: Questionnaire,
questionnaireConfig: QuestionnaireConfig,
currentQuestionnaireResponse: QuestionnaireResponse,
Expand All @@ -270,7 +270,7 @@ constructor(
date = extractionDate
}

bundle?.entry?.forEach { bundleEntryComponent ->
bundle.entry?.forEach { bundleEntryComponent ->
bundleEntryComponent.resource?.run {
applyResourceMetadata()
val subjectType = questionnaireSubjectType(questionnaire, questionnaireConfig)
Expand Down Expand Up @@ -366,7 +366,7 @@ constructor(
questionnaire: Questionnaire,
questionnaireResponse: QuestionnaireResponse,
context: Context,
): Bundle? =
): Bundle =
kotlin
.runCatching {
if (extractByStructureMap) {
Expand Down Expand Up @@ -407,7 +407,7 @@ constructor(
}
}
}
.getOrDefault(null)
.getOrDefault(Bundle())

/**
* This function saves [QuestionnaireResponse] as draft if any of the [QuestionnaireResponse.item]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ class QuestionnaireViewModelTest : RobolectricTest() {
context = context,
)
Assert.assertNotNull(bundle)
Assert.assertTrue(bundle?.entryFirstRep?.resource is Patient)
Assert.assertEquals(patient.id, bundle?.entryFirstRep?.resource?.id)
Assert.assertTrue(bundle.entryFirstRep?.resource is Patient)
Assert.assertEquals(patient.id, bundle.entryFirstRep?.resource?.id)
unmockkObject(ResourceMapper)
}

Expand All @@ -382,8 +382,8 @@ class QuestionnaireViewModelTest : RobolectricTest() {
context = context,
)
Assert.assertNotNull(bundle)
Assert.assertTrue(bundle?.entryFirstRep?.resource is Patient)
Assert.assertEquals(patient.id, bundle?.entryFirstRep?.resource?.id)
Assert.assertTrue(bundle.entryFirstRep?.resource is Patient)
Assert.assertEquals(patient.id, bundle.entryFirstRep?.resource?.id)
unmockkObject(ResourceMapper)
}

Expand Down

0 comments on commit 715473b

Please sign in to comment.