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 PDF config properties in QuestionnaireConfig #3498

Merged
merged 14 commits into from
Sep 27, 2024
Prev Previous commit
Next Next commit
Cleanup
  • Loading branch information
FikriMilano committed Sep 26, 2024
commit bbea8c7cae9acf73dcaf0d5fc239051a864b2b82
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ constructor(
* Retrieve the [QuestionnaireResponse] for the given questionnaire and subject.
*
* @param questionnaireId The ID of the questionnaire.
* @param subjectReference The ID of the subject.
* @param subjectReference The reference of the subject e.g. Patient/123.
* @return The [QuestionnaireResponse] if found, otherwise null.
*/
suspend fun retrieveQuestionnaireResponse(
questionnaireId: String,
subjectReference: String,
): QuestionnaireResponse? {
val searchQuery =
createQuestionnaireResponseSearchQuery(questionnaireId, subjectId, subjectType)
createQuestionnaireResponseSearchQuery(questionnaireId, subjectReference)
return defaultRepository.search<QuestionnaireResponse>(searchQuery).maxByOrNull {
it.meta.lastUpdated
}
Expand All @@ -62,7 +62,7 @@ constructor(
* Create a search query for [QuestionnaireResponse].
*
* @param questionnaireId The ID of the questionnaire.
* @param subjectReference The ID of the subject.
* @param subjectReference The reference of the subject e.g. Patient/123.
* @return The search query for [QuestionnaireResponse].
*/
private fun createQuestionnaireResponseSearchQuery(
Expand Down