{"id":30799185,"url":"https://github.com/inferno-framework/fhir_stu3_models","last_synced_at":"2025-09-05T19:08:57.456Z","repository":{"id":34566267,"uuid":"176808651","full_name":"inferno-framework/fhir_stu3_models","owner":"inferno-framework","description":"FHIR STU3 Models","archived":false,"fork":false,"pushed_at":"2024-05-30T18:13:03.000Z","size":24381,"stargazers_count":3,"open_issues_count":10,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-18T13:53:06.196Z","etag":null,"topics":["fhir"],"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":"2019-03-20T20:05:34.000Z","updated_at":"2025-07-31T12:41:09.000Z","dependencies_parsed_at":"2024-05-30T19:36:06.573Z","dependency_job_id":"6eba663f-5e0d-4516-b1fc-ac7a99bf81f5","html_url":"https://github.com/inferno-framework/fhir_stu3_models","commit_stats":{"total_commits":258,"total_committers":13,"mean_commits":"19.846153846153847","dds":"0.41860465116279066","last_synced_commit":"b5f1c8eb3e730ed0a3e52203e79acbefa124d0bc"},"previous_names":["inferno-framework/fhir_stu3_models","fhir-crucible/fhir_stu3_models"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/inferno-framework/fhir_stu3_models","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inferno-framework%2Ffhir_stu3_models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inferno-framework%2Ffhir_stu3_models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inferno-framework%2Ffhir_stu3_models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inferno-framework%2Ffhir_stu3_models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inferno-framework","download_url":"https://codeload.github.com/inferno-framework/fhir_stu3_models/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inferno-framework%2Ffhir_stu3_models/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273806126,"owners_count":25171564,"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-09-05T02:00:09.113Z","response_time":402,"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":["fhir"],"created_at":"2025-09-05T19:08:53.630Z","updated_at":"2025-09-05T19:08:57.433Z","avatar_url":"https://github.com/inferno-framework.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fhir_stu3_models [![Build Status](https://api.travis-ci.org/fhir-crucible/fhir_stu3_models.svg?branch=master)](https://travis-ci.org/fhir-crucible/fhir_stu3_models)\n\nFHIR STU3 Resource models generated from FHIR StructureDefinitions.\n\nThe StructureDefinitions, XML Schemas, and examples are reused from the [HL7 FHIR build tools](https://github.com/HL7/fhir).\n\n### Getting Started\n```\n$ bundle install\n$ bundle exec rake fhir:console\n```\n\n### Features\n- FHIR STU3 Resource Models\n- XML and JSON support\n- Resource Validation\n- Not Supported\n  - Primitive Extensions\n  - FHIR Comments\n\n### Resource Basics\n\n  Using XML...\n  ```ruby\n  xml = File.read('patient-example.xml')\n  patient = FHIR::STU3.from_contents(xml)\n  puts patient.to_xml\n  ```\n  Using JSON...\n  ```ruby\n  json = File.read('patient-example.json')\n  patient = FHIR::STU3.from_contents(json)\n  puts patient.to_json\n  ```\n\n  Creating an `Observation` by hand...\n  ```ruby\n  obs = FHIR::STU3::Observation.new(\n    'status' =\u003e 'final',\n    'code' =\u003e {\n      'coding' =\u003e [{ 'system' =\u003e 'http://loinc.org', 'code' =\u003e '3141-9', 'display' =\u003e 'Weight Measured' }],\n      'text' =\u003e 'Weight Measured'\n    },\n    'category' =\u003e {\n      'coding' =\u003e [{ 'system' =\u003e 'http://hl7.org/fhir/observation-category', 'code' =\u003e 'vital-signs' }]\n    },\n    'subject' =\u003e { 'reference' =\u003e 'Patient/example' },\n    'context' =\u003e { 'reference' =\u003e 'Encounter/example' }\n  )\n  obs.valueQuantity = FHIR::STU3::Quantity.new(\n    'value' =\u003e 185,\n    'unit' =\u003e 'lbs',\n    'code' =\u003e '[lb_av]',\n    'system' =\u003e 'http://unitsofmeasure.org'\n  )\n  ```\n  \n  Iterating over all elements in a resource, including nested elements...\n  ```ruby\n  patient.each_element do |value, metadata, path|\n    puts \"Info for #{path}:\"\n    puts \"- value: #{value}\"\n    puts \"- type: #{metadata['type']}\"\n    puts \"- cardinality: #{metadata['min']}..#{metadata['max']}\"\n  end\n  ```\n\n  ### Validation\n\n  Using built in validation...\n  ```ruby\n  patient.valid? # returns true or false\n  patient.validate # returns Hash of errors, empty if valid\n  ```\n\n  Using a profile or structure definition...\n  ```ruby\n  sd = FHIR::STU3::Definitions.resource_definition('Patient')\n  sd.validates_resource?(patient) # passing in FHIR::Patient\n  # Validation failed? Get the errors and warnings...\n  puts sd.errors\n  puts sd.warnings\n  ```\n# License\n\nCopyright 2014-2021 The MITRE Corporation\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finferno-framework%2Ffhir_stu3_models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finferno-framework%2Ffhir_stu3_models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finferno-framework%2Ffhir_stu3_models/lists"}