FHIR Device, DeviceComponent, and DeviceMetric resources - hl7-fhir

I am trying to map the properties of a medical device as described by a sequence of OBX segments in a PCD-01 message to FHIR resources. The properties described in the PCD-01 message are
the device type (such as a blood pressure cuff) (found in FHIR Device
resource)
the manufacturer name and model number (found in the FHIR Device
resource)
the production specifications (found in the FHIR DeviceComponent
resource)
properties such as time capabilities (found in the FHIR DeviceMetric)
I would expect that the logical way to do this would be to populate each of these resources with the data from the said OBX segments and then "link" them together by making the DeviceMetric a contained resource of the DeviceComponent which is a contained resource of the Device. However, a contained resource cannot contain further contained resources so I need to include two contained resources in the Device resource.
However, the example for the DeviceComponent at
http://www.hl7.org/fhir/2015May/devicecomponent-example-prodspec.json.html
shows the Device a contained resource of the DeviceComponent, exactly backwards of what I would expect. How are these resources supposed to be used? I cannot use any single one of these resources to describe all the properties of the actual device, the real difficulty being that the manufacturer and model names are not in the same resource as the production specification information.
Also, if the Device type identifies that the device is a blood pressure cuff, what does the DeviceComponent type indicate? There really is no 'component' in this case, the device is a stand-alone BP cuff and nothing else, I am just forced to use the DeviceComponent resource in order to describe the production specification values.
Any help on this would be greatly appreciated!

Thanks Ewout for your very well explanation.
To Brian: As you mentioned IEEE 11073-20601 in one of your comments, may I make an assumption that you are only dealing with MDS and Metric as the DIM model for your blood pressure cuff?
Thus, to describe the blood pressure cuff observation (PCD-01 message), your resource of interest are the following:
Device: to describe the device type (preferably using nomenclature as defined in IEEE 11073-10101), manufacture and model number, udi, etc. This resource is created once, and will live through the lifetime of the device unless there is a change with location/organization/patient.
DeviceComponent: to describe the MDS where you can populate production specification, operational status of the device, etc. This resource would have the same lifetime as the device resource unless there is a change with software version, hardware version, or operational status for example.
DeviceMetric (x3): to describe each metric (systolic, diastolic, pulse) including type (preferably using nomenclature as defined in IEEE 11073-10101), unit (preferably using nomenclature as defined in IEEE 11073-10101, but UCUM is fine), identifier (metric unique identification that is assigned by the device, for example, handle ID), and measurementPeriod (if the device happens to repetitively taking measurement at a specified period time, for example, every hour). Same lifetime like DeviceComponent unless there is the change in unit or measurement period.
Observation (DeviceMetricObservation profile): to describe the actual measurement. (In PCD-01, we used OBX-4 to describe the c-tree path that link the observation to the actual metric in the tree. For FHIR, we use device element to describe the external reference to the DeviceMetric)
I would not recommend to use contained resource. I think we should probably create all Device/DeviceComponent, and DeviceMetric resources ahead of time, cache their links and used those as external references. For example, Device resource will be created first, then DeviceComponent whose source element contains the external reference to the Device resource, then DeviceMetric resource whose parent element contains the external reference to DeviceComponent and source element contains the external reference to Device. Now that we have a somewhat well-organized containment tree setup using those resources and links, whenever the device produces a new measurement, we only to create the observation resource, setup the link to DeviceMetric, and that should be it.
Please let me know if you have further questions. Thanks

"the Device a contained resource of the DeviceComponent, exactly backwards of what I would expect"
This is the way that the resources are defined - DeviceComponent refers to Device as a source, rather than Device listing it's components. I'm not sure why they are defined that way - I'll ask the committees (Orders/Obs and Devices) to comment.
I would think that if the Device is a blood pressure cuff, it has a single component that carries the values. That's not the most obvious solution, but it's certainly how things have developed over the years in the PCD space.

