I need to transform an HL7 V3 Organization identifier (root+extension) to an URN.
Organization id is as follows:
<Organization xmlns="urn:hl7-org:v3">
<id>
<item root="2.16.840.1.113883.4.2" extensions="26879954"/>
</id>
...
As fas as I know I can use "URN:OID:2.16.840.1.113883.4.2"
But how to add extension value?
Thanks
You probably cannot. Organization <id> is the Instance Identifier (II) data type. The II data type identifies the root as “a unique identifier that guarantees the global uniqueness of the instance identifier. The root alone may be the entire instance identifier” and the extension as “a character string as a unique identifier within the scope of the identifier root”. In it turns, the root “must be a valid OID, UUID, or HL7 reserved identifier” so you cannot put an URN.
As an option, you may register your own OIDs as following - 2.16.840.1.113883.4.2.26879954 – in this case you need to keep a reference table to uniquely identify organizations.
The difference between these two is that in the fist case you identify a scoping authority and the organization within that authority. In the second case you identify an organization as a separate unique entity which does not belong to any scoping sets.
See HL7v3 Normative Edition for details.
I've been reviewing HL7 CCDA documentation! , and I see some HL7 CCDA templates expressed as: urn:hl7ii:2.16.840.1.113883.10.20.22.1.10:2014-06-09
So I guess the right way to represent an HL7 V3 id as URN:OID is:
urn:hl7ii:{root}:{extension}
Related
We need to get a unique identifier for all related fix messages in quickfixj.
scenario: if B lies between A and C and forwards fix messages from A to C and vice versa, we need to get a unique Id for all related messages to cache them in B.
Is there a uniqueId for all fix messages as mentioned above? if yes, does getting that unique identifier same (eg: message.getString(int field)) for all message types, or getting it depends on message type?
Do you mean a unique identifier per Order, for example? If yes, then that would be 11/ClOrdID for a NewOrderSingle (and some other message types). But you'll have other identifiers for other message types, e.g. quotes, market data snapshots, ...
There is no global unique identifier per se, so you would need to make one up. For example a concatenation of SenderCompID and MsgSeqNum and SendingTime should be unique. If you are sure that you will not reset the sequence number intra-day you could probably even leave out the SendingTime.
E. g. In Composition the element date has the data type dateTime.
<Composition xmlns="http://hl7.org/fhir">
...
<date value="[dateTime]"/><!-- 1..1 Composition editing time § -->
...
Is it with a Profile possible that the element date also adapts another data type, for instance the data type date?
See http://hl7.org/fhir/2015May/structuredefinition.html#6.17.5.2
Under the bullet "In practice..." the specification states "the list of types for an element must be the same or a subset of the list of types for the same element in the base structure".
So, no, new types may not be introduced. In general, a Profile (StructureDefinition) can only further restrict the use/content of a resource. It may not loosen the standard.
Chris is correct - the type cannot change and new types cannot be added. So if the specification says dateTime, you can't use "string" instead. However, in this specific circumstance, you can communicate "just date" within dateTime. And you can assert constraints against the type. So in theory, you could assert a length constraint of 10 characters on dateTime, essentially making it a date. As well, there's no requirement in FHIR that you store everything that's sent to you. So it's legitimate to throw away any time information that is sent to you (see http://hl7.org/fhir/2015May/updates.html for more information).
As a rule, stripping the time would be better than outright rejecting instances that contain a time. However, even that option is going to be seen as unexpected/undesirable by many communication partners.
The W3C TAG published the Working Draft URLs in Data Primer last month. It specifies a solution for the httpRange-14 issue.
Now vocabularies should specify categories for their properties, i.e. if a property applies to the document or to an entity described by the document.
How should/could RDF vocabularies specify the categories for properties today?
It says that metaformats (→ RDF) should specify a default category for properties and schema languages (→ RDFS) "should include mechanisms for indicating the category of a property". But I guess it will take some time until those specifications are updated.
Generally, I think that there is no such standardised method today, because right now you still need to differ between a thing and a document that holds a description of the thing. However, you may specify/create an owl:AnnotationProperty to indicate the type of a property in an RDF vocabulary.
How can I define some value should be unique in Neo4j?
for example think I want to store users data in node,so username should be unique.Is there any way to do it like what we do in sql ( define username as unique properties )?
For this you will need to use a node index and the uniqueness features available within the API to ensure that only one node is filed under each key-value pair. If you're working with Neo4j embedded then have a look at:
http://api.neo4j.org/1.8/org/neo4j/graphdb/index/Index.html#putIfAbsent(T,
java.lang.String, java.lang.Object)
http://api.neo4j.org/1.8/org/neo4j/graphdb/index/UniqueFactory.html
For the REST interface, you may have uniqueness support already in the library that you are using or, if you are not using a library, this page should help:
http://docs.neo4j.org/chunked/milestone/rest-api-unique-indexes.html
As node structures are not enforced in the same way that record structures are enforced in most RDBMSs, there is no direct equivalent to the UNIQUE KEY feature that you mention. Index uniqueness should however give you the same end result.
Hope this helps
Nige
What is the API call for finding a particular orgUnit ID for a particular course? I am trying to pull grades and a class list from API but I can not do it without the orgUnitID
There's potentially a few ways to go about this, depending on the kind of use-case you're in. Firstly, you can traverse the organizational structure to find the details of the course offering you're looking for. Start from the organization's node (the root org) and use the route to retrieve an org's descendants to work your way down: you'll want to restrict this call to only course-offering type nodes (org unit type ID '3' by default). This process will almost certainly require fetching a large amount of data, and then parsing through it.
If you know the course offering's Code (the unique identifier your organization uses to define course offerings), or the name, then you can likely find the offering in the list of descendants by matching against those values.
You can also make this search at a smaller scope in a number of ways:
If you already know the Org Unit ID for a node in the structure that's related to the course offering (for example, the Department or Semester that's a parent of the course offering), you can start your search from that node and you'll have a lot fewer nodes to parse through.
If your calling user context (or a user context that you know, and can authenticate as) is enrolled in the course offering, or in a known parent org (like a Department), then you can fetch the list of all that user's enrollments, and parse through those to find the single course offering you're looking for. (Note that this enrollments route sends back data as a paged result set, and not as a simple JSON array, so you may have to make several calls to work your way through a number of data pages before finding the one you want.)
In all these scenarios, the process will end up with you retrieving a JSON structure that will contain the Org Unit ID which you can then persist and use directly later.