Can a FHIR profile StructureDefinition be based on another profile StructureDefinition? - hl7-fhir

Can a StructureDefinition created as part of a FHIR profile be based on another StructureDefinition also created as part of a profile?
E.g.
The DAF-Patient StructureDefinition is part of the DAF FHIR profile and is not part of the core FHIR definition - http://www.hl7.org/fhir/daf/daf-patient.html.
Let's say you wanted to create a SecondaryCare-DAF-Patient which was based on the DAF-Patient but had further restrictions to it's elements.
Is this allowable as per the FHIR DSTU 2 specification?

yes, the StructureDefinition.base would be http://hl7.org/fhir/StructureDefinition/daf-patient.

Related

Clinical Notes (SOAP) representation FHIR

My question is more about modeling simple clinical notes in SOAP (Subjective, Objective, Assessment, Plan) into the FHIR specification.
I have been trying to look into the documentation but it doesn't provide a clear way of doing it or a clear way of which resources to use.
Does anyone have an idea of the best resources to use from FHIR for clinical notes?
Most EHRs will utilize DocumentReference and Binary. DocumentReference would hold the metadata about the note, such as the author and creation date/time. Binary would hold the content in a base64-encoded string.
There is the possibility of forgoing the Binary and using the content.attachment.data attribute in DocumentReference to directly hold the base64-encoded string, but this isn't as common.

What's the difference between id and identifier for a FHIR resource?

The Resource entity define an id attribute as "Logical id of this artifact". Meanwhile for resources like MedicationRequest also define an attribute named identifier. The description is "External identifier" or "Business identifier".
I'm wondering what's the difference between these two attributes? From the RESTful API definition like update, the id can be used to uniquely locate the resource, like POST [base]/[resource]/[id]. After POST another GET should be able to retrieve that resource using GET [base]/[resource]/[id]. It's more like something similar to a storage identifier. Then how about that identifier?
the .id is controlled by the local server. As a resource is coped from server to server, it will change. it's basically the internal primary key for the object, and it's entirely controlled by the FHIR server itself (or, more precisely, by the interaction between the client and server). So it's not a portable identifier.
But almost all the resources correspond to (somewhat) real world entities that also are recorded in other systems, and that are assigned portable identifiers that are used across multiple systems to track the entity. These identifiers are constant as a resource (or other forms of representation of the real world entity) are copied around and moved from place to place. Some identifiers are assigned by external (government) agencies. Identifiers includes things like Patient MRNs, Provider Numbers etc. Often, because of distributed record processing, entities have many identifiers to carry, and there's a whole business in arbitrating between them.

FHIR Rersources for Specialty

I would like to know what FHIR resource has to be used for bringing the list of specialities that are available for an organisation. These specialities are encounter specific so the response must be returned along with its encounter information based on the organisation.
Is that advisable to use List resource in FHIR?
If you search a FHIR server for a 'collection' of resources (like Encounter, HealthcareService or any other) the standard response would be a Bundle rather than a List.

Generate structure classes from StructureDefintion with HAPI

Is it possible to generate structure classes from a custom StructureDefintion in a similar fashion as HAPI generates official DSTU2/3 structure classes?
I want to implement some local StructureDefinition from simplifier.net (For example: https://simplifier.net/NictizSTU3/nl-core-address/).
The documentation of HAPI wasn't helping me either, am i suppose to use the hapi-tinder-plugin?
It seems tedious and error prone to hand write custom structures as specified in http://hapifhir.io/doc_custom_structures.html
For me the ideal workflow is something like:
Fetch StructureDefinition from simplifier
Generate models for the StructureDefinition
Register generated models in HAPI and fill the models accordingly
Generating classes from profiles is on our list of things to do, but doing it well (particularly when there's slicing involved) isn't super-easy, so most of the reference implementations have been holding off until there's funding support to get it done.

What is the convention to specify data types of attributes in apiary.io markdown?

The apiary.io list resource attributes in point form. Is there a specific convention to show what data type these attributes are, or met data specifying formats?
At the moment there is not convention for discussing resource's attributes in the API Blueprint. What comes close is planned Message-body Attributes Description.
But I feel what would be the real solution is what the concept of a future API Blueprint – Resource Blueprint proposes under semantic data definition (of a resource). Refer to the example resource blueprint.
So while none of the previous is implemented, if you are looking for a convention, I would suggest consider the one as proposed in resource blueprint e.g.:
# Resource [/resource]
## Attributes
+ ip (string) ... ipv4 or ipv6 address associated with the resource
+ some-other-attribute (number, optional, `42`) ... a number of something

Resources