EHRbase Swagger Username, Password & FHIR Integration

Hey all,

I am new to OpenEHR. I wanted to take the Datas from OpenEHR through FHIR. I wanted to understand how OpenEHR Works.

I have exported Archetypes from Clinical knowledge manager. And uploded into the Archetype Builder and created a templates and have exported the templates now. I have also installed EHR base using docker compose up using .yml file. When i tried to open the Swagger page of EHR base it asks me user name and password. I have tried entering the user names and passwords from the .yml file and it doesn’t work. I have attached an image below for your reference.

Kindly can anyone tell me what will be the user name and password? I also wanted to know how to take datas through FHIR from Open EHR using Postman. So that i can implement the same using languages like python.

@Sidharth_Ramesh @ian.mcnicoll

I got this working with the default username and password in the .env file

SECURITY_AUTHUSER=ehrbase-user
SECURITY_AUTHPASSWORD=SuperSecretPassword

Hi @ian.mcnicoll ,

Thank you for the quick response. I have figured this out earlier and sorted it out. Kindly can u help me with the FHIR bridge used in the EHR base and how to use and implement it?

Best Regards,
Aravindh RN

In case you need it, here is the link of documentation for EHRbase FHIR Bridge.

Hey @Aravindh I’d suggest you understand how to use the openEHR SDK by EHRbase first.
The FHIR bridge includes a few examples of how a FHIR facade can be built on top of an openEHR CDR, however, your use case may be different from what they’ve implemented.

Which FHIR Profile are you trying to implement with openEHR? If it’s India’s ABDM, then the FHIR bridge is not required since you don’t need a FHIR REST API to begin with.

Well what do you exactly need the bridge for if i may ask.
The fhir bridge offers no conversion from openEHR into FHIR.
Only the other way around.

Hi all,
I have also problems accessing http://…:8080/ehrbase/swagger-ui.html.
I installed EHRbase with Docker on a AWS 2023 server.
I am using the default security settings with basic authentication and the default usernames and passwords.
However, each time I log in the pop-up returns. If I cancel the popup I get a 401 error.
Any ideas on what I am missing?

Best regards,

Martijn

By default, all the endpoints the application exposes are behind the enabled authentication method.

The swagger-ui does some calls to the backend and I don’t think it passes the authorization from the browser alongside.

My suggestion is that you call the ehrbase/v3/api-docs endpoint from a REST client tool using the basic authorization and then just place the API definition in the Swagger Editor

Hi, that has not the desired result. I also tried using curl in the console but even then I receive the 401 error.

Swagger is working fine for me at http://localhost:8080/ehrbase/swagger-ui/index.html deployed locally with docker compose with our slightly changed .env.ehrbase file

login: ehrbase-user
password:SuperSecretPassword

SERVER_NODENAME=freshehr.ehrbase.org
SECURITY_AUTHTYPE=BASIC
SECURITY_AUTHUSER=ehrbase-user
SECURITY_AUTHPASSWORD=SuperSecretPassword
SECURITY_AUTHADMINUSER=ehrbase-admin
SECURITY_AUTHADMINPASSWORD=EvenMoreSecretPassword
SECURITY_OAUTH2USERROLE=USER
SECURITY_OAUTH2ADMINROLE=ADMIN
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUERURI=
MANAGEMENT_ENDPOINTS_WEB_EXPOSURE=env,health,info,metrics,prometheus
MANAGEMENT_ENDPOINTS_WEB_BASEPATH=/management
MANAGEMENT_ENDPOINT_ENV_ENABLED=false
MANAGEMENT_ENDPOINT_HEALTH_ENABLED=false
MANAGEMENT_ENDPOINT_HEALTH_DATASOURCE_ENABLED=false
MANAGEMENT_ENDPOINT_INFO_ENABLED=false
MANAGEMENT_ENDPOINT_METRICS_ENABLED=false
MANAGEMENT_ENDPOINT_PROMETHEUS_ENABLED=false
MANAGEMENT_ENDPOINT_HEALTH_PROBES_ENABLED=false
SYSTEM_ALLOW_TEMPLATE_OVERWRITE=true
ADMINAPI_ACTIVE=true
ADMINAPI_ALLOWDELETEALL=true%
1 Like