{"id":18407230,"url":"https://github.com/octri/f2hstats","last_synced_at":"2025-04-12T20:59:07.664Z","repository":{"id":90110521,"uuid":"139643267","full_name":"OCTRI/f2hstats","owner":"OCTRI","description":"Gather FHIR observations from sandboxes and persist information about HPO Conversion","archived":false,"fork":false,"pushed_at":"2019-01-03T20:40:22.000Z","size":48406,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-12T20:59:02.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OCTRI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-07-03T22:34:50.000Z","updated_at":"2019-03-07T20:52:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"9bf34858-b6fc-4ca3-9d50-f3279bdb0ce9","html_url":"https://github.com/OCTRI/f2hstats","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCTRI%2Ff2hstats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCTRI%2Ff2hstats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCTRI%2Ff2hstats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCTRI%2Ff2hstats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OCTRI","download_url":"https://codeload.github.com/OCTRI/f2hstats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631703,"owners_count":21136561,"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":[],"created_at":"2024-11-06T03:13:07.277Z","updated_at":"2025-04-12T20:59:07.628Z","avatar_url":"https://github.com/OCTRI.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FHIR2HPO Statistics Gatherer\n\nThis command line application can be run on a number of FHIR sandboxes to gather statistics about the observations available and the abilities of the FHIR2HPO library to convert them to HPO Terms.\n\n## Results\n\nThe results folder contains a backup of the database as of 10/03/2018 along with an Excel Spreadsheet that summarizes the findings of gathering observations from 5 sandboxes. The HAPI2 and MITRE sandboxes were excluded, because those servers do not contain any observations with enough information for conversion. (Generally they contain a single value with no reference ranges or interpretations.)\n\n## Setup\n\nThe application requires a MySQL database to store the results from runs. The easiest way to get this set up is to use the docker-compose file in this directory. If you don't have Docker, installation instructions can be found [here](https://docs.docker.com/install/) or you can use Homebrew on a Mac.\n\nOnce Docker is running, type the following to get a MySQL database up and running in the background. \n\n```docker-compose up -d```\n\nThis will create an empty database called f2hstats with usernames/passwords configured for use with the application as is.\n\n## Restore Database\n\nIf you would like to review the results without actually running the command-line application yourself, you can restore the backup to your running MySQL container. If you prefer to run the application with an empty database, skip this section.\n\nFirst, uncompress the backup:\n\n```gunzip results/f2hstats.sql.gz```\n\nNow restore the database:\n\n```mysql -h 127.0.0.1 -u f2hstats -p f2hstats f2hstats \u003c results/f2hstats.sql```\n\nSee the [section](#connect-to-mysql) below for more information about connecting to and querying the database.\n\n## Build Application\n\nCompiling this library requires installation of [Maven](http://maven.apache.org/install.html) and [Java 8](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html).\n\nIn addition, you need to locally install two libraries that are not yet available on Maven Central. The [monarch-initiative phenol library](https://github.com/monarch-initiative/phenol) defines the domain around the HPO. From the command line:\n\n```\ngit clone https://github.com/monarch-initiative/phenol.git\ncd phenol\ngit checkout v.1.2.6\nmvn install\n``` \n\nThis checks out and builds Release 1.2.6 of phenol. \n\nNext install the fhir2hpo library.\n\n```\ngit clone https://github.com/OCTRI/fhir2hpo\ncd fhir2hpo\ngit checkout v1.0.0\nmvn install\n``` \n\nThis checks out and builds Release 1.0.0 of fhir2hpo. Both libraries are now installed in your local Maven repository.\n\nFinally, clone this library and run `mvn install` to build the jar.\n\n## Run Application\n\nYou can run this application in a few different ways. Make sure MySQL is up and receiving connections. Run as a jar:\n\n```java -jar target/f2hstats.jar```\n\nOr as a spring-boot app:\n\n```mvn spring-boot:run```\n\nYou can also set up the Eclipse Spring Tool Suite with all the projects and run using the Boot dashboard. This is best for development as it will track changes in the underlying library so you don't have to rerun maven each time.\n\nWhen running, you can provide a couple of optional arguments.\n\n`-s R3` : The name of the sandbox to gather stats for. Current options are R2, R3, EPIC, HAPI2, HAPI3, MITRE, and HSPC. Default to R3 if this option is not provided. See the main class for more info.\n\n`-p 5` : The number of pages of patients to collect. Without this option, the app will get as many patients as it can, but for testing you may want to limit the run time.\n\nThe application uses Hibernate, and it is currently set to automatically create the database schema on your first run of the application. Data from the run will be persisted to the Docker MySQL container and will remain there even when you bring the container up and down.\n\nRunning the application will print some information to the console that indicates what queries are being made and the counts when they are available.\n\n## Connect to MySQL\n\nWith the Docker container running, you can connect to MySQL either through the command line or using a free tool such as SequelPro on Mac or MySQLWorkbench in Windows. Use the username and password f2hstats. On the command line, you may need to use the host option to connect:\n\n```mysql -h 127.0.0.1 -u f2hstats -p f2hstats f2hstats```\n\nThe scripts directory in this project provides a few useful queries against the database to gather information about successes and failures. Much of this data is also summarized in the Excel file in the results folder.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctri%2Ff2hstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctri%2Ff2hstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctri%2Ff2hstats/lists"}