Name | fpml JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | The FHIRPath mapping language is a data DSL designed to convert data from QuestionnaireResponse (and not only) to any FHIR Resource. |
upload_time | 2025-02-28 22:40:32 |
maintainer | Vadim Laletin |
docs_url | None |
author | Beda Software |
requires_python | >=3.9 |
license | MIT |
keywords |
fhir
fhirpath
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# FHIRPathMappingLanguage - fpml python package
## Installation
```bash
pip install fpml
```
## Usage
```python
from fpml import resolve_template
resource = {
"resourceType": "QuestionnaireResponse",
"status": "completed",
"item": [
{
"linkId": "name",
"answer": [
{
"valueString": "Name"
}
]
}
]
}
template = {
"resourceType": "Patient",
"name": "{{ item.where(linkId='name').answer.valueString }}"
}
context = {}
result = resolve_template(resource, template, context)
print(result)
# {'resourceType': 'Patient', 'name': 'Name'}
```
## Development
In `./python` directory:
Run in the shell
```
autohooks activate
```
And edit `../.git/hooks/pre-commit` by replacing the first line with
```
#!/usr/bin/env -S poetry --project=./python run python
```
Raw data
{
"_id": null,
"home_page": null,
"name": "fpml",
"maintainer": "Vadim Laletin",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "vadim@beda.software",
"keywords": "fhir, fhirpath",
"author": "Beda Software",
"author_email": "ilya@beda.software",
"download_url": "https://files.pythonhosted.org/packages/04/94/f091c0347255723f151b09c5da7d971a459c2934a1d32b1be0b85ade81e0/fpml-0.1.0.tar.gz",
"platform": null,
"description": "# FHIRPathMappingLanguage - fpml python package\n\n## Installation\n\n```bash\npip install fpml\n```\n\n## Usage\n\n```python\nfrom fpml import resolve_template\n\n\nresource = {\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"item\": [\n {\n \"linkId\": \"name\",\n \"answer\": [\n {\n \"valueString\": \"Name\"\n }\n ]\n }\n ]\n}\n\ntemplate = {\n \"resourceType\": \"Patient\",\n \"name\": \"{{ item.where(linkId='name').answer.valueString }}\"\n}\n\ncontext = {}\n\nresult = resolve_template(resource, template, context)\n\nprint(result)\n# {'resourceType': 'Patient', 'name': 'Name'}\n```\n\n\n## Development\n\nIn `./python` directory:\n\nRun in the shell\n```\nautohooks activate\n```\n\nAnd edit `../.git/hooks/pre-commit` by replacing the first line with\n```\n#!/usr/bin/env -S poetry --project=./python run python\n```\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "The FHIRPath mapping language is a data DSL designed to convert data from QuestionnaireResponse (and not only) to any FHIR Resource.",
"version": "0.1.0",
"project_urls": {
"Bug Tracker": "https://github.com/beda-software/FHIRPathMappingLanguage/issues",
"Documentation": "https://github.com/beda-software/FHIRPathMappingLanguage/tree/main/python/README.md",
"Homepage": "https://github.com/beda-software/FHIRPathMappingLanguage/tree/main/python",
"Repository": "https://github.com/beda-software/FHIRPathMappingLanguage/tree/main/python"
},
"split_keywords": [
"fhir",
" fhirpath"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b280aec6c554488f292604e3b9df578eb034564ac447fbc3c5f10a081a43a263",
"md5": "f08f31755e86c7decd12d79a52dc78b8",
"sha256": "3547e7631f41ccbd7a8758782096edf2b1a38db8b57c3c18f067e1efd5e1fc0a"
},
"downloads": -1,
"filename": "fpml-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f08f31755e86c7decd12d79a52dc78b8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 6286,
"upload_time": "2025-02-28T22:40:30",
"upload_time_iso_8601": "2025-02-28T22:40:30.579756Z",
"url": "https://files.pythonhosted.org/packages/b2/80/aec6c554488f292604e3b9df578eb034564ac447fbc3c5f10a081a43a263/fpml-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0494f091c0347255723f151b09c5da7d971a459c2934a1d32b1be0b85ade81e0",
"md5": "0ba04cc39259bc16dc79bf2e110b3ba0",
"sha256": "f7b217a7d180cae45e844d879622ba0ffb71221a51a753dd0aa67a3e5fe9e1c7"
},
"downloads": -1,
"filename": "fpml-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "0ba04cc39259bc16dc79bf2e110b3ba0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 5207,
"upload_time": "2025-02-28T22:40:32",
"upload_time_iso_8601": "2025-02-28T22:40:32.162383Z",
"url": "https://files.pythonhosted.org/packages/04/94/f091c0347255723f151b09c5da7d971a459c2934a1d32b1be0b85ade81e0/fpml-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-28 22:40:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "beda-software",
"github_project": "FHIRPathMappingLanguage",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "fpml"
}