From 9aafd1b2a8067c308e58c79df68fc421a32a8098 Mon Sep 17 00:00:00 2001 From: Shoaib Mushtaq Date: Thu, 28 Jul 2022 01:08:17 +0500 Subject: [PATCH] Fix some documentation and spotless apply --- .../android/fhir/datacapture/DataCaptureConfig.kt | 2 +- .../fhir/datacapture/QuestionnaireViewModel.kt | 4 ++-- .../fhir/datacapture/mapping/ResourceMapper.kt | 15 +++++++++------ .../mapping/StructureMapExtractionContext.kt | 8 +++----- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/datacapture/src/main/java/com/google/android/fhir/datacapture/DataCaptureConfig.kt b/datacapture/src/main/java/com/google/android/fhir/datacapture/DataCaptureConfig.kt index ffbadd062b..4b7bf17781 100644 --- a/datacapture/src/main/java/com/google/android/fhir/datacapture/DataCaptureConfig.kt +++ b/datacapture/src/main/java/com/google/android/fhir/datacapture/DataCaptureConfig.kt @@ -1,5 +1,5 @@ /* - * Copyright 2021 Google LLC + * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/datacapture/src/main/java/com/google/android/fhir/datacapture/QuestionnaireViewModel.kt b/datacapture/src/main/java/com/google/android/fhir/datacapture/QuestionnaireViewModel.kt index 8c81f63b2e..9de5226329 100644 --- a/datacapture/src/main/java/com/google/android/fhir/datacapture/QuestionnaireViewModel.kt +++ b/datacapture/src/main/java/com/google/android/fhir/datacapture/QuestionnaireViewModel.kt @@ -530,7 +530,7 @@ internal class QuestionnaireViewModel(application: Application, state: SavedStat /** * This function evaluates variable expression and return the evaluated result. To evaluate root - * [Questionnaire] level variable expressions, we only pass expression to this function and for + * [Questionnaire] level variable expressions, we pass only an expression to this function and for * variables expressions defined at questionnaire item [Questionnaire.QuestionnaireItemComponent] * level, we pass expression and respective questionnaire item to this function * @@ -583,7 +583,7 @@ internal class QuestionnaireViewModel(application: Application, state: SavedStat } /** - * Function to find a variable, first check at origin if not found, then check in parent + * Function to find a variable, first checks at origin if not found, then check in parent * hierarchy, if not found, then check at root level and return the Pair * * @param variableName the [String] to match the variable diff --git a/datacapture/src/main/java/com/google/android/fhir/datacapture/mapping/ResourceMapper.kt b/datacapture/src/main/java/com/google/android/fhir/datacapture/mapping/ResourceMapper.kt index f8218f2c5f..d7d0a8a491 100644 --- a/datacapture/src/main/java/com/google/android/fhir/datacapture/mapping/ResourceMapper.kt +++ b/datacapture/src/main/java/com/google/android/fhir/datacapture/mapping/ResourceMapper.kt @@ -1,5 +1,5 @@ /* - * Copyright 2021 Google LLC + * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,10 +62,12 @@ import org.hl7.fhir.r4.utils.StructureMapUtilities * [population](http://build.fhir.org/ig/HL7/sdc/populate.html). * * This class supports - * [Definition-based extraction](http://build.fhir.org/ig/HL7/sdc/extraction.html#definition-based-extraction), - * [StructureMap-based extraction](http://hl7.org/fhir/uv/sdc/extraction.html#structuremap-based-extraction), - * and - * [expression-based population](http://build.fhir.org/ig/HL7/sdc/populate.html#expression-based-population). + * [Definition-based extraction](http://build.fhir.org/ig/HL7/sdc/extraction.html#definition-based-extraction) + * , + * [StructureMap-based extraction](http://hl7.org/fhir/uv/sdc/extraction.html#structuremap-based-extraction) + * , and + * [expression-based population](http://build.fhir.org/ig/HL7/sdc/populate.html#expression-based-population) + * . * * See the [developer guide](https://github.com/google/android-fhir/wiki/SDCL%3A-Use-ResourceMapper) * for more information. @@ -87,7 +89,8 @@ object ResourceMapper { * [Bundle] is returned if [structureMapExtractionContext] is not provided. * * Otherwise, this method will perform - * [Definition-based extraction](http://hl7.org/fhir/uv/sdc/extraction.html#definition-based-extraction). + * [Definition-based extraction](http://hl7.org/fhir/uv/sdc/extraction.html#definition-based-extraction) + * . * * @param questionnaire A [Questionnaire] with data extraction extensions. * @param questionnaireResponse A [QuestionnaireResponse] with answers for [questionnaire]. diff --git a/datacapture/src/main/java/com/google/android/fhir/datacapture/mapping/StructureMapExtractionContext.kt b/datacapture/src/main/java/com/google/android/fhir/datacapture/mapping/StructureMapExtractionContext.kt index 90901bdc54..e0208b5ba4 100644 --- a/datacapture/src/main/java/com/google/android/fhir/datacapture/mapping/StructureMapExtractionContext.kt +++ b/datacapture/src/main/java/com/google/android/fhir/datacapture/mapping/StructureMapExtractionContext.kt @@ -1,5 +1,5 @@ /* - * Copyright 2021 Google LLC + * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,16 +21,14 @@ import org.hl7.fhir.r4.context.IWorkerContext import org.hl7.fhir.r4.model.StructureMap import org.hl7.fhir.r4.utils.StructureMapUtilities -/** - * Data used during StructureMap-based extraction. - */ +/** Data used during StructureMap-based extraction. */ data class StructureMapExtractionContext( /** The application context. */ val context: Context, /** * Optionally pass a custom version of [StructureMapUtilities.ITransformerServices] to support * specific use cases. - **/ + */ val transformSupportServices: StructureMapUtilities.ITransformerServices? = null, /** * A lambda function which returns a [StructureMap]. Depending on your app this could be