hl7-object-parser
Convert your HL7 message to an object.
Install
$ npm install hl7-object-parser
HL7 parsed messages:
Adt:
- A04 - Patient registration
- A08 - Patient information update
- A40 - Merge patient
Siu:
- S12 - Notification of new appointment booking
- S13 - Notification of appointment rescheduling
- S14 - Notification of appointment modification
- S15 - Notification of appointment cancellation
- S17 - Notification of appointment deletion
- S26 - Notification that patient did not show up for scheduled appointment
How to use it ?
Create your hl7 mapping file like that:
// s12.json
Import your parser and use it !
- From CommonJS require:
const parser = const s12 = `MSH|^~\\&|mllp_http_proxy|proxy00-prodaz|mllp_http_proxypartenaire|proxy00-prodpartenaire|20160923155836||SIU^S12|154779|P|2.5.1|||||FRA|UTF-8|\rSCH||49849903800^DimSolution||||100|||||^^30^20161231110000|||||10101041431^KAYSSIEH^BASSEL||||ODS|||||Booked|\rPID|||123456^^^ODS^^PI||DO BAIRRO^Dimitri^^^^^L||19920506|M|Nom usuel||Avenue des Champs-Élysées^^Paris^^75000^^^^^||0100000000^^^dimitri.dobairro@dimsolution.com^^^^~0200000000^^^^^^^|\rRGS|1\rAIG|1|||10101041431@750057689\rNTE|||My comment`const obj = parserconsole
- From Babel import:
const s12 = `MSH|^~\\&|mllp_http_proxy|proxy00-prodaz|mllp_http_proxypartenaire|proxy00-prodpartenaire|20160923155836||SIU^S12|154779|P|2.5.1|||||FRA|UTF-8|\rSCH||49849903800^DimSolution||||100|||||^^30^20161231110000|||||10101041431^KAYSSIEH^BASSEL||||ODS|||||Booked|\rPID|||123456^^^ODS^^PI||DO BAIRRO^Dimitri^^^^^L||19920506|M|Nom usuel||Avenue des Champs-Élysées^^Paris^^75000^^^^^||0100000000^^^dimitri.dobairro@dimsolution.com^^^^~0200000000^^^^^^^|\rRGS|1\rAIG|1|||10101041431@750057689\rNTE|||My comment`const obj = console
Output:
msh: message_datetime: '20160923155836' message_type: 'SIU' message_type_ref: 'S12' message_control_id: '154779' principal_language_of_message: 'FRA' character_set: 'UTF-8' pid: id: '123456' origin: 'ODS' first_name: 'Dimitri' last_name: 'DO BAIRRO' birthdate: '19920506' gender: 'M' street_name: 'Avenue des Champs-Élysées' city: 'Paris' zip_code: '75000' phone: '0100000000' '0200000000' email: 'dimitri.dobairro@dimsolution.com' '' sch: id: '49849903800' origin: 'DimSolution' length: '100' minutes: '30' datetime: '10101041431' last_name: 'KAYSSIEH' first_name: 'BASSEL' source: 'ODS' status: 'Booked' rgs: id: '1' aig: id: '1' rpps_finess: '10101041431@750057689' nte: comment: 'My comment'
Tests
// Run testsnpm run test
Related packages
Convert your object into HL7 message. (object-hl7-parser).
License
MIT © Dimitri DO BAIRRO