Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/srdc/onfhir
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuncay Namli committed Oct 24, 2024
2 parents 9737273 + 8f98d83 commit bd3d6bb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Execute one of the following commands from the project.root.directory (../)

#Linux addJar
docker build -f docker/Dockerfile-addJar --build-arg FHIR_VERSION=r4 -t srdc/onfhir:r4 .
docker build -f docker/Dockerfile-addJar --build-arg FHIR_VERSION=r5 -t srdc/onfhir:r5 .

#Windows addJar
docker build -f docker\Dockerfile-addJar --build-arg FHIR_VERSION=r4 -t srdc/onfhir:r4 .
docker build -f docker\Dockerfile-addJar --build-arg FHIR_VERSION=r5 -t srdc/onfhir:r5 .

# buildJar
docker build -f docker/Dockerfile-buildJar --build-arg FHIR_VERSION=r4 -t srdc/onfhir:r4 .
docker build -f docker\Dockerfile-buildJar --build-arg FHIR_VERSION=r4 -t srdc/onfhir:r4 .

5 changes: 5 additions & 0 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ if [ ! -z "$AUDIT_SERVER_ROOT_URL" ]; then
JAVA_CMD+="-Dfhir.auditing.is-secure=true "
fi

#Configure
if [ ! -z "$FAILED_REQUEST_LOGGING" ]; then
JAVA_CMD+="-Dfhir.failed-request-logging=$FAILED_REQUEST_LOGGING "
fi

# Configure Authz Server URL
if [ ! -z "$AUTHZ_SERVER_ROOT_URL" ]; then
JAVA_CMD+="-Dfhir.authorization.authz-server-url=$AUTHZ_SERVER_ROOT_URL "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class ExpandOperationHandler(fhirConfigurationManager:IFhirConfigurationManager)
final val SEARCHPARAM_URL: String = "url"
final val EXPAND_PARAM_FILTER: String = "filter"
final val EXPAND_PARAM_LANGUAGE: String = "displayLanguage"
final val EXPAND_PARAM_INCLUDE_DESIGNATIONS: String = "includeDesignations"

/**
* Execute the operation and prepare the output parameters for the operation
Expand Down Expand Up @@ -114,6 +115,7 @@ class ExpandOperationHandler(fhirConfigurationManager:IFhirConfigurationManager)

val filterKeys: Seq[String] = operationRequest.extractParamValue[String](EXPAND_PARAM_FILTER).getOrElse("").split(",").toIndexedSeq
val language: Option[String] = operationRequest.extractParamValue[String](EXPAND_PARAM_LANGUAGE)
val includeDesignations: Boolean = operationRequest.extractParamValue[Boolean](EXPAND_PARAM_INCLUDE_DESIGNATIONS).getOrElse(false)

// 1) First, filter all the matching concepts
val matchingList:Seq[JObject] = compose \ "include" match {
Expand All @@ -128,6 +130,7 @@ class ExpandOperationHandler(fhirConfigurationManager:IFhirConfigurationManager)
(filteredConcept.get \ "code").extractOpt[String].foreach(c => {matching = matching ~ ("code" -> c)})
(filteredConcept.get \ "display").extractOpt[String].foreach(d => {matching = matching ~ ("display" -> d)})
(filteredConcept.get \ "extension").extractOpt[JArray].foreach(arr => {matching = matching ~ ("extension" -> arr)})
if(includeDesignations) {(filteredConcept.get \ "designation").extractOpt[JArray].foreach(arr => {matching = matching ~ ("designation" -> arr)})}
Some(matching)
} else None
})
Expand Down Expand Up @@ -165,6 +168,7 @@ class ExpandOperationHandler(fhirConfigurationManager:IFhirConfigurationManager)
(input \ "code").extractOpt[String].foreach(c => {output = output ~ ("code" -> c)})
(input \ "display").extractOpt[String].foreach(d => {output = output ~ ("display" -> d)})
(input \ "extension").extractOpt[JArray].foreach(arr => {output = output ~ ("extension" -> arr)})
(input \ "designation").extractOpt[JArray].foreach(arr => {output = output ~ ("designation" -> arr)})

// If there is a language filter, update the display attribute accordingly
if (language.nonEmpty) {
Expand Down

0 comments on commit bd3d6bb

Please sign in to comment.