Coder Social home page Coder Social logo

fhir-profiles's Introduction

How to Add a New Extension (part 1)

  1. Download and set up Forge from https://fire.ly/forge (it's a FHIR profile editor)
  2. Clone and check out the FHIR-Profiles repo from our older Git org

How to Add a New Extension (part 2)

  1. Open forge
  2. Find and open one of the XML files for an existing extension (in that repo) - so you can compare against something
  3. Create a new extension (you need to click on the "session" node before the "new" button is enabled)
  4. Select the Properties tab
  5. Paste your extension URL in the URL field (e.g. http://endeavourhealth.org/fhir/StructureDefinition/primarycare-appointment-dna-reason-extension)
  6. Copy and paste the last part of the extension URL into the Resource ID field (e.g. primarycare-appointment-dna-reason-extension)
  7. Copy and paste the last part of the extension URL into the Name field and change to start words with caps (e.g. PrimaryCare-AppointmentDnaReason-Extension)
  8. Enter something in the Description box
  9. Set the Publishing Date to today
  10. Change Context Type to "Resource"
  11. Click the + button next to the Context field and select the resource type(s) your extension applies to
  12. Select the Element Tree tab
  13. Click on "Value[x]"
  14. On the right, uncheck all the options and then just check the option(s) for the data types your extension will store
  15. Click "Save" to save your extension to XML, name it the same as the Resource ID (e.g. primarycare-appointment-dna-reason-extension.xml) - save to the Extensions folder in the repo (\FHIR-Profiles\Profiles\PrimaryCare\Extensions) That's your new extension created, but you have to update the profile for the resource(s) that use it...

How to Add a New Extension (part 3)

  1. Still in Forge, and with your new extension still open, click the Session node on the left
  2. Click Open and select the XML file for the Resource profile you need to amend (the files are in the Resources folder in the repo, e.g. \FHIR-Profiles\Profiles\PrimaryCare\Resources)
  3. With your resource profile open, select the Element Tree tab at the top
  4. Click the top-most node in the tree below the tab
  5. Click Extend to add a new extension to the resource, which you should see appear at the bottom
  6. Click the new extension
  7. Click the top-right drop down (extension) combo and you should see your new extension listed (any open extension files are shown here) - select it
  8. Enter a Name for your extension (e.g. DnaReason)
  9. Select the appropriate cardinality for your extension (e.g. 0..1)
  10. Save the resource XML file

How to Add a New Extension (part 4)

  1. Close Forge
  2. Commit and push your changes to Git. You should be committing the new XML file for your extension, plus the XML files for any resources you updated too.

fhir-profiles's People

Contributors

jonathanhomer avatar drewlittler avatar ergosoftuk avatar

Stargazers

Igor Sirkovich avatar Dunmail avatar

Watchers

James Cloos avatar Marcus Baw avatar Dunmail avatar Paul Simon avatar  avatar  avatar Andrew Marshall avatar Darren Sheavills avatar Jack Beaken avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.