Create new endpoints in rest with OpenEHR

Hi all,

I hope you are well today.

Ok, understanding that with EHRBase you can’t do what I want to do with patients, doctors and hospitals.
But how the other tools and platforms could do it?
I am referring to the following tools and platforms: EHRServer or EtherCIS.
Is this possible with either of the above two tools and platforms?

Look forward your comments.

Many thanks for your help.

Kind Regards.

Hi Rafa,

you can basically use any technology that is appropriate. For example, you can use a an IHE MPI (PIX/PDQ) for the patients and Active Directory for the provider directory.

If you have a complete greenfield environment, you might also use a demographics service based on FHIR. Then, you can put the (FHIR) IDs inside the openEHR compositions to reference entries in the provider directory.

1 Like

EhrServer is @pablo 's baby I think, so I’ll let him comment. EtherCIS won’t do it either as far as I know. (EhrBase is a fork of EtherCIS btw, though it’s been getting so much love (work) from Vita I’m not sure if much is left in common between them)

You can always use something like https://hapifhir.io/ i.e. use FHIR demographic to implement demographic and wire that into EhrBase.
Check out FhirBridge component of EhrBase project if you want to see it in action.

You beat me to it with a few seconds :smiley:

1 Like

Any system that implements openEHR will have patients, doctors and hospitals in a separate system.

Your requirements require you to get a platform together, not just one system that complies with all your requirements, that is why consulting with an openEHR expert if you have a project is the best option.

It’s not that what you try to do can’t be done, it’s that how you are trying to do it can’t be done. Is how the standard works.

As I said, you should read the architecture overview document first to understand the basic concepts.

About your demographic requirements, check https://www.openempi.org/

3 Likes

openEMPI is more what you want. FHIR is currently the hyped solution, and the data points in the admin resources are reasonably comprehensive, but the modelling is terrible. This has been noted by many US companies BTW. The FHIR model would make more sense as a facade on something properly modelled, which could be the openEHR model (upgraded a bit).

1 Like

Hi @thomas.beale and @pablo

I hope you are well.

Okay, I’m clear that I have to have 2 different systems defined.
In 1 system I will have the data of the patient, doctor, hospital, etc. and in the other system (OpenEhr) I will have defined the Compositions.
Now I have the following questions:
1- In which field of composition can the id of a patient or a doctor be indicated to relate it? Do you have any examples?
2- Difference between archetype and template?
3- Can I define new templates and new compositions created by me? Or do the templates and new compositions that I define have to be approved by someone?

Look forward your comments.

Many thanks for your help.

Kind regards,

Check composition.composer and ehr_status.subject in the specs

Hi Rafa,

I will try to send you an actual example tomorrow!

@birger.haarbrandt

Hi all,

I hope you are well today.

Please, can you send me a simple java or json example to see where I can indicate the id of the PATIENT or the id of the Doctor?
I have read the documentation and I have understood that we have to have two separate systems.

Look forward your comments.

Thanks.

Hello @birger.haarbrandt

I hope you are well.

Please can you send me a sample java project indicating the external id of the doctor or patient in openehr?

I have managed to configure a REST API with patients and doctors with a PostgreSQL Database.

Look forward your comments.

Many thanks for your help.

Kind regards.

Please check the specs. The Reference Model shows the fields, the schemas define the JSON/XML and the REST API has examples.

Hello all,

I hope you are well.

I have followed your advice and set up the following 2 projects separately:

