Skip to content

Commit

Permalink
Fix: [AEA-4049] - pass headers and body to FHIR validator lambda (#150)
Browse files Browse the repository at this point in the history
## Summary

- Routine Change

### Details

- pass body and headers to FHIR validator lambda
  • Loading branch information
anthony-nhs authored May 9, 2024
1 parent 0a890f2 commit 8da15b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"NumberFailedValidation.$": "States.ArrayLength($.Payload.issue[?(@.severity ==error)])"
},
"Next": "Do FHIR Validation Errors Exist",
"InputPath": "$.body",
"InputPath": "$",
"Catch": [
{
"ErrorEquals": [
Expand Down
8 changes: 6 additions & 2 deletions SAMtemplates/state_machines/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Parameters:
EnableSplunk:
Type: String

FihrValidatorStackName:
Type: String
Default: fhir-validator

Resources:
UpdatePrescriptionStatusStateMachine:
Type: AWS::Serverless::StateMachine
Expand All @@ -33,7 +37,7 @@ Resources:
DefinitionSubstitutions:
FhirValidationFunctionArn: !Join
- ":"
- - !ImportValue fhir-validator:FHIRValidatorUKCoreLambdaArn
- - Fn::ImportValue: !Sub ${FihrValidatorStackName}:FHIRValidatorUKCoreLambdaArn
- snap
UpdatePrescriptionStatusFunctionArn: !Sub ${UpdatePrescriptionStatusFunctionArn}:$LATEST
Logging:
Expand All @@ -56,7 +60,7 @@ Resources:
AdditionalPolicies: !Join
- ","
- - Fn::ImportValue: !Sub ${StackName}:functions:${UpdatePrescriptionStatusFunctionName}:ExecuteLambdaPolicyArn
- !ImportValue fhir-validator:FHIRValidatorUKCoreExecuteLambdaPolicyArn
- Fn::ImportValue: !Sub ${FihrValidatorStackName}:FHIRValidatorUKCoreExecuteLambdaPolicyArn
LogRetentionInDays: !Ref LogRetentionInDays
CloudWatchKMSKeyId: !ImportValue account-resources:CloudwatchLogsKmsKeyArn
EnableSplunk: !Ref EnableSplunk
Expand Down

0 comments on commit 8da15b4

Please sign in to comment.