FHIR New Patient Appointment booking (no patient yet created in system) - dstu2-fhir

Suppose a new patient is trying to book an appointment using FHIR APIs , how should I get his/her first name, last name, dob, phone number in my system ?
The appointment resource just specifies actor reference which is an Id to Patient resource in this case. But I have not created the patient in system who is trying to book appointment first time. So I need all this patient details.
How can I post those details in Appointment resource which I post to create an appointment ?

Alternatively, if you do not wish to create the patient in your system yet until he/she shows up, the initial appointment could contain the Patient as a "contained resource": https://www.hl7.org/fhir/references.html#contained. This is useful for getting data across that doesn't have an identified endpoint on a FHIR server.

You should expect to perform multiple FHIR interactions:
POST a Patient resource to create the patient. That will return the server ID of the patient.
Perform a Slot search to retrieve the list of available appointment slots. This will return a list of slots with their server IDs.
POST an Appointment resource including the patient ID and selected slot ID returned from the first two interactions.
You may also need to perform a Practitioner or other search prior to creating the patient if you want (for example) indicate who the patient's PCP is.

Related

NoSQL query of items,lists, Groups and Users using Firebase

Am looking at the data structure in this post and want to know how you would go about getting the emails of users who belong to a certain group when they could belong to several groups and the GroupID stored against that user is the current group they are participating in?
Do you store the email addresses with the userid under the "members" or, instead, for each member of the group, get that user's email address from the "users" document userid (this would mean iterating through the group/members collection and doing a query for each user. Not very efficient).
Am used to SQL so this is all new to me.
You should have a single node for each user
/users/UID/emails/
/users/UID/emailunread/
/users/UID/settings/
/users/UID/details/
/users/UID/payments/
So you can simply do a subscription for a singular node path this.myDatasubscription = this.DB.list('users/' + this.uid).snapshotChanges() ensuring changes like new emails or account settings will detected and rolled out in real time back to the app, so your are using angular/ng or something similar client side then your variables {{this.email_list}} should update real time with no page changes.
Take a look at this one.
error: Property 'getChildren' does not exist on type 'DataSnapshot'

reporting on event hits in google analytics

I have been tasked with using Google Analytics to report of use of a desktop app so we can see which parts of the program are being used and how heavily, and potentially also see which companies are using which parts of the program (each company has a unique companyID). Ideally I'd like to be able to look at correlations (e.g., How many users who use report A also use process B?)
I currently have my program set to fire off a call to analytics. I've set it up to use the event tracking, but I'm open to app/screen tracking or something else if something would work better. I'm passing values like
v=1
&t=event // Event hit type
&tid=UA-XXXXX-Y // our ID; real code has valid value here
&cid=12345 // CustomerID
&ec=JobFinancialReport // Event Category
&ea=Run // Event Action
&el=Manager // Event label
&ev=7 // Event value
What I can't figure out is how in Google Analytics to set up reports that would show me something like:
CustomerID Category Label Total Hits Unique Users
12345 JobFinancialReport Manager 27 2
12345 MarketingReport1 Manager 6 4
I'm totally new to analytics so pardon my ignorance if I have some key misconception here. I've searched Googles sites and other questions here, but I may be wording my question incorrectly so I'm not finding something that's there. This is only one example; in some cases we might want to see how broadly each customer is using the program; in other cases we'd want to take the customerID out and just see how much a particular report is being used overall. Appreciate any guidance. Thanks.
The "cid" parameter is the client id, the value that is used to stitch single interactions into sessions and users.
The first problem that comes to mind with your setup is that the client id is not exposed in the user interface (with the single exception of the user explorer report) or the API.
You would need to implement this via a custom dimension (probably user scope, since it probably will never change for a given user) where you pass in the client id (you still need the cid parameter).
Then you could create a custom report (or create a report in Google Data Studio) with the custom value as primary dimension and your selected metric.
If you want to report "Unique Users" you would probably need to create a cid per logged-in user (if all users of the app have the same cid then you will always have but a single user reported). You should then probably create a second custom dimension for the company id, so you can segment your reports by company.
you can use custom reports in google analytics to get your desired output. here is how to create custom reports https://support.google.com/analytics/answer/1151300?hl=en

Mapping the Right CRM Values (e.g. CLV) to Actual Users (Cookies) After Data Import from CRM to GA

