{"id":43356067,"url":"https://github.com/rameshrr/hl7js","last_synced_at":"2026-02-02T03:07:15.885Z","repository":{"id":32718965,"uuid":"36308705","full_name":"rameshrr/hl7js","owner":"rameshrr","description":"Javascript lib for parsing and writing HL7 files","archived":false,"fork":false,"pushed_at":"2017-04-08T01:06:07.000Z","size":20,"stargazers_count":5,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-26T05:27:59.556Z","etag":null,"topics":["communication","healthcare","hl7","hl7-message","hl7-parser","javascript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rameshrr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-26T16:24:25.000Z","updated_at":"2020-11-05T03:24:40.000Z","dependencies_parsed_at":"2022-07-16T13:00:31.357Z","dependency_job_id":null,"html_url":"https://github.com/rameshrr/hl7js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rameshrr/hl7js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rameshrr%2Fhl7js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rameshrr%2Fhl7js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rameshrr%2Fhl7js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rameshrr%2Fhl7js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rameshrr","download_url":"https://codeload.github.com/rameshrr/hl7js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rameshrr%2Fhl7js/sbom","scorecard":{"id":760691,"data":{"date":"2025-08-11","repo":{"name":"github.com/rameshrr/hl7js","commit":"44a400d50e12f503b469f1e1d709f9523398b78c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T23:23:10.718Z","repository_id":32718965,"created_at":"2025-08-22T23:23:10.718Z","updated_at":"2025-08-22T23:23:10.718Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29002727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T01:32:03.847Z","status":"online","status_checked_at":"2026-02-02T02:00:07.448Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["communication","healthcare","hl7","hl7-message","hl7-parser","javascript"],"created_at":"2026-02-02T03:07:12.247Z","updated_at":"2026-02-02T03:07:15.880Z","avatar_url":"https://github.com/rameshrr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hl7js (Beta)\nNode.js package for parsing and writing HL7 files\n\n\n# Installation\ninstall via [NPM](https://www.npmjs.com/):\n\u003e npm install hl7js\n\n# Usage\n## Initializing Reader:\n```javascript\n\nvar Reader = require('hl7js').Reader;\nvar reader = new Reader();\n\n```\n\n## reader.read(buffer, callback)\n```javascript\n\n/// Basic Parsing\nvar reader = new Reader('BASIC');\nfs.readFile(hl7_file_path, function (err, buffer) {\n\n    reader.read(buffer.toString(), function (err, hl7Data) {\n        console.log(err);\n        console.log(hl7Data);\n    });\n});\n\n```\n\n## Reading With Grammar\n### reader.read(buffer, grammarExpression, callback)\n\n```javascript\n\nfs.readFile(hl7_file_path, function (err, buffer) {\n\n    reader.read(buffer.toString(), 'MSH PID [{OBR {OBX}}]', function (err, hl7Data, hl7Json) {\n            console.log(err);\n\n            if (!err) {\n                var patientName = hl7Json['PID'][5]; /// Similar pattern: hl7Json['PID'].fields[5].value ==\u003e For advanced usage\n                console.log('ORU-\u003ePatient name: ', patientName);\n            }\n    });\n});\n\n```\n\n### Reading header fields\n```javascript\n\nvar messageType = hl7Data.mshSegment.messageType;\n\n```\n\n### Reading patient name\n```javascript\n\nvar patientName = hl7Json['PID'][5];\n/// (or)\nvar patientName = hl7Json['PID'].fields[5].value;\n\n```\n\n## Initializing Writer: (Alpha version)\n```javascript\n\nvar Writer = require('hl7js').Writer;\n\n/// Initializing writer with default delimiters\nvar writer = new Writer();\n/// Initializing writer with user defined delimiters\nvar writer = new Writer({\n    lineSeparator: '0xD 0xA',\n    framePrefix: '',\n    frameSuffix: '',\n    fieldSeparater: '|',\n    componentSeparater: '^',\n    fieldRepeatSeparater: '~',\n    escapeCharacter: '\\\\',\n    subComponentSeparater: '\u0026'\n});\n\n```\n\n## writer.addHeader(options) - adding MSH\n```javascript\n\nwriter.addHeader({\n    sendingApplication: 's_app',\n    sendingFacility: 'a_facility',\n    receivingApplication: 'r_app',\n    receivingFacility: 'r_facility',\n    dateTimeOfMessage: 'dt',\n    security: '',\n    messageType: 'ADT^A01',\n    messageControlId: '123',\n    processingId: '',\n    versionId: '2.5',\n    sequenceNo: '',\n    continuationPointer: '',\n    acceptAckType: '',\n    applicationAckType: '',\n    countryCode: '',\n    characterSet: '',\n    messageLanguage: ''\n});\n\n```\n\n## writer.addSegment(segmentId [, dataArray]) - Adding Other segments\n```javascript\n\nwriter.addSegment('PID', ['name', 1, 2, ['lname', 'fname'], 'eee']);\nwriter.addSegment('IN1', ['1']);\nwriter.addSegment('IN2');\n\n```\n\n## writer.toString() - Reads HL7 Text\n```javascript\n\nvar hl7Text = writer.toString();\nconsole.log(hl7Text);\n\n```\n\n# Contributions\nContributions are welcome\n    \n# Issues \nPlease file your issues [here](https://github.com/rameshrr/hl7js/issues):\n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frameshrr%2Fhl7js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frameshrr%2Fhl7js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frameshrr%2Fhl7js/lists"}