Downloads · 30 days
10
2% of all-time downloads
fhirfly/rapidfhir-procedures
rapidfhir-procedures is a machine learning model from fhirfly. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
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 mod…
Downloads · 30 days
10
2% of all-time downloads
All-time downloads
451
Public
Repo size
616 MB
Likes
1
Public
Click a slice to open those files.
.bin308 MB · 100%
From the Hugging Face model README
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.
The primary use-case for this model is to generate textual descriptions for FHIR Procedure resources. These descriptions can be used in:
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.
Currently, the model only supports English.
The model may not fully understand the context in which a procedure is performed, which could lead to less accurate or less relevant descriptions.
Python 3.6 or higher Hugging Face's Transformers library
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.
The model was evaluated based on:
How well the generated sentences match the intended FHIR Procedure resources.
How well the generated sentences adhere to FHIR standards.
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
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.
This model is released under [insert appropriate license here].
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.