What if I want to define a resource but the data I have does not match all the predefined fields? - dstu2-fhir

I am new to FHIR and I am trying to understand how the resources work.
Assume I have patient data and I want to store it as a Patient resource define by FHIR.
Patient Resource: http://build.fhir.org/patient.html
But say the data I have is limited to Patient Name, Gender and Birthdate.
Do I just omit the other fields while defining my Patient Resource?

check the cardinality on the fields; if the cardinality is 0..*, then you can omit them, yes. In the case of patient, nothing is 1..n, so you can omit whatever you want

Related

HERE Navstreets LINK_ID Range

My organization has acquired the HERE Navstreets data set. It wishes to update the content while still adhering to the HERE Navstreets data model and relationships.
In this context, it is deemed of value to:
Retain the LINK_ID column as the unique identifier for each street segment.
Make a distinction between the original HERE LINK_ID values and the one added by my organization.
Retain the ability to ingest streets updates from HERE should my organization decide to do so.
In this context, we would like to use a different range of LINK_ID values from the one used by HERE. As an example, if HERE uses values between 10,000,000 and 100,000,000, we would assign only LINK_ID values that are within the range 1,000-9,999,999 (this is only for illustration purposes).
Is this approach already accounted for by HERE for the street data they may get from Map Creator? Is there a specific HERE (for Review or Work in Progress) range of LINK_ID values we should consider?
Based on the HERE KB0015682: Permanent ID concept in HERE Data
Entities with Permanent IDs
Generally, the following feature do have permanent IDs in the HERE Map products:
Lane
Face
Point Features
Administrative Areas (for , Built-up Areas, Districts, and Administrative Areas)
Complex Features (this includes Complex Administrative Area Features as well as Complex Intersections and Complex Roads)
Permanent IDs are globally unique within a specific Object, e.g., a Link ID occurs once globally. However the same Permanent ID can be used among different Object types (e.g., Node, Link, condition, etc.). Note: When a map is upgraded to Intermediate or HERE map, or when a country undergoes administrative restructuring, there may be a change in Permanent IDs.
The following are examples of permanent IDs in the RDF:
Address Point ID
Admin Place ID
Association ID
Building ID
Carto ID
Complex Feature ID
Condition ID
Country ID (which is one of the Admin Place IDs)
Face ID
Feature Point ID
Lane ID
Lane Nav Strand ID
Link ID
Name ID (with some exceptions)
Nav Strand ID
Node ID
POI ID
Road Link ID
Sign ID
Zone ID
Numeric Range of Permanent IDs
Map object IDs (PVIDs) in the extracts use 32-bit integer values to fit in a N(10) scheme. Note: Exception to N(10) scheme can exist. For example, Lane ID is N(12) in length.
The entire range is divided as follows:
Range----------------------------Designation
0000000001 to 0016777215 -> Non-permanent IDs
0016777215 to 2147483647 -> Permanent IDs
The range dedicated to permanent IDs are used for any entity.
The range dedicated to non permanent IDs are used in rare situations where an update is made in a copy of the database instead of in the live database itself and this update results in a new ID. This new ID in the database copy would be in the non-permanent range. The update would also be applied into the live database and this update would receive a permanent ID available in the next scheduled release. A cross-reference is not provided between non-permanent IDs and the eventual permanent ID from the live database.

Where to keep related patient information in fhir

