Skip to content

Commit c2e600f

Browse files
committed
Changes to support disabled AWS Validation Support
1 parent ef50f48 commit c2e600f

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/main/kotlin/uk/nhs/england/fhirvalidator/configuration/MessageProperties.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ open class MessageProperties {
3232

3333
val AWS_QUEUE_NAME = "aws.queueName"
3434
val AWS_QUEUE_ENABLED = "aws.queueEnabled"
35+
val AWS_VALIDATION_SUPPORT = "aws.validationSupport"
3536
val CDR_FHIR_SERVER = "cdr.fhirServer"
3637
val NPM_FHIR_SERVER = "npm.fhirServer"
3738
val VALIDATION_FHIR_SERVER = "validation.fhirServer"
@@ -229,6 +230,10 @@ open class MessageProperties {
229230
return getPropertyBoolean(AWS_QUEUE_ENABLED, false)
230231
}
231232

233+
fun getAWSValidationSupport(): Boolean {
234+
return getPropertyBoolean(AWS_VALIDATION_SUPPORT, false)
235+
}
236+
232237
fun getAwsApiKey(): String? {
233238
return getProperty(AWS_API_KEY)
234239
}

src/main/kotlin/uk/nhs/england/fhirvalidator/configuration/ValidationConfiguration.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ open class ValidationConfiguration(
7878
DefaultProfileValidationSupport(fhirContext),
7979
SnapshotGeneratingValidationSupport(fhirContext),
8080
CommonCodeSystemsTerminologyService(fhirContext),
81-
switchedTerminologyServiceValidationSupport,
82-
AWSValidationSupport(fhirContext, awsQuestionnaire,awsCodeSystem,awsValueSet, awsConceptMap)
81+
switchedTerminologyServiceValidationSupport
8382
)
83+
if (messageProperties.getAWSValidationSupport()) supportChain.addValidationSupport( AWSValidationSupport(fhirContext, awsQuestionnaire,awsCodeSystem,awsValueSet, awsConceptMap))
8484
getPackages()
8585
if (npmPackages != null) {
8686
npmPackages!!

src/main/resources/message.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ aws.pass=
3232
aws.apiKey=
3333
aws.queueName=TEST_FHIR_AuditEvent
3434
aws.queueEnabled=false
35+
aws.validationSupport=false
3536
cdr.fhirServer=https://cnuc9zdola.execute-api.eu-west-2.amazonaws.com/dev
3637
npm.fhirServer=https://3cdzg7kbj4.execute-api.eu-west-2.amazonaws.com/poc/utility
3738
validation.fhirServer=http://localhost:9001

0 commit comments

Comments
 (0)