Edit model card

Model Card for rapidfhir-procedures

Model Description

rapidfhir-procedures is a fine-tuned version of the google/flan-t5-small model, specifically designed to generate sentences that describe FHIR (Fast Healthcare Interoperability Resources) Procedure resources. This model aims to assist healthcare professionals, EHR (Electronic Health Record) systems, and other healthcare-related applications in generating human-readable and standardized descriptions of medical procedures.

Intended Use

The primary use-case for this model is to generate textual descriptions for FHIR Procedure resources. These descriptions can be used in:

  • EHR systems
  • Clinical decision support systems
  • Healthcare data analytics platforms
  • Documentation and reporting tools

Limitations

Medical Accuracy: While the model is trained to generate sentences based on FHIR standards, it is not a substitute for professional medical advice or judgment.

Language Support:

Currently, the model only supports English.

Context Sensitivity:

The model may not fully understand the context in which a procedure is performed, which could lead to less accurate or less relevant descriptions.

Requirements

Python 3.6 or higher Hugging Face's Transformers library

Training Data

The model was trained on a dataset comprising FHIR Procedure resources generated by Synthea, which include a variety of medical procedures across different healthcare domains. The dataset was balanced to ensure a wide coverage of different types of procedures.

Evaluation

The model was evaluated based on:

Accuracy:

How well the generated sentences match the intended FHIR Procedure resources.

FHIR Compliance:

How well the generated sentences adhere to FHIR standards.

Usage

Here's a simple Python code snippet to use this model:

  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
  tokenizer = AutoTokenizer.from_pretrained("fhirfly/rapidfhir-procedures")
  model = AutoModelForSeq2SeqLM.from_pretrained("fhirfly/rapidfhir-procedures")
  prompt = "SQM9PZ2545XHC4TE9RS27V183DD9KPW6JOI53UU5NYY8XRGIW6NZ0227WOAAW6NDNO79SR2K75T6J104XSAKMITKD8B8GPHGLQY424SHKI8OKQXXQN8BG435OKAMLFEN"  
  input_ids = tokenizer.encode(prompt, return_tensors="pt").to(device)  
  # Generate text with a maximum length of 4096 tokens
  max_length = 4096
  output = model.generate(input_ids, max_length=max_length)
  # Move the output tensor back to CPU and decode the generated output
  # Decode the generated output
  generated_fhir = tokenizer.decode(output[0], skip_special_tokens=True)
  print("Generated Summary:", generated_fhir)

The outputted Gneerated FHIR will look like this:

[resourceType] Procedure [id] efffddd8-effa-effa-ffaa-ffaffffffff [meta][profile][0] http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure [status] completed [code][coding][0][system] http://snomed.info/sct [code][coding][0][code] 430193006 [code][coding][0][display] Medication Reconciliation (procedure) [code][text] Medication Reconciliation (procedure) [subject][reference] Patient/fffffffd-fffa-fffa-fffa-fffffffffff [encounter][reference] Encounter/ffffffff-fffa-fffa-fffa-fffffffffff [performedPeriod][start] 2020-03-09T11:38:21-05:00 [performedPeriod][end] 2020-03-09T11:36:21-05:00 [location][reference] Location?identifier=https://github.com/synthetichealth/synthea|fffd0bf3-ffaa-3efd-affa-fffdfffffff [location][display] afffd0d-faed-bffa-fffa-fffffffffff [location][display] PCP237a3-faed-ffaa-ffffffffff [location][reference] Location?identifier=https://github.com/synthea|fff0bff9-ffaa-dfdd-ffc5-ffffffffff [location][display] PCP23757

Responsible AI Practices

Transparency: This model card aims to provide a transparent view of the model's capabilities, limitations, and intended use-cases.

Accountability: The model should be used as a supplementary tool and not as a primary decision-making entity.

Ethical Considerations: Care has been taken to ensure that the model does not generate misleading or harmful medical information.

License

This model is released under [insert appropriate license here].

Contact Information

For any queries or feedback, please contact https://discord.fly.health.

This model card is subject to updates to include more details, address limitations, and provide usage guidelines.

Downloads last month
3
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.