Afterwards, I managed to run the projects on localhost: 8888 (I see the form in German, how can I indicate the Spanish language and see everything on the form in Spanish?

Then, following my previous comments on this topic, how can I create 1 composition indicating a patient and linking to an external id?
Please, I have a long time with this topic open in the forum and I can not create a composition of an outpatient indicating an external id.
Can you please help me now that I have everything set up correctly?
I also need to change the language to Spanish or English. Best Spanish.

Please take a long time with this topic and I need some of you to help me now that I have everything set up. I am very interested in using these tools and platforms.

Look forwards your comments.

Many thanks for your help.

Kind regards.

@rafotis2 it seems you are not using the specs which is required to answer your questions.

1 Like

Hi Rafa,

sorry for being so late to come back to you. The application you tried is a good learning example, but its is not exactly something that will give you things through convenience functions.

First, you will need a template that contains a Spanish translation. This can be achieved by using the Archetype Designer (Archetype Designer). The problem/diagnosis archetype is already ready available in Spanish: Clinical Knowledge Manager

You can download the archetypes and put them into your own repository inside the Archetype Designer. Once a template is created, you can export it in the language(s) of choice.

In a next step, you will have to reproduce the steps/structures that you find the example app: use the openEHR SDK to create DTOs and replace the ones you find there. The issue is that you still need to do some mapping towards the REST endpoints.

As an alternative, I recommend to use the WebTemplate format: 9.1. General Description — EHRbase documentation

This will give you a structure that is quite easy to process and will help you to get started a bit easier. You can also find examples how you can reference practitioners here: 9.2. RM-Mappings — EHRbase documentation

We are currently working on an “example” endpoint in EHRbase that will make your life easier to create a valid composition. This should hopefully become available within the next 3 weeks. Hope this helps a bit!

1 Like

Good stuff Birger,

@Rafa - specifically for the WebTemplate FLAT format you would typically use

For an external identifier like a National patient number (using PARTY_IDENTIFIED)

{
 "conformance-ehrbase.de.v0/composer|name": "Silvia Blake",
 "conformance-ehrbase.de.v0/composer/_identifier:0|id": "122",
 "conformance-ehrbase.de.v0/composer/_identifier:0|issuer": "issuer",
 "conformance-ehrbase.de.v0/composer/_identifier:0|assigner": "assigner",
 "conformance-ehrbase.de.v0/composer/_identifier:0|type": "type"
 }

or for a direct reference into a demographics service (using PARTY_REF)

{
 "conformance-ehrbase.de.v0/composer|name": "Silvia Blake",
 "conformance-ehrbase.de.v0/composer|id": "1234-5678",
 "conformance-ehrbase.de.v0/composer|id_scheme": "UUID",
 "conformance-ehrbase.de.v0/composer|id_namespace": "EHR.NETWORK"
 }

@ian.mcnicoll can we use either PARTY_IDENTIFIED or PARTY_REF for different compositions?

Yes, as I far as I understand things!!

I slightly misspoke above, PARTY_REF is available as part of PARTY_IDENTIFIED as external_ref, so can be used alongside as the formal identifiers, or instead of the formal identifiers.

https://specifications.openehr.org/releases/UML/latest/index.html#Architecture___18_1_83e026d_1433773263935_681777_5881

is what is under the hood in the canonical representation

1 Like

Hello @ian.mcnicoll and @birger.haarbrandt
I hope you are well.
Thanks for your help.

I will ask the most particular questions so that you can help me please.
Following my example, how can I indicate an archetype in Spanish to have all the fields in Spanish?
Please can you send me this archetype and tell me where I have to put it?
Please follow the example I have already prepared and change it to Spanish or send me the project in Spanish and I will try it.
I need to have an example as a test demo.
I am very interested in using this platform.

Look forward your comments.

Thanks for your help.

Kind Regards,

Hi Rafa, I gave you the link to the Archetype in my reply above. There is also a function within the CKM that allows you to download it (easy to find).

You then can upload this again in the Archetype Designer.

What I cannot do is provide is doing all the work for you. I’m happy to answer questions, and we can surely learn how to improve documentation.

I understand that there is some learning curve. Maybe the following training course would be a good starting point?

https://media-exp1.licdn.com/dms/image/C4E22AQEXyDl35H7wJw/feedshare-shrink_1280/0/1648102965703?e=1651104000&v=beta&t=iOb7At7HDgSdfwWKf9VCNu-8N_ZJQ-ISHLHHl5x--Qg

1 Like