medic / cht-interoperability

CHT - eCHIS interoperability project
GNU Affero General Public License v3.0
2 stars 3 forks source link

OpenHIM is failing to forward path #17

Closed samuelimoisili closed 1 year ago

samuelimoisili commented 1 year ago

OpenHIM isn't forwarding paths correctly to the mediator.

lorerod commented 1 year ago

Thanks @samuelimoisili this is working now.

Environment: MacOS 13.1 (22C65); Docker desktop 4.15.0 (93002)l; Docker engine: 20.10.21

Method URL: POST http://localhost:5001/mediator/patient JSON body: { "name": "Lorena" }

Status code: 200 OK JSON body:

{
    "status": 201,
    "patient": {
        "resourceType": "Patient",
        "id": "1",
        "meta": {
            "versionId": "1",
            "lastUpdated": "2023-02-14T17:22:33.909+00:00"
        },
        "text": {
            "status": "generated",
            "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">Lorena <b>LORENA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td/></tr></tbody></table></div>"
        },
        "identifier": [
            {
                "system": "cht"
            }
        ],
        "name": [
            {
                "use": "official",
                "family": "Lorena",
                "given": [
                    "Lorena"
                ]
            }
        ]
    }
}

Observation: I don't know if it has anything to do with this change, but I realized when testing that step 5. of the project README has to be updated with a '/' at the end of the URL:

You can test the mediator by running curl -X GET http://localhost:5001/mediator/ -H "Authorization: Basic $(echo -n interop-client:interop-password | base64)". You should get the following response {"status": "success" }.

lorerod commented 1 year ago

As @samuelimoisili already merged 17-openhim-path-forwarding, I put it as Done.