The physical composition of a Device is done by the DeviceComponents pointing to their "parent" component using DeviceComponent.parent, e.g. channel to VMD and VMD to the MDS. All components point to the "logical" Device they belong to, using DeviceComponent.source.
In this model, the "Device" is the "administrative" resource for the device (it does not change much and has manufacturer information etc.), where as the DeviceComponent models the physical part, including operation status and is much more volatile.
If you want to express which logical device your observation came from, you can just use Device, if you need to be more specific observation can point to DeviceMetric (which is really a kind of DeviceComponent).

Related

How to store User Fitness / Fitness Device data in FHIR?

We are currently in the process of evaluating FHIR for use as part of our medical record infrastructure. For the EHR data (Allergies, Visits, Rx, etc..) the HL7 FHIR seems to have an appropriate mapping.
However, lots of data that we deal with is related to personal Fitness - think Fitbit or Apple HealthKit:
Active exercise (aerobic or workout): quantity, energy, heart-rate
Routine activities such as daily steps or water consumption
Sleep patterns/quality (odd case of inter-lapping states within the same timespan)
Other user-provided: emotional rating, eating activity, women's health, UV
While there is the Observation resource, this still seems best fit (!) for the EHR domain. In particular, the user fitness data is not collected during a visit and is not human-verified.
The goal is to find a "standardized FIHR way" to model this sort of data.
Use an Observation (?) with Extensions? Profiles? Domain-specific rules?
FHIR allows extraordinary flexibility, but each extension/profile may increase the cost of being able to exchange the resource directly later.
An explanation on the appropriate use of an FHIR resource - including when to Extend, use Profiles/tags, or encode differentiation via Coded values - would be useful.
Define a new/custom Resource type?
FHIR DSTU2 does not define a way to define a new Resource type. Wanting to do so may indicate that the role of resources - logical concept vs. an implementation interface? - is not understood.
Don't use FHIR at all? Don't use FHIR except on summary interchanges?
It could also be the case that FHIR is not suitable for our messaging format. But would it be any "worse" to go FIHRa <-> FIHRb than x <-> FIHRc when dealing with external interoperability?
The FHIR Registry did not seem to contain any User-Fitness specific Observation Profiles and none of the Proposed Resources seem to add appropriate resource-refinements.
At the end of the day, it would be nice to be able to claim to be able to - with minimal or no translation, ie. in a "standard manner" - be able to exchange User Fitness data as an FHIR stream.
Certainly the intent is to use Observation, and there's lots of projects already doing this.
There's no need for extensions, it's just a straight forward use. Note that this: " In particular the user fitness data is not collected during a visit and is not human-verified" doesn't matter. There's lots of EHR data of dubious provenance...
You just need to use the right codes, and bingo, it all works. I've provided a bit more detail to the answer here:
http://www.healthintersections.com.au/?p=2487

How to determine a volume supports resolving bookmarks to renamed or moved files?

- bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:
Documentation states:
This method returns bookmark data that can later be
resolved into a URL object for a file even if the user moves or
renames it (if the volume format on which the file resides supports
doing so).
My question is, how can I query if a volume supports this feature?
From trial and error it seems only (internal?) hard drives support it, but I am looking for some kind of sure test like a NSURLVolumeSupports???Key.
NSURLVolumeSupportsPersistentIDsKey looks like a good candidate, but I failed to find any docs or google-info about it. Any hints?
It definitely sounds like the NSURLVolumeSupportsPersistentIDsKey would apply.
Following the hints in this forum thread here (archived version here), the documentation for the VOL_CAP_FMT_PERSISTENTOBJECTIDS volume capability flag (from man getattrlist(2)) says:
If this bit is set the volume format supports persistent object identifiers and can look up file system objects by their IDs. See ATTR_CMN_OBJPERMANENTID for details about how to obtain these identifiers.
and the common attribute ATTR_CMN_OBJPERMANENTID documentation says
An fsobj_id_t structure that uniquely and persistently identifies the file system object within its volume; persistence implies that this attribute is unaffected by mount/unmount operations on the volume.
Some file systems can not return this attribute when the volume is mounted read-only and will fail the request with error EROFS. (e.g. original HFS modifies on disk structures to generate persistent identifiers, and hence cannot do so if the volume is mounted read only.)

