https://github.com/beda-software/fhir-faker
A library for generating fake FHIR resources
https://github.com/beda-software/fhir-faker
Last synced: 3 months ago
JSON representation
A library for generating fake FHIR resources
- Host: GitHub
- URL: https://github.com/beda-software/fhir-faker
- Owner: beda-software
- Created: 2021-02-08T07:52:57.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-08T11:36:35.000Z (over 5 years ago)
- Last Synced: 2025-03-13T07:03:13.372Z (over 1 year ago)
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fhir-faker
A library for generating fake FHIR resources
## Usage example
```typescript
import fhirFaker from 'fhir-faker'
console.log(fhirFaker.dataTypes.fakeHumanName())
{ text: "Mr. Thomas Anderson", given: ["Thomas"], family: "Anderson", prefix: ["Mr."] }
console.log(fhirFaker.fakeHumanName({ family: "Simpson" }))
{ text: "Mr. Thomas Simpson", given: ["Thomas"], family: "Simpson", prefix: ["Mr."] }
console.log(fhirFaker.fakePatient())
[
{
resourceType: "Patient",
id: "some-id",
active: true,
name: { text: "Mr. Thomas Simpson", given: ["Thomas"], family: "Simpson", prefix: ["Mr."] },
managingOrganization: { resourceType: "Organization", id: "org-id", display: "Sacred Heart"}
},
{
resourceType: "Organization",
id: "org-id",
active: true,
name: "Sacred Heart"
}
]
```