{"id":26522574,"url":"https://github.com/miracum/loinc-conversion","last_synced_at":"2026-04-12T13:31:11.921Z","repository":{"id":205850986,"uuid":"255856499","full_name":"miracum/loinc-conversion","owner":"miracum","description":"REST service that converts LOINC codes and UCUM units to a standardized representation","archived":false,"fork":false,"pushed_at":"2025-10-01T12:38:26.000Z","size":23020,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-01T14:37:36.127Z","etag":null,"topics":["harmonization","healthcare","javascript","loinc","loinc-codes","ucum"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miracum.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-15T08:42:36.000Z","updated_at":"2025-10-01T12:34:04.000Z","dependencies_parsed_at":"2024-04-10T11:24:00.716Z","dependency_job_id":"62883896-caef-449a-9023-c51b613befe7","html_url":"https://github.com/miracum/loinc-conversion","commit_stats":null,"previous_names":["miracum/loinc-conversion"],"tags_count":71,"template":false,"template_full_name":null,"purl":"pkg:github/miracum/loinc-conversion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miracum%2Floinc-conversion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miracum%2Floinc-conversion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miracum%2Floinc-conversion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miracum%2Floinc-conversion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miracum","download_url":"https://codeload.github.com/miracum/loinc-conversion/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miracum%2Floinc-conversion/sbom","scorecard":{"id":367623,"data":{"date":"2025-08-17T22:46:18Z","repo":{"name":"github.com/miracum/loinc-conversion","commit":"5e2de90135827744bece45056b6cdf69c6a5b49b"},"scorecard":{"version":"v5.1.1","commit":"cd152cb6742c5b8f2f3d2b5193b41d9c50905198"},"score":7.4,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":8,"reason":"10 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#maintained"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: RenovateBot: .renovaterc.json:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#dependency-update-tool"}},{"name":"Code-Review","score":0,"reason":"Found 0/2 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/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#code-review"}},{"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/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#binary-artifacts"}},{"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/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/ci.yaml:116","Info: jobLevel 'actions' permission set to 'read': .github/workflows/ci.yaml:22","Warn: jobLevel 'security-events' permission set to 'write': .github/workflows/ci.yaml:23","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/ci.yaml:18","Warn: jobLevel 'packages' permission set to 'write': .github/workflows/ci.yaml:20","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yaml:33","Warn: jobLevel 'security-events' permission set to 'write': .github/workflows/ci.yaml:36","Info: jobLevel 'actions' permission set to 'read': .github/workflows/ci.yaml:37","Info: jobLevel 'contents' permission set to 'read': .github/workflows/schedule.yaml:16","Warn: jobLevel 'security-events' permission set to 'write': .github/workflows/schedule.yaml:18","Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yaml:12","Info: topLevel 'contents' permission set to 'read': .github/workflows/lint-pr-title.yaml:11","Info: topLevel 'contents' permission set to 'read': .github/workflows/schedule.yaml:10","Info: topLevel 'contents' permission set to 'read': .github/workflows/scorecard.yaml:19"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/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/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info:   6 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   2 out of   2 third-party GitHubAction dependencies pinned","Info:   3 out of   3 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#pinned-dependencies"}},{"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/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#fuzzing"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: all commits (30) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#sast"}},{"name":"Signed-Releases","score":10,"reason":"5 out of the last 5 releases have a total of 5 signed artifacts.","details":["Info: provenance for release artifact: ghcr.io-miracum-loinc-conversion-v1.15.9.intoto.jsonl: https://github.com/miracum/loinc-conversion/releases/tag/v1.15.9","Info: provenance for release artifact: ghcr.io-miracum-loinc-conversion-v1.15.8.intoto.jsonl: https://github.com/miracum/loinc-conversion/releases/tag/v1.15.8","Info: provenance for release artifact: ghcr.io-miracum-loinc-conversion-v1.15.7.intoto.jsonl: https://github.com/miracum/loinc-conversion/releases/tag/v1.15.7","Info: provenance for release artifact: ghcr.io-miracum-loinc-conversion-v1.15.6.intoto.jsonl: https://github.com/miracum/loinc-conversion/releases/tag/v1.15.6","Info: provenance for release artifact: ghcr.io-miracum-loinc-conversion-v1.15.5.intoto.jsonl: https://github.com/miracum/loinc-conversion/releases/tag/v1.15.5"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":8,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'master'","Info: 'stale review dismissal' is required to merge on branch 'master'","Warn: required approving review count is 1 on branch 'master'","Warn: codeowners review is required - but no codeowners file found in repo","Info: 'last push approval' is required to merge on branch 'master'","Info: 'up-to-date branches' is required to merge on branch 'master'","Info: status check found to merge onto on branch 'master'","Info: PRs are required in order to make changes on 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/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#branch-protection"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#license"}},{"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/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-75v8-2h7p-7m2m"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#vulnerabilities"}},{"name":"Contributors","score":3,"reason":"project has 1 contributing companies or organizations -- score normalized to 3","details":["Info: found contributions from: university hospital erlangen department of pediatrics and adolescent medicine"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#contributors"}},{"name":"CI-Tests","score":10,"reason":"30 out of 30 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#ci-tests"}}]},"last_synced_at":"2025-08-18T12:14:21.349Z","repository_id":205850986,"created_at":"2025-08-18T12:14:21.350Z","updated_at":"2025-08-18T12:14:21.350Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279009797,"owners_count":26084648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"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":["harmonization","healthcare","javascript","loinc","loinc-codes","ucum"],"created_at":"2025-03-21T13:36:41.521Z","updated_at":"2025-10-12T01:41:11.820Z","avatar_url":"https://github.com/miracum.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# loinc-conversion\n\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/miracum/loinc-conversion/badge)](https://scorecard.dev/viewer/?uri=github.com/miracum/loinc-conversion)\n[![SLSA 3](https://slsa.dev/images/gh-badge-level3.svg)](https://slsa.dev)\n\nService that converts LOINC codes and UCUM units to a standardized representation.\n_loinc-conversion_ is a _REST_-server that accepts lists of `(LOINC-code, unit, value?)` and returns corresponding lists of `(LOINC-code, UCUM-unit, value)`.\nIt provides three distinct functions:\n\n1. **Standardization of _UCUM_ units**\n   Returns a standardized _UCUM_ unit for each _LOINC_ code. (In most cases, the\n   returned _UCUM_ unit is the `EXAMPLE_UNIT` defined in the official `Loinc.csv`\n   by Regenstrief.)\n\n2. **Conversion of non-_UCUM_ units**\n   For selected common (especially in Germany) non-_UCUM_ laboratory units the\n   valid _UCUM_ unit is provided.\n\n3. **Conversion of _LOINC_ codes**\n   Selected _LOINC_ codes that represent the same concept, and where a unambiguous\n   conversion factor exists (e.g. `718-7 = \"Hemoglobin [Mass/volume] in Blood\"` and\n   `59260-0 = \"Hemoglobin [Moles/volume] in Blood\"`), are converted to an arbitrarily\\*\n   selected _LOINC_ code (`718-7` in the example).\n\n   \\*The conversion _target_ is the _more common_ unit - which is highly subjective.\n\n## REST server description\n\nEndpoint: `POST /conversions`\nContent-type: `application/json`\nBody:\n\n```json\n[\n  {\n    \"loinc\": \"str, e.g. 718-7\",\n    \"unit\": \"UCUM unit, e.g. g/dL\",\n    \"value\": \"float, optional(=1.0)\",\n    \"id\": \"anything_you_want, optional\"\n  }\n]\n```\n\n### Example\n\n#### Query\n\n```txt\nPOST http://localhost:8080/conversions HTTP/1.1\ncontent-type: application/json\n```\n\n```json\n[\n  {\n    \"loinc\": \"718-7\",\n    \"unit\": \"g/dL\",\n    \"value\": 12,\n    \"id\": \"my_internal_id_22\"\n  },\n  {\n    \"loinc\": \"59260-0\",\n    \"unit\": \"mmol/l\",\n    \"value\": 10\n  }\n]\n```\n\n#### Result\n\n```json\n[\n  {\n    \"value\": 12,\n    \"unit\": \"g/dL\",\n    \"loinc\": \"718-7\",\n    \"id\": \"my_internal_id_22\"\n  },\n  {\n    \"value\": 16.1,\n    \"unit\": \"g/dL\",\n    \"loinc\": \"718-7\"\n  }\n]\n```\n\n## Configuration\n\n| Environment variable | Description                                                                            | Default |\n| -------------------- | -------------------------------------------------------------------------------------- | ------- |\n| LOG_REQUESTS         | Whether all API requests should be logged to stdout.                                   | `false` |\n| PORT                 | The port to bind the web server to.                                                    | `8080`  |\n| LOINC_VERSION        | The version of the LOINC database to use for conversion. Valid options: `2.67`, `2.77` | `2.67`  |\n\n## Development\n\n### Install Dependencies\n\n```sh\nnpm clean-install\n```\n\n### Run with hot reload\n\n```sh\nnpm run watch\n```\n\nThe app now runs on \u003chttp://localhost:8080/api/v1/conversions\u003e and restarts everytime a file in the `src/` dir changes.\n\n### Run tests\n\n```sh\nnpm run tests:e2e\n```\n\nThis expects the app to run on \u003chttp://localhost:8080\u003e. You can specify a different endpoint by setting the `API_ENDPOINT` env var.\n\n## Benchmark\n\n```sh\n# OS=Windows 11 (10.0.22000.978/21H2)\n# 12th Gen Intel Core i9-12900K, 1 CPU, 24 logical and 16 physical cores\n# 32GiB of DDR5 4800MHz RAM\n# Samsung SSD 980 Pro 1TiB\n# NodeJS v24\n$ bombardier -d 30s \"http://localhost:8080/api/v1/conversions?loinc=718-7\u0026unit=g%2FdL\u0026value=10\"\nBombarding http://localhost:8080/api/v1/conversions?loinc=718-7\u0026unit=g%2FdL\u0026value=10 for 30s using 125 connection(s)\n[===========================================================================================================] 30s\nDone!\nStatistics        Avg      Stdev        Max\n  Reqs/sec     40843.02    4452.14   60068.12\n  Latency        3.06ms     1.99ms   370.35ms\n  HTTP codes:\n    1xx - 0, 2xx - 1225358, 3xx - 0, 4xx - 0, 5xx - 0\n    others - 0\n  Throughput:    16.48MB/s\n```\n\n## Legal\n\nThis material contains content from LOINC (loinc.org). LOINC is copyright © 1995-2025, Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiracum%2Floinc-conversion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiracum%2Floinc-conversion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiracum%2Floinc-conversion/lists"}