{"id":24752061,"url":"https://github.com/inferno-framework/client-fhir-testing","last_synced_at":"2025-10-10T23:30:17.184Z","repository":{"id":51164181,"uuid":"304663904","full_name":"inferno-framework/client-fhir-testing","owner":"inferno-framework","description":"Tool to test a client's conformance with a FHIR implementation guide.","archived":true,"fork":false,"pushed_at":"2023-11-28T15:10:07.000Z","size":2438,"stargazers_count":1,"open_issues_count":10,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-19T20:44:22.358Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/inferno-framework.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}},"created_at":"2020-10-16T15:17:00.000Z","updated_at":"2025-04-07T18:27:45.000Z","dependencies_parsed_at":"2025-01-28T10:44:50.568Z","dependency_job_id":null,"html_url":"https://github.com/inferno-framework/client-fhir-testing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/inferno-framework/client-fhir-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inferno-framework%2Fclient-fhir-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inferno-framework%2Fclient-fhir-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inferno-framework%2Fclient-fhir-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inferno-framework%2Fclient-fhir-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inferno-framework","download_url":"https://codeload.github.com/inferno-framework/client-fhir-testing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inferno-framework%2Fclient-fhir-testing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005573,"owners_count":26083919,"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-10T02:00:06.843Z","response_time":62,"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":[],"created_at":"2025-01-28T10:34:39.799Z","updated_at":"2025-10-10T23:30:16.582Z","avatar_url":"https://github.com/inferno-framework.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# client-fhir-testing\nTool to test a client's conformance with a FHIR implementation guide.\n\n\n### Quick Run:\n```sh\nruby start-proxy.rb\n```\n\u003cbr/\u003e\n\n## Setup:\nThe client fhir testing tool is in the form of a proxy application that \nwill record transactions between a fhir client and a fhir server.  These \nHTTP transactions are recorded in a database where validation tests \ncan later be run against them. The requests \ncan also be replayed to mimic client or server endpoints.  \u003cbr /\u003e\n\nFor development purposes we will use the Inferno tool to act as a FHIR \nclient and a public endpoint will be used as a FHIR server.\n\n### Install \u0026 Run Inferno (Client)\n1.  Download \u0026 install inferno using Docker directions: \u003cbr /\u003e\nhttps://github.com/onc-healthit/inferno#installation-and-deployment\n\n2.  Make sure docker desktop app is running\n\n3.  Run \n```sh\ndocker compose up\n```\n\n4.  open http://localhost:4567/\n\n\n### Run Proxy\n1.  Download this github repo\n```sh\ngit clone https://github.com/inferno-community/client-fhir-testing.git\ncd client-fhir-testing\n```\n2.  Run proxy\n\nThe following will read options from `filename`.  If `filename` does \nnot exist, \none with default options will be created for you.  If `filename` is left unspecified, \n`proxy.yml` will be used by default.\n\nIt is important to set the `backend` \nconfig option as this is the destination the proxy forwards to.\n```sh\nruby start-proxy.rb [filename]\n```\n\nAlternatively, you can start the proxy via the rackup process and specify the \nbackend as an environment variable.\n\n```sh\nFHIR_PROXY_BACKEND=\"https://r4.smarthealthit.org\" rackup config.ru -p 9292 -o 0.0.0.0\n```\n\n### Docker\n\nRun the proxy and a test Inferno instance (and all of its requirements) using the Compose script:\n\n```sh\ndocker compose up --build\n```\n\nThis will map in the `proxy.yml` from the `client-fhir-testing` folder. This way, you can update the proxy data without having to rebuild the image.\n\nIn this compose file, Inferno is accessible at `http://localhost:4567`, and the proxy is available at `http://localhost:9292`.\n\n### Run Inferno tests\nWe use inferno as our client but you can use any client/server interactions \nin this step. Note that the docker URL listed below resolves to the docker \nhost machine on which the proxy is running.  Using localhost would refer \nto the docker instance and not the host itself.  \u003cbr /\u003e\n\n1.  On the Inferno homepage, under \"Start Testing\", select \"US Core v3.1.0\", \nand put in the address of the proxy service `http://host.docker.internal:9292`\n\n2.  Run tests, check the database for logged HTTP transactions.\n\n## Run Validator in command line\nThe validator is developed based on the [US Core Client CapabilityStatement](https://www.hl7.org/fhir/us/core/CapabilityStatement-us-core-client.htm). \nThe [client CapabilityStatement JSON file](resources/CapabilityStatement-us-core-client.json) was parsed into three tables, [interaction](resources/CapabilityStatement_interaction.csv), \n[searchParam](resources/CapabilitySatement_searchParam.csv), and [search_criteria](resources/CapabilitySatement_search_criteria.csv).\nCapabilities rules from the three tables were used to validate the client requests.\n\nWe created a [collection of Postman requests](test/fhir-client-test.postman_collection.json) to simulate a client test.\nThe tool [newman](https://www.npmjs.com/package/newman) can be used to send the collection of requests to the proxy server.\n\n1. To start the proxy server locally with the port 9292.\n```sh\nruby start-proxy.rb\n```\n\n2. To send the requests with [newman](https://www.npmjs.com/package/newman) under the test directory.\n```sh\ncd test\nnewman run fhir-client-test.postman_collection.json\n```\n\n3. To run validator for the collection of requests.\n```sh\nruby ../test-validator.rb\n```\nA `checklist.csv` report will be generated and also a `check_list` table created in the database.\nHere are the description of the report.\n\n| column | description  |\n|---|---|\n|id|serial number|\n|resource|FHIR resource / action|\n|request_type|code from the [interaction table](resources/CapabilityStatement_interaction.csv): read / vread / update / create / search-type|\n|search_param|Array of search parameters. nil if not 'search-type'.|\n|search_valid|boolean, whether search is valid (parameter in SHALL list and response status is 200). The SHALL list can be found in the [searchParam](resources/CapabilitySatement_searchParam.csv) table.|\n|search_combination|1 parameter =\u003e nil; \u003e1 parameters \u0026 find in the SHALL list =\u003e SHALL combinations; \u003e1 parameters \u0026 not in the SHALL list =\u003e []. The combination list can be found in the [search_criteria](resources/CapabilitySatement_search_criteria.csv) table.|\n|search_type|Array of boolean. whether each search value is valid for its data type. nil if not 'search-type'. The search value type can be found in the [searchParam](resources/CapabilitySatement_searchParam.csv) table.|\n|present|The matched serial id in the [interaction](resources/CapabilityStatement_interaction.csv) table.|\n|present_code|The matched [interaction](resources/CapabilityStatement_interaction.csv) Code (SHALL/SHOULD/MAY) in the interaction table.|\n|request_id|The original request ID from the request table in the database.|\n|request_uri|The original request uri from the test requests.|\n|response_status|The response status from server in the response table from database.|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finferno-framework%2Fclient-fhir-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finferno-framework%2Fclient-fhir-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finferno-framework%2Fclient-fhir-testing/lists"}