How should different Linux device tree drivers share common registers?

I'm working on a port of the Linux kernel to an unsupported ARM SoC platform. Unfortunately, on this SoC, different peripherals will sometimes share registers or commingle registers within the same region of memory. This is giving me grief with the Device Tree specification which doesn't seem to support the notion of different devices sharing the same set of registers or registers commingled in the same address space. Various documents I've read on the device tree don't suggest the proper way to handle this.
My simple approach to specify the same register region within multiple drivers throws "can't request region for resource" for the second device that attempts to map the same register region as another driver. From my understanding, this results from the kernel enforcing device tree rules regarding register regions.
What is the preferred general solution for solving this dilemma? Should there be a higher level driver that marshals access to the shared register region? Are there examples in the existing Linux kernel that address this specific issue (I couldn't find any, but I may not be sure what to look for)?
I am facing exactly the same problem. My solution is to create a separate module to guard common resources and then write 'client modules' that use symbols exported from the common module.
Note that this makes sense from the safety point of view as well. How would you otherwise implement proper memory locking and ensure operation coherency across several independent modules?
You can still use devm_ioremap() directly but extra caution has to be exercised with some synchronization.
Below is an example from upstream,
https://github.com/torvalds/linux/blob/master/drivers/usb/phy/phy-tegra-usb.c#L1368

Multiple names for practitioners

Currently (02-12-2013), in the practitioner resource 0..1 names can be associated to a practitioner. In contrast, 0..* names can be associated to a patient. This allows specifying a person's maiden name for example. Why is there this difference?
In the project I'm working on, we're exporting existing data about practitioners from our database using FHIR messages. In the database, all persons are stored in the same way. Since it is possible to store a person's maiden name (which is also done for practitioners in our data), we have to build the name part in a practitioner message differently from the name part in a patient's message. Also, when parsing a practitioner message, we'll need different code to extract the name of a patient and of a practitioner.
Therefore, I believe that there are two disadvantages of having different generic attributes of persons of different kinds:
It prevents us from sending the complete name information of a practitioner without resorting to extensions.
It complicates the code for building and parsing FHIR messages, which also makes the code less maintainable.
I understand that in most cases it's not very important to be able to send the maiden name of a practitioner, but it does add extra complexity for the implementation. Furthermore, I don't see what problems setting the cardinality to 0..* could cause. If someone only wants to send a single name, then that's still possible.
Similarly, the restriction of only allowing 0..1 addresses for a practitioner (as also discussed here) also seems like an unnecessary restriction.
Managing cardinality is a tricky issue. If the resource can have multiple names, then everyone dealing with this has to deal with the possibility of multiple names. The relevant committee believes that having multiple names is an unusual practice for practitioner records (that's certainly my experience) but a common one for patient.
Perhaps you'd like to explain your full use case so it can be considered by the committee? On the other hand, you can use an extension:
<Practitioner>
<extension url="http://myurl.com/fhir/profiles/extensions#maiden">
<valueHumanName>
<!-- details for human name -->
</valueHumanName>
</extension>
</Practitioner>
Therefore, I believe that there are two disadvantages of having
different generic attributes of persons of different kinds:
When designing Patient, Pracitioner and RelatedPerson, we have tried several different solutions:
having Person resource, separate from Patient/Pracitioner. This proved to be burdensome since many systems (unlike yours!) don't capture patient and person separately, and when looking at REST useage patterns it turned out they were always needed togehter, resulting in unneccessary burden on client and server
Having a special Demographics datatype which contained all shared attributes. This met resistance since it meant having attributes on Practitioner that did not make sense, e.g. marital status and deceasedDate. This run against our intent to keep the Resources focused to their scope and the number of attributes per resource manageable.
This is how we ended up where we are now: more or less "duplicating" the attributes (when applicable) across those three resources.
Similarly, the restriction of only allowing 0..1 addresses for a practitioner (as also >discussed here) also seems like an unnecessary restriction.
The Practitioner resource represents a person employed by an organization to provide care. We assumed that for one such engagement, there is one "official" (post) address for that person. The practitioner may however perform services at multiple locations (each of which can have an address).

How stable are Cisco IOS OIDs for querying data with SNMP across different model devices?

I'm querying a bunch of information from cisco switches using SNMP. For instance, I'm pulling information on neighbors detected using CDP by doing an snmpwalk on .1.3.6.1.4.1.9.9.23
Can I use this OID across different cisco models? What pitfalls should I be aware of? To me, I'm a little uneasy about using numeric OIDs - it seems like I should be using a MIB database or something and using the named OIDs, in order to gain cross-device compatibility, but perhaps I'm just imagining the need for that.
Once a MIB has been published it won't move to a new OID. Doing so would break network management tools and cause support calls, which nobody wants. To continue your example, the CDP MIB has been published at Cisco's SNMP Object Navigator.
For general code cleanliness it would be good to define the OIDs in a central place, especially since you don't want to duplicate the full OID for every single table you need to access.
The place you need to be most careful is a unique MIB in a product which Cisco recently acquired. The OID will change, if nothing else to move it into their own Enterprise OID space, but the MIB may also change to conform to Cisco's SNMP practices.
It is very consistent.
Monitoring tools depend on the consistency and the MIBs produced by Cicso rarely change old values and usually only implement new ones.
Check out the Cisco OID look up tool.
Notice how it doesn't ask you what product the look up is for.
-mw
The OIDs can vary with hardware but also with firmware version for the same hardware as, over time, the architecture of the management functions can change and require new MIBs. It is worth checking whether any of the OIDs you intend to use are in deprecated MIBs, or become so in the life of the application, as this indicates not only that the MIB could one day be unsupported but also that there is likely to be improved, richer data or access to data. It is also good practice to test management apps against a sample upgraded device as part of the routine testing of firmware updates before widespread deployment.
An example of a change of OID due to a MIB being deprecated is at
http://www.cisco.com/en/US/tech/tk648/tk362/technologies_configuration_example09186a0080094aa6.shtml
"This document shows how to copy a
configuration file to and from a Cisco
device with the CISCO-CONFIG-COPY-MIB.
If you start from Cisco IOSĀ® software
release 12.0, or on some devices as
early as release 11.2P, Cisco has
implemented a new means of Simple
Network Management Protocol (SNMP)
configuration management with the new
CISCO-CONFIG-COPY-MIB. This MIB
replaces the deprecated configuration
section of the OLD-CISCO-SYSTEM-MIB. "
I would avoid putting in numeric OIDs and instead use 'OID names' and leave that hard work (of translating) to whatever SNMP API you are using.
If that is not possible, then it is okay to use OIDs as they should not change per the SNMP MIB guidelines. Unless the device itself changes but that requires a new MIB anyway which can't reuse old OIDs.
This is obvious, but be sure to look at the attributes of the SNMP MIB variable. Be sure not to query variables that have a status of 'obsolete'.
Jay..
In some cases, using the names instead of the numerical representations can be a serious performance hit due to the need to read and parse the MIB files to get the numerical representations of the OIDs that the lower level libraries need.
For instance, say your using a program to collect something every minute, then loading the MIBs over and over is very inefficient.
As stated by others, once published, the name to numerical mapping will never change, so the fact that you're hard-coding stuff into your programs is not really a problem.
If you have access to command line SNMP tools, check out 'snmptranslate' for a nice tool to get back and forth from text to numerical OIDs.
I think that is a common misconception (about MIB reload each time you resolve a name).
Most of the SNMP APIs (such as AdventNet, CMU) load the MIBS at startup and after that there is no 'overhead' of loading MIBs everytime you ask for a 'translation' from name to oid and vice versa. What's more, some of them cache the results and at that point, there is no difference between name lookups and directly coding the OID.
This is a bit similar to specifying an "IP Address" versus a 'hostname'.

Resources