I am trying to convert a patient to fhir compliant patient. One of the attributes in our patient structure is 'related patient'. This attribute lists down all other patients who are related to the given patient.
Example , patient p1 is a father of patient p2. So, p1 has a attribute 'related patients' and the value of that attribute is a list containing p2.
Where should I keep this 'related patient' information in fhir object model ?
The FamilyMemberHistory resource has an extension (http://www.hl7.org/fhir/extension-familymemberhistory-patient-record.html) that lets you link that particular family member to the corresponding Patient record for that person. At the moment, there's no way to do that directly from Patient, though you could define an extension that would do that if you really needed to.

XML for Analysis (XML/A) format of member names?

I have two different XML/A providers, Mondrian and icCube. The tuples for a time dimension contain the unique name for the member, but the format of the member name is different:
Mondrian:
<UName>[Time].[2004].[QTR2].[Apr]</UName>
<Caption>Apr</Caption>
[Time] is the name of the hierarchy
[2004] is the name of the ancestor at the Year level
[QTR2] is the name of the ancestor at the Quarter level
[Apr] is the local name of the member at the Month level
icCube:
<UName>[Time].[Calendar].[Month].&[Jun 2010]</UName>
<Caption>Jun 2010</Caption>
[Time] is the name of the dimension
[Calendar] is the the name of the
hierarchy
[Month] is the name of the level
[Jun 2010] is the name of
the month member.
(I don't know why the ampersands are there)
My question is, is there any recommended, preferably standard way to figure out how the member names are formatted?
The reason I want to know this is when I render the result in a Pivot table, the captions for the members will usually end up as labels on the headers of the pivot table. But since the captions may not be unique, it is desirable to also produce labels of the "ancestor" members, because together they do identify the member uniquely.
In my example, I could use the parts of the member unique name to do this, but in ic cube not,since the member u name is structured differently.
I have 2 questions:
1) How can I tell beforehand what format the XML/A provider will use to identify the members?
2) What would be the recommended way in ic cube to produce the labels for the ancestor members?
UPDATE:
Luc Boudreau informed me that the ampersand indicates "key notation" - it designates the member key rather than its name. Thanks Luc!
The meaning of unique names in MDX is a string that guarantees that it defines a unique MDX entity when parsed. There is no possible collision with another MDX entity. The way to write it depends on the XMLA provider. Even though it's 'unique' there are multiple ways creating it, each server chooses its way.
Never mind, a query written in one server will work in another as both 'unique' names are correctly parsed.
& amp; stands for &
Our advise, the client code should not rely on the format of the unique names.
That being said, if you need parent "names", you should retrieve them explicitly using the "Parent" function and/or as a calculated measure retrieving the name/caption property.
Hope that helps.

Adding a new user to neo4j

