Error orchestrating request response using openHIM Mapping Mediator

I have the below endpoint for mapping fhir resources to ehr in openEHR:

{
  "name": "FHIR-to-EHR",
  "description": "Map a FHIR Patient resource to an EHR in openEHR",
  "endpoint": {
    "pattern": "/fhir-ehr"
  },
  "transformation": {
    "input": "JSON",
    "output": "JSON"
  },
  "inputMapping": {
    "constants._type": "_type",
    "constants.archetype_node_id": "archetype_node_id",
    "constants.name.value": "name.value",
    "constants.subject.external_ref.id._type": "subject.external_ref.id._type",
    "constants.subject.external_ref.id.scheme": "subject.external_ref.id.scheme",
    "requestBody.identifier[0].value": "subject.external_ref.id.value",
    "constants.subject.external_ref.namespace": "subject.external_ref.namespace",
    "constants.subject.external_ref.type": "subject.external_ref.type",
    "constants.is_modifiable": "is_modifiable",
    "constants.is_queryable": "is_queryable"
  },
  "constants": {
    "_type": "EHR_STATUS",
    "archetype_node_id": "openEHR-EHR-EHR_STATUS.generic.v1",
    "name": {
      "value": "ehr status"
    },
    "subject": {
      "external_ref": {
        "id": {
          "_type": "GENERIC_ID",
          "scheme": "id_scheme",
          "value": "{{subjectId}}"
        },
        "namespace": "user_email",
        "type": "EMAIL"
      }
    },
    "is_modifiable": "true",
    "is_queryable": "true"
  },
  "requests": {
    "response": [
      {
        "id": "request1",
        "config": {
          "method": "post",
          "url": "http://localhost:8081/ehrbase/rest/openehr/v1/ehr/",
          "headers": {
            "Content-Type": "application/json",
            "Accept": "application/json",
            "Prefer": "return=representation"
          }
        }
      }
    ]
  }
}

And the following input:

{
    "resourceType": "Patient",
    "id": "1111101172",
    "extension": [
        {
            "url": "https://openimis.github.io/openimis_fhir_r4_ig/StructureDefinition/patient-is-head",
            "valueBoolean": false
        },
        {
            "url": "https://openimis.github.io/openimis_fhir_r4_ig/StructureDefinition/patient-card-issued",
            "valueBoolean": false
        },
        {
            "url": "https://openimis.github.io/openimis_fhir_r4_ig/StructureDefinition/patient-group-reference",
            "valueReference": {
                "reference": "Group/111111110",
                "type": "Group",
                "identifier": {
                    "type": {
                        "coding": [
                            {
                                "system": "https://openimis.github.io/openimis_fhir_r4_ig/CodeSystem/openimis-identifiers",
                                "code": "Code"
                            }
                        ]
                    },
                    "value": "111111119"
                }
            }
        }
    ],
    "identifier": [
        {
            "type": {
                "coding": [
                    {
                        "system": "https://openimis.github.io/openimis_fhir_r4_ig/CodeSystem/openimis-identifiers",
                        "code": "UUID"
                    }
                ]
            },
            "value": "F9DABEDA-56EC-448E-893C-91A486D3CD53"
        },
        {
            "type": {
                "coding": [
                    {
                        "system": "https://openimis.github.io/openimis_fhir_r4_ig/CodeSystem/openimis-identifiers",
                        "code": "Code"
                    }
                ]
            },
            "value": "111111117"
        }
    ],
    "name": [
        {
            "use": "usual",
            "family": "Manth",
            "given": [
                "Aby"
            ]
        }
    ],
    "gender": "female",
    "birthDate": "2001-05-17",
    "address": [
        {
            "extension": [
                {
                    "url": "https://openimis.github.io/openimis_fhir_r4_ig/StructureDefinition/address-municipality",
                    "valueString": "Achi"
                },
                {
                    "url": "https://openimis.github.io/openimis_fhir_r4_ig/StructureDefinition/address-location-reference",
                    "valueReference": {
                        "reference": "Location/R1D1M1V1",
                        "type": "Location",
                        "identifier": {
                            "type": {
                                "coding": [
                                    {
                                        "system": "https://openimis.github.io/openimis_fhir_r4_ig/CodeSystem/openimis-identifiers",
                                        "code": "Code"
                                    }
                                ]
                            },
                            "value": "R1D1M1V1"
                        }
                    }
                }
            ],
            "use": "home",
            "type": "physical",
            "text": "Jetset zone 85",
            "city": "Rachla",
            "district": "Rapta",
            "state": "Ultha"
        }
    ],
    "photo": [
        {
            "contentType": "jpg",
            "url": "http://demo.openimis.org/photo/Images/Updated//111111117_E00001_20180327_0.0_0.0.jpg",
            "title": "111111117_E00001_20180327_0.0_0.0.jpg",
            "creation": "2018-03-27"
        }
    ]
}

The endpoint was successfully posted using Postman, while the input returns the following error while attempting to make a post request to the endpoint “connect ECONNREFUSED 127.0.0.1: 8081”.

Could someone help look into both the endpoint and input to troubleshoot what the likely problem could be.

@costateixeira any thoughts here? Or someone to direct @behordeun to?