{"id":14483587,"url":"https://github.com/Ahryman40k/typescript-fhir-types","last_synced_at":"2025-08-30T04:31:53.386Z","repository":{"id":40523980,"uuid":"168963396","full_name":"Ahryman40k/typescript-fhir-types","owner":"Ahryman40k","description":"Typescript / Javascript object model for FHIR standard","archived":false,"fork":false,"pushed_at":"2023-01-07T21:42:21.000Z","size":16383,"stargazers_count":126,"open_issues_count":5,"forks_count":27,"subscribers_count":3,"default_branch":"4.0.0","last_synced_at":"2024-08-02T17:44:22.916Z","etag":null,"topics":["fhir","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Ahryman40k.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-02-03T16:03:58.000Z","updated_at":"2024-05-03T07:25:49.000Z","dependencies_parsed_at":"2023-02-08T02:19:04.593Z","dependency_job_id":null,"html_url":"https://github.com/Ahryman40k/typescript-fhir-types","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ahryman40k%2Ftypescript-fhir-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ahryman40k%2Ftypescript-fhir-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ahryman40k%2Ftypescript-fhir-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ahryman40k%2Ftypescript-fhir-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ahryman40k","download_url":"https://codeload.github.com/Ahryman40k/typescript-fhir-types/tar.gz/refs/heads/4.0.0","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":217592832,"owners_count":16201537,"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","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":["fhir","typescript"],"created_at":"2024-09-03T00:01:53.295Z","updated_at":"2024-09-03T00:06:22.518Z","avatar_url":"https://github.com/Ahryman40k.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\n# typescript-fhir-types\nTypescript / Javascript object model for FHIR standard\nModel follows FHIR R4 specifications.\n\n[![npm version](https://badge.fury.io/js/%40ahryman40k%2Fts-fhir-types.svg)](https://badge.fury.io/js/%40ahryman40k%2Fts-fhir-types)\n[![Build Status](https://travis-ci.com/Ahryman40k/typescript-fhir-types.svg?branch=4.0.0)](https://travis-ci.com/Ahryman40k/typescript-fhir-types)\n[![codecov](https://codecov.io/gh/Ahryman40k/typescript-fhir-types/branch/4.0.0/graph/badge.svg)](https://codecov.io/gh/Ahryman40k/typescript-fhir-types)\n[![Known Vulnerabilities](https://snyk.io/test/github/Ahryman40k/typescript-fhir-types/badge.svg)](https://snyk.io/test/github/Ahryman40k/typescript-fhir-types) \n[![Project dependencies overview(Beta)](https://david-dm.org/ahryman40k/typescript-fhir-types.svg)]() \n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\nDefinitions are io-ts based interfaces. See [io-ts github project](https://github.com/gcanti/io-ts) for further details. This means you can check your types at runtime.\n  \n## Installation\n```\nnpm i -S @ahryman40k/ts-fhir-types\n```\nor\n```\nyarn install @ahryman40k/ts-fhir-types\n```\n\n## articles\n[A medium article: Handle FHIR objects with Typescript](https://medium.com/@ahryman40k.gb/handle-fhir-objects-in-typescript-and-javascript-7110f5a0686f)\n\n## Examples\n\nlet's imagine your server or your application is receiving a FHIR Resource like an observation from a server or any external system\n\n```typescript\nimport { R4 } from '@ahryman40k/ts-fhir-types'\nimport { either as E } from 'fp-ts'\n\nconst json = {\n    \"resourceType\":\"Patient\"   \n };\n\nconst  validationResult = R4.RTTI_Patient.decode(json)\n\nif ( E.isLeft( validationResult) ) {\n    console.log(validationResult.left);\n}\n\nif ( E.isRight( validationResult) ) {\n    console.log(validationResult.right);\n}\n```\n\nThere is 2 points:\n* You would like to have strongly typed types (__typescript__)\n* You would validate data returned from server and test their validity against FHIR standard\n  \n\nFHIR resources are also provided as interface, so you can inherit and implement your own object implementation. \n\nPlease don't hesitate to give me advice and feedback !\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAhryman40k%2Ftypescript-fhir-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAhryman40k%2Ftypescript-fhir-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAhryman40k%2Ftypescript-fhir-types/lists"}