LinuxForHealth EDI provides a standard workflow for processing health care data regardless of format.
LinuxForHealth EDI supports multiple integration modes. Integration options include REST endpoints, CLI (command line), or direct access using the Python SDK. The EdiWorkflow delegates message operations to external libraries.
EdiWorkflow Transitions Include:
| Transition Name | Description | Required |
|---|---|---|
| Analyze | Generates an EdiMessageMetadata object for the EDI Message | Yes |
| Enrich | Enriches the input message with additional data using custom transformations. | No |
| Validate | Validates the input message. | No |
| Translate | Translates the input message in a supported format to a different supported format. Example: translate HL7v2 to FHIR. | No |
| Cancel | Cancels the current workflow process. | No |
| Fail | Reached when the workflow encounters an unrecoverable error and fails. | No |
Supported formats include:
- ASC X12 5010
- C-CDA
- HL7v2
- FHIR R4
This project is currently under construction. Please refer to the LinuxForHealth EDI Issue Board to review the current "to-dos" and "to-dones".
The LinuxForHealth EDI development environment relies on the following software packages:
- git for project version control
- Python 3.8 or higher for runtime/coding support
- Pipenv for Python dependency management
pip install --upgrade pip
git clone https://github.com/LinuxForHealth/edi
cd edi
pipenv sync --dev
pipenv run pytest# run within project root directory
pipenv run cli -p samples/270.x12EdiResult Output:
{
"errors": [],
"inputMessage": "ISA*00* *00* *ZZ*890069730 *ZZ*154663145 *200929*1705*|*00501*000000001*0*T*:~GS*HS*890069730*154663145*20200929*1705*0001*X*005010X279A1~ST*270*0001*005010X279A1~BHT*0022*13*10001234*20200929*1319~HL*1**20*1~NM1*PR*2*UNIFIED INSURANCE CO*****PI*842610001~HL*2*1*21*1~NM1*1P*2*DOWNTOWN MEDICAL CENTER*****XX*2868383243~HL*3*2*22*0~TRN*1*1*1453915417~NM1*IL*1*DOE*JOHN****MI*11122333301~DMG*D8*19800519~DTP*291*D8*20200101~EQ*30~SE*13*0001~GE*1*0001~IEA*1*000010216~\n",
"metadata": {
"baseMessageType": "TEXT",
"checksum": "578b8f172f2039cfcc1ec4b37eb8a3976e50577fb085823abbfead071e68d1d8",
"implementationVersions": null,
"messageSize": 494,
"messageType": "X12",
"recordCount": 17,
"specificationVersion": "005010X279A1"
},
"metrics": {
"analyzeTime": 0.05738999999996963,
"enrichTime": 0.0,
"totalTime": 0.05738999999996963,
"translateTime": 0.0,
"validateTime": 0.0
},
"operations": [
"ANALYZE",
"COMPLETE"
]
}Under Development
# run within project root directory
pipenv run python3Opens a Python interpreter
import pprint
from edi.core.workflows import EdiProcessor
with open("./samples/270.x12") as f:
edi_message = ",".join(f.readlines())
edi = EdiProcessor(edi_message)
edi.analyze()
edi_result = edi.complete()
pprint.pprint(edi_result.dict())
# result
{'errors': [],
'inputMessage': 'ISA*00* *00* *ZZ*890069730 '
'*ZZ*154663145 '
'*200929*1705*|*00501*000000001*0*T*:~GS*HS*890069730*154663145*20200929*1705*0001*X*005010X279A1~ST*270*0001*005010X279A1~BHT*0022*13*10001234*20200929*1319~HL*1**20*1~NM1*PR*2*UNIFIED '
'INSURANCE CO*****PI*842610001~HL*2*1*21*1~NM1*1P*2*DOWNTOWN '
'MEDICAL '
'CENTER*****XX*2868383243~HL*3*2*22*0~TRN*1*1*1453915417~NM1*IL*1*DOE*JOHN****MI*11122333301~DMG*D8*19800519~DTP*291*D8*20200101~EQ*30~SE*13*0001~GE*1*0001~IEA*1*000010216~\n',
'metadata': {'baseMessageType': <BaseMessageType.TEXT: 'TEXT'>,
'checksum': '578b8f172f2039cfcc1ec4b37eb8a3976e50577fb085823abbfead071e68d1d8',
'implementationVersions': None,
'messageSize': 494,
'messageType': <EdiMessageType.X12: 'X12'>,
'recordCount': 17,
'specificationVersion': '005010X279A1'},
'metrics': {'analyzeTime': 0.11884200002532452,
'enrichTime': 0.0,
'totalTime': 0.11884200002532452,
'translateTime': 0.0,
'validateTime': 0.0},
'operations': [<EdiOperations.ANALYZE: 'ANALYZE'>,
<EdiOperations.COMPLETE: 'COMPLETE'>]}