FHIR Patient Post 500 error

OpenMRS Version 2.4.0 Build e4adbd

Question: I am getting operation outcome error on FHIR patient post on local and as well demo. url - http://instanceIponAws:8080/openmrs/ws/fhir2/R4/Patient/ Searched the open MRS wiki. Could not find specifics on how to resolve this. Appreciate your support. error: 500 {

"resourceType": "OperationOutcome",

"text": {

    "status": "generated",

    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Failed to call access method: java.lang.UnsupportedOperationException: cannot find identifier type for null</pre></td>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t</tr>\n\t\t</table>\n\t</div>"

},

"issue": [

    {

        "severity": "error",

        "code": "processing",

        "diagnostics": "Failed to call access method: java.lang.UnsupportedOperationException: cannot find identifier type for null"

    }

]

}

payload used: {

"resourceType": "Patient",

"identifier": {

    "extension": [

        {

            "url": "http://fhir.openmrs.org/ext/patient/identifier#location",

            "valueReference": {

                "reference": "Location/92ab9667-4686-49af-8be8-65a4b58fc49c",

                "type": "Location"

            }

        }

    ],

    "use": "official",

    "type": {

        "text": "Test Identifier Type"

    },

    "value": "4444-6"

},

"name": [

    {

        "given": [

            "Adam"

        ],

        "family": "John"

    }

],

"gender": "male",

"birthDate": "2004-08-12",

"address": [

    {

        "state": "Mukono",

        "city": "Kampala",

        "country": "Uganda"

    }

]

}

Without identifier section getting following error. {

"resourceType": "OperationOutcome",

"text": {

    "status": "generated",

    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>'Patient#null' failed to validate with reason: Select a preferred identifier</pre></td>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t</tr>\n\t\t</table>\n\t</div>"

},

"issue": [

    {

        "severity": "error",

        "code": "processing",

        "diagnostics": "'Patient#null' failed to validate with reason: Select a preferred identifier"

    }

]

}