osl-incubator / anamnesis.ai

Anamnesis creation from text with AI
BSD 3-Clause "New" or "Revised" License
2 stars 4 forks source link

Create an initial structure in the code for fhir #7

Open xmnlab opened 9 months ago

xmnlab commented 9 months ago

create a new module src/anamnesisai/fhirdb.py that will receive the fhir objects and will save it into a sqlite database.

using chatgpt, I got the following initial models that we should implement. We need to investigate that a bit first. Maybe it would be nice to have a jupyter notebook using all these module before the real implementation.


For your project Anamnesis.ai, which involves processing conversations between patients and doctors and their exam results into FHIR resources, several key FHIR resource models would be essential. Here's a list of initial FHIR resources you might consider:

  1. Patient: This resource includes demographic and other administrative information about an individual receiving care or other health-related services.

  2. Practitioner: Represents the healthcare professionals involved in the care of the patient. It's essential for tracking who is responsible for which aspects of a patient's care.

  3. Encounter: This resource describes an interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.

  4. Observation: This resource is used to record measurements or assertions made about a patient. It can include results from a conversation, such as symptoms or patient statements, as well as numerical data from exams.

  5. DiagnosticReport: Represents conclusions and findings from diagnostic tools, including laboratory tests and imaging studies. This is crucial for storing and interpreting the results of various medical exams.

  6. Condition: This resource is used to record detailed information about conditions or diagnoses recognized by a healthcare provider.

  7. MedicationRequest: If the conversation involves prescription details, this resource is used to record and share medication orders.

  8. CarePlan: Represents a plan or agreement of the intended care for a patient. It might be useful if the conversation includes discussions about future care plans or treatments.

  9. Procedure: If any procedures are discussed or planned, this resource records information about actions taken or planned to be taken on a patient's body.

  10. AllergyIntolerance: Records information about a patient's allergies or intolerances.

  11. ClinicalImpression: Represents the clinician's impressions or conclusions about the patient's condition, which can be derived from the conversation.

These resources will cover a broad range of data points you might extract from patient-doctor conversations and exam results. The exact resources you need may vary depending on the specific content of the conversations and the types of exams being discussed. Remember, FHIR is highly modular and interoperable, so you can start with a few key resources and expand as needed based on the requirements of your application.

xmnlab commented 3 months ago

it should include all the three steps for development : coding + tests + documentation