A totally neo4j noob is talking here,
I like to create a graph to store a set of users, a typical user is as follows:
CREATE
(node_1 {FullName:"Peter Parker",FirstName:"peter",FamilyName:"parker"}),
(node_2 {Address:"Newyork",CountryCode:"US"}),
(node_3 {Location:"Hidden"}),
(node_4 {phoneNumber:11111}),
(node_5 {InternetEmailAddress:"peter#peterland.com")
now the problem is,
Every time I execute this I add 5 more nodes.
I know I need to use a unique key, but all example I saw can use a unique key for a specific node. So how can I make sure a user doesn't get added if it already exists(I can use email address as unique key).
how do I update the nodes if some changes occur. for example, after a week I want to update the graph to contain the following instead of the previous one.(no duplicates)
CREATE(node_1 {FullName:"Peter Parker",FirstName:"peter",FamilyName:"parker"}),(node_2 {Address:"Newyork",CountryCode:"US"}),(node_3 {Location:"public"}),(node_4 {phoneNumber:11111}),(node_5 {InternetEmailAddress:"peter#peterland.com"),(node_6 {status:"Jailed"})
(NOTE the new update changed location to "public" and added a new node for peter
Seeing as you had a load of nodes anyway.
Some of the data you have modelled as Nodes are probably properties as the other answer suggests, some are possibly correctly modelled as Nodes and one could probably form the or a part of the relationship.
Location public/hidden can be modelled in one of three ways, as a property on the Person, as a property between the Person and the Location or as the relationship type. To understand that first you need to have a relationship.
Your address at the moment is another Node, I think this is correct, but possibly you would want two nodes, related something like this:
(s:State)-[:IN_COUNTRY]-(c:Country)
YMMV and clearly that a US centric model, but you can extend it easilly enough.
Now you could create Peter with a LIVES_IN relationship:
CREATE (p:Person{fullName:"Peter Parker"}), (s:State{name:"New York"}), (c:Country{code:"US"}),
(p)-[:LIVES_IN]->(s), (s)-[:IN_COUNTRY]->(c)
For speed you are better off modelling two relationships which could be LIVES_IN_PUBLIC and LIVES_IN_HIDDEN which means to perform that update that you want above then you have to delete the one and create the other. However, if speed is not of the essence, it is common also to use properties on the relationship.
CREATE (p:Person{fullName:"Peter Parker"}), (s:State{name:"New York"}), (c:Country{code:"US"}),
(p)-[:LIVES_IN{public:false}]->(s), (s)-[:IN_COUNTRY]->(c)
So your complete Q&A:
CREATE (p:Person {fullName:"Peter Parker",firstName:"peter",familyName:"parker", phoneNumber:1111, internetEmailAddress:"peter#peterland.com"}),
(s:State {name:"New York"}), (c:Country {code:"US"}),
(p)-[:LIVES_IN{public:false}]->(s), (s)-[:IN_COUNTRY]-(c)
MATCH (p:Person {internetEmailAddress:"peter#peterland.com"})-[li:LIVES_IN]->()
SET li.public = true, p.status = "jailed"
When adding other People you probably do not want to recreate States and Countries, rather you want to match them, and possibly Merge them, but we'll stick to Create.
MATCH (s:State{name:"New York"})
CREATE (p:Person{name:"John Smith", internetEmailAddress:"john#google.com"})-[:LIVES_IN{public:false}]->(s)
John Smith now implicitly lives in the US too as you can follow the relationship through the State Node.
Treatise complete.
I think you're modeling your data incorrectly here - you're setting up each property of the person as a separate node, which is not a good idea. You don't have any linkages between those nodes, so with this data pattern, later on you won't be able to tell what Peter Parker's address is. You're also not using node labels, which I think could really help here.
The quick question to your answer about updating nodes is that you have to MATCH them, then use SET to modify a property. So if you had a person, you might do this:
MATCH (p:Person { FullName: "Peter Parker" })
SET p.Address = "123 Fake Street"
RETURN p;
But notice I'm making assumptions about the way your data is structured. I'll take that same data you provided, this might be a better way of creating it:
CREATE (node_1:Person {FullName:"Peter Parker",
FirstName:"peter",
FamilyName:"parker",
Address:"Newyork",CountryCode:"US",
Location:"Hidden",
phoneNumber:11111,
InternetEmailAddress:"peter#peterland.com"});
The difference with this suggestion is that I'm putting all the properties into a single node (instead of one property per node) and I'm applying the Person label to the node.
If you structured the data like this, then the update query I provided would work. Structuring the data like you have it, it's not possible to update Peter Parker's address, because there's no relationship between your node_1 and node_2

optional parameter addition to a colletion (asp.net C#)

Hello friends i am to add optional parameter to pass these in a method the parameter may vary every time.
And i need to pass these parameter to a method, so my question is how should i add these optional parameter to a collection and what kind of collection object should i use and how should i use that.
i elaborate here, i am having following fields.
1)course field(a drop down list) and on selected index change of course a check box list of corresponding branches are visible now i can select branches of choice by putting check mark on check boxes.(both course and branch are compulsory fields)
2)pass_out year which is a compulsory field.(a text field)
3)education gap which is optional so the text box may be empty as well and may having a digit as well.
4)required first year percent, second year, third year, final year, current degree, high school, senior secondary, gradation, post graduation, diploma percent, birth date which are all optional so these fields may also be empty or having a digit in the text box.
5) current backlog(a drop down list)having choices all, yes , no.
6)number of ATKT text box which may also be empty or can have a digit.
So i want to store all these variables value to some collection of object which will passed to a different method by passing all these variable from here,
But i am unable to figure out how should i store these optional variable to some object and how should i pass them to other method where all variable values will be taken out and an appropriate query will be written to interact with the data base to get the data table.
please elucidate me on this please. I am really not getting a feasible solution, i have thought of few options which i can let you know if you demand but those all seems to be tedious and difficult and redundant so i see help from you.
Don't bother with optional parameters or some collection of parameters, just decide how you will represent each value best, including how to represent empty values.
For a string value you can just use a null reference or an empty string. For a numeric value you can use a nullable int (int?). For a list of checkboxes where none is selected you can send an empty list.
When figuring out how to use this in a query to the database, it's easier if you have the values as parameters that always exist even if the values represent an empty value, rather than to have to parse out parameters from a collection where a parameter might be missing. Also, as you have different data types it's better if you can use an appropriate data type for each parameter, instead of casting everything into the same mold just to fit in a collection.

Resources