BACKGROUND: The implementation guide for Importing User Data to create AdWords Remarketing Audiences describes using the data import feature in Google Analytics to import Customer Lifetime Value (i.e. Silver, Gold or Platinum) from a CRM. The imported file takes the form of a CSV with two columns, one for unique CRM User IDs and one for the Lifetime Value (e.g. Platinum). After creating GA custom dimensions for both values (CRM User ID and Lifetime Value), you create a data set using CRM User ID as the "Key" and Lifetime Value as the "Imported Data". Finally, the GA tracking code must be modified to "set the user scoped dimension to represent the CRM user".
Presumably, when a visitor lands on the site the GA tracker generates and sets a value for the CRM User ID custom dimension, and the data set schema which defines the key and imported data proceeds to associate that CRM User ID with a Lifetime Value (e.g. Platinum).
QUESTION: Since the Lifetime Values are specific to the CRM User IDs that they are associated with at the time of import, shouldn't the mapping of CRM User ID to Lifetime Value be invalid within the GA environment (or "after the import")? For example, when a new visitor hits the site, the tracking code must assign a brand new CRM User ID (ID = "123") because that visitor's cookie won't have an existing ID value. So GA refers to the data set schema's "Key" for that user's ID ("123") and assigns a Lifetime Value of "Platinum" because "123" is mapped to "Platinum". But "123" was the unique CRM ID for a user who truly had a "Platinum" Lifetime Value, and now we've reassigned both that user's ID and Lifetime Value to a random site visitor. Am I misunderstanding how this works? Ultimately, I'd like to create AdWords remarketing lists based on CRM attributes, but the underlying logic of this data import feature is hard to follow.

How to grant a user access for specific time?

I am building a website users have to pay for different functions. For example the user have payed for "packet 1" for the current month and it includes "short messages". How can I check, if a user is allowed to send sms? Updating the user/role relations every night or is there anything more dynamic?
You could add custom voter, where you can check if a user is allowed to use certain service. See example here:
http://symfony.com/doc/current/cookbook/security/voters.html
You can create a table in a database which has a foreign key to a table of which contains different packages, a foreign key to your user table and finally a column which indicates the expire date of the package.
If the package is not found for that user and for that expire date then the user is not allowed to send sms.
You can use some other storage procedures but using a database makes most sense.
Basically: You don't want to update anything, you simply want to store certain information like the expire date (and maybe the starting date if you want to change the expire duration) and compare to that selected value.

"Role Management" vs "User Management" in ASP.NET

Question No 1
I am familiar with role management, a particular member in a particular role can do this and access this functionally. What I need to do is Manage individual user, not the role he is in.
For example, lets say I create a role, called "Sales". I setup the role permission what the sales persons can do. Now i want to keep a check on individual user. For example if this is "john", i want to show him the records only he created. If his is peter, I want to show him only that records which he created, not by john or other sales people.
Is there a thing called "User Management" in ASP.NET that we can use? If not we have to create it ourselves and I believe the integration with ASP.NET "Role Management" will not be that smooth.
Question No 2.
I am using control for user login. I want to create a session at this time so I can keep track of which user is signed in so I can show him the records only pertaining to him. How can I do that?
Your Q1 isn't really about Role vs User management (ie: authorizations) at this point. It's about audit tracking within your application.
And the way you do that is you capture the ID of the user who created the record in question with the record, so that later you can filter on that ID.
Pseudo database structure
Table Sales
Field...
Field...
Field...
CreatedByUser int not null, -- Populate this on creation and never change it again
ModifiedByUser int not null - populate this on every row update including insert
See ASP.NET Profile Properties.
Assuming the records in the database correspond to a unique ID for a user, you can store the unique id in a profile property per user.
1) If you want to filter records by the creating user, you need to record in your table the ID of the user who created the record. You can access the name of current user through User.Identity.Name and their ID (provider-dependent) through User.ProviderUserKey.
2) Sessions are created automatically in ASP.NET and provided you have a properly configured MembershipProvider, you can retrieve all the needed user info using the User object as shown above.
It sounds like you are a little unfamiliar with ASP.NET Membership and Roles capabilities, because they are actually set up quite well to accomplish what you are describing. I would recommend checking out this tutorial series:
https://web.archive.org/web/20211020202857/http://www.4guysfromrolla.com/articles/120705-1.aspx
You are talking about Authentication and Authorization. For question 1 you and implement a custom authorization provider to allow for user level control http://msdn.microsoft.com/en-us/library/aa479048.aspx For question 2, once you log in and are Authenticated, the session contains a userprinciple object that has the info in it automatically.

Resources