New To FHIR: how to convert my data into fhir Format

I am new to fhir. i have deployed fhir Server using hapi jpa fhir Server.
I played around with it . i know to create ,update or get Patient using rest apis in fhir Server

But my Question is how to convert my data to fhir Format,
i have lot of Patient data stored in MySQL databases now how to convert this data to fhir Format.
i read somewhere we should do mapping.
please guide me About fhir and fhir mapping.
How to do… where start off…
i am struggling from past 2 weeks learning fhir

Hello @luffy,

If you are asking “How to map your database data to Patient FHIR structure” you can take a look at Patient resource details (“https://www.hl7.org/fhir/patient.html”). It gives you plenty of information about “What” should be considered a Patient resource and “How” to interpret it.
It also shows how to map Patients to other well-know formats and structures on clinical documents (https://www.hl7.org/fhir/patient-mappings.html).

If you are asking “How to persist Patient, and other resources, structures” you can use a lot of technologies. SQL, NoSQL, JSON Databases (as MongoDB), JPA… Take a look at (https://www.health-samurai.io/fhirbase). It is a framework who implements a lot of helpful procedures.

One approach to convert data is to implement Adapters (https://en.wikipedia.org/wiki/Adapter_pattern), from your MySQL database structure to the Patient FHIR structure. Example:

  • MyPatient.name -> Patient.name[0].text
  • DateFormat(MyPatient.birthdate) -> Patient.birthDate
  • And so on…

FHIR is a standard for health care data exchange, it needs to cover plenty of use cases along with a huge variety of clinical standards. You should identify your needs.

Also, take a look at Extensions (https://www.hl7.org/fhir/extensibility.html). It helps you to cover attributes non-canonicals to FHIR structure.

I could not 100% understand your question, so I wish I could help you.

Thanks for the Reply.

I have read this links “https://www.hl7.org/fhir/patient.html”) & (https://www.hl7.org/fhir/patient-mappings.html). But still i am unable to understand how to start writing a mapper or to map data.

I will explain what i want. Please guide me. or give me examples
For example :
I have a mysql database such as patdb containing tables as pat, obs, therpie etc
Pat table has fields such

No FirstName lastName Birthday sex street City patid …
1 Tom fisher 12.03.1948 m indiranager bangalore 2345
2 Angel Merry 20.02.2020 f kodialli Delhi 3456
3 Ambi Henry 18.12.1948 f Airport road mumbai 1234
… so on

and table therpie has

ID Therapiebeginndate therapieenddate Therapie Intention
2354 12.02.2014 22.05.2019 Palliativ
3456 01.02.1989 15.07.2000 Chemotherapie

so on

I have huge amount of data.

Now how to convert this data in fhir Format and send it to fhir Server
I already have Server. But now i am not understanding how to convert this Kind of data to fhir Format.
I want this data in fhir Format.

Kindly please give example.

You’re going to have to write code - in Java, C# or some other language that will perform the translation. Your database is unique. There’s no off-the-shelf solution that will magically do the conversion for you. (Also, please don’t raise the same question both here and on chat.fhir.org at the same time.)

Ya I know I should write code. I’m writing to in java. I just wanted a small example with small data… Maybe a few lines of java code for abovd data or just for 2 rows from above. . I asked because I’m very new and I want to know if what I am doing is right.I am learning.

About posting in chat. I never got response thier so I posted here. Communities are thier to help. So what wrong in posting twice.

Anyways thanks for your reply. I won’t post same.

The general guideline is to give a business day or two for responses in one place before asking elsewhere. Having the same thing asked in multiple places creates extra work for community members and may result in the discussion happening in multiple places - which makes it harder to keep track of all of the advice being given and ensuring a consistent message. Full guidelines for asking questions are documented here: https://confluence.hl7.org/display/FHIR/FHIR+Rules+for+Asking+Questions