How ADT message changes when final set of codes are added to a patient record? - hl7-v2

We receive ADT messages and want to know if all billing diagnosis and procedure codes are available in ADT. My understanding is when a patient is admitted ADT admit message will have diagnosis codes with diagnosis type 'A' ( Admitting) and then when the patient is discharged or even during patient stay, the codes will say diagnosis type as 'W'(Working). And then when final coding will take place after discharge, diagnosis type for all codes will change to 'F' (Final).
Is my understanding correct where we can know that ADT record has all final codes if type for all the codes reflect 'F' ?
Usually after a discharge (A03 ADT message), how many approx updates I might receive before billing starts to cross over and all codes are final ?
Thanks

Related

How to edit/save IBM watson assistant conditional slot values for context variables?

I am trying to create a chatbot for booking flight tickets in watson assistant. The problem is that I want to enable the slot of return_date only when the trip is a roundtrip. But on testing the bot the context variable of $return_date is not getting reflected where as the $start_date is getting updated with the value of sys-date entered when prompted for return_date.
pic 1
pic 2
Also when trying if the user enters "I want to book roundtrip tickets for 4 people in economy class" then the bot asks for the remaining slot values but does not invoke the slot asking for the return date even though the trip type is mentioned in the conversation.
pic 3
pic 4
pic 5
Please suggest whether the flow needs to be changed or changes in the JSON editor will solve this problem.

Kaltura Notifications are occationally deactivated?

We are using Kaltura to notify our CMS about changes in the videos. In the KMC under Settings->Integrations Settings we have checked all the checkboxes under "Sent by Server".
Some times these checkmarks disappear? IT happens maybe once a week or once a month. How can we find the reason to these boxes being deactivated?
Those notifications are being stored on the partner object in partner table. The actual data is stored in the custom_data field, which holds large amount of PHP-serialized data.
I can suspect cases that due to updates of other fields in the custom_data object, the notifications section will be erased.
Your best shot would be first check the value of that field when the config got erased. If it was actually erased in the database, try to find the following log messages in api_v3.log (which can lead you to the actual API request that modified the field):
[2124167851][propel] */ UPDATE partner SET
`UPDATED_AT`='2017-10-04 14:11:36',
`NOTIFY`='1',
`CUSTOM_DATA`='a:79:{s:9:"firstName";s:5:"Roman";s:12:"isFirstLogin";b:0;
... tons of PHP serialized data ...
i:1;s:19:"notificationsConfig";s:42:"*=0;1=1;2=1;3=1;4=0;21=0;6=0;7=0;26=0;5=0;";
... tons of PHP serialized data ...
}' WHERE partner.ID='101' AND MD5(cast(partner.CUSTOM_DATA as char character set latin1)) = '7eb7781cc04c7f98077efc2e3c1e9426'
The key that stores the notifications config is notificationsConfig (Each number represents the notification type, then 0 / 1 for off / no).
As a side note, which CE version are you using? There might be a more reliable way to integrate with your CMS.

How to get all message history from Hipchat for a room via the API?

I was using the Hipchat API (v2) a bit today and ran into an odd issue where I was not able to really pull up all of the history for a room. It seemed as though when I queried a specific date, for example, it would only retrieve a fraction of the history for that date given. I had had plans to simply iterate across all of the dates for a Room to extract the history in a format that I could use, but ended up hitting this and am now unsure if it is really possible to pull out the history fully.
I realize that this is a bit clunky. It is pulling the JSON as a string and then I have to form it into a hash so I know I'm not doing this as good as it could be done, but here is roughly what I quickly did just to test out the history method for the API:
api_token = "MY_TOKEN"
client = HipChat::Client.new(api_token, :api_version => 'v2')
history = client['ROOM_NAME'].history
history = JSON.parse(history)
history.each do |key, history|
if history.is_a? Array
history.each do |message|
if message.is_a? Hash
puts "#{message['from']['name']}: #{message['message']}"
end
end
end
end
Obviously then the extension to that was to just curse through the dates in the desired range (using: client['ROOM_NAME'].history(:date => '2010-11-19', :timezone => 'PST')), but again, I was only getting a fraction of the history for the room. Are there some additional parameters that I'm missing for this to make it work as expected?
I got this working but it was a big pain.
Start by sending a query with the current time, in UTC, but without including the time zone, as the start date:
https://internal-hipchat-server/v2/room/2/history?reverse=false&date=2015-06-25T20:42:18.658439&max-results=1000&auth_token=XXX
This is very fiddly:
If you specify just the current date, without a timezone, as documented in the API, it is interpreted as midnight last night and you only get messages from yesterday or older.
If you try specifying tomorrow’s date instead, the response is 400 Bad Request This day has not yet come to pass.
If you specify the time as 2015-06-25T20:42:18.658439+00:00, which is the format that times come in HipChat API responses, HipChat’s parser seems to fail and interpret it as midnight last night.
When you get the response back, take the oldest items.date property, strip the timezone, and resubmit the above URL with an updated date parameter:
https://internal-hipchat-server/v2/room/2/history?reverse=false&date=2015-06-17T19:56:34.533182&max-results=1000&auth_token=XXX
Be sure to include the microseconds, in case a notification posted multiple messages to the same room in the same second.
This will get you the next page of messages. Keep doing this until you get fewer than max-results messages back.
There is a start-index parameter I tried passing before I got the above working, and it will give you a few pages of results, with responses lacking a links.next property, but it won’t give you the full history. On a chatroom with 9166 messages in the history according to statistics.messages_sent, it only returned 3217 messages. So don’t use it. You can use statistics.messages_sent as a sanity check for whether you get all messages.
Oh yeah, and the last_active property in the /v2/room call cannot be trusted because it doesn’t update when notification messages are posted to the room.

reading EMV card using PPSE and not PSE

I'm trying to read the data off a contactless Visa Paywave card.
For the Paywave, I have to submit a SELECT using PPSE (2PAY.SYS.DDF01) instead of PSE (1PAY.SYS.DDF01).
The EMV book 1, section 11.3.4, table 43 only describes how to interpret the response for a successful SELECT command using PSE. Does anyone know or can refer me to a source that shows how to process the data returned from a successful SELECT command using PPSE?
Here's my request APDU:
00A404000e325041592e5359532e444446303100
Here's the response:
6F2F840E325041592E5359532E4444463031A51DBF0C1A61184F07A0000000031010500A564953412044454249548701019000
I understand tag 84, tag 85, tag BF0C from the response. According to the examples for reading PSE, I should be able to just send GET PROCESSION OPTIONS (to get the AIP and AFL) with PDOL = null after this successful response as follows: 80A80000830000.
But request 80A80000830000 returns error code 6985 - Command not allowed; conditions of use not satisfied.
I also tried reading all the files after successfully selecting the PPSE by traversing through every single SFI (0-30) and every single record (0-16) of each SFI. Yes, I also did the 3 bit shift and bitwise-OR the SFI with 0x4. But I got no data.
I'm stuck, any help that would point me into getting some info from my Paywave card would be appreciated!
Have you tried this tool from EMVLAB http://www.emvlab.org/emvtags/
Using that tool,
http://www.emvlab.org/tlvutils/?data=6F2F840E325041592E5359532E4444463031A51DBF0C1A61184F07A0000000031010500A564953412044454249548701019000
2PAY.SYS.DDF01 is for contactless (e.g. NFC ) cards, while 1PAY.SYS.DDF01 is for contact cards.
After successfully (SW1 SW2 = 90 00) reading a PSE, you should only search for the SFI (tag 88) which is a mandatory field in the FCI template returned.
With the SFI as your start index, your would have to read the records starting from the start index until you get a 6A83 (RECORD_NOT_FOUND). E.g. if your SFI is 1, you would do a readRecord with record_number=1. That would probably be successful. Then you increament record_number to 2 and do readRecord again. The increament to 3 .... Repeat it until you get 6A83 as your status.
The records read would be ADFs (at least 1). Then your would have to compare the read ADF Names with what your terminal support and also based on the ASI (Application Selection Indicator). At the end you would have a list of possible ADFs (Candidate list)
All the above steps (1-3) are documented in chapter 12.3.2 Book1 v4.3 of the EMV spec.
You would have to make a final selection (Chapter 12.4 Book1)
Read the spec book 1 chapter 12.3 - 12.4 for all the detailed steps.
You seem to have the flow mixed up a bit, you want to:
Send 1PAY or 2PAY, it doesn't actually matter for all of the cards I've tested. This will return a list of the AIDs available on the card. Alternately you can just select an AID straight away if you know it's there but good practice would be to check first.
Get the list of AIDs returned in response to 1PAY/2PAY, in PayWave's case this will probably be A0000000031010 if you sent 2PAY but you may get more if you send 1PAY.
Select one of the AIDs sent back (or one you already know is on there).
Then loop through the SFIs and records sending the Read Records command to get the data.
You don't have to send Get Processing Options before sending the Read Records command even though that's now a normal transaction flow goes.
I think the information you're looking for is available from this VISA website. But only if you're a registered and/or licensed partner of VISA.
EDIT: Looking at the resulting TLV struct under BF0C:
tag=0xBF0C, length=0x1A
tag=0x61, length=0x18
tag=0x4F, length=0x07, value=0xA0000000031010 // looks like an AID to me
tag=0x50, length=0x0A, value="VISA DEBIT"
tag=0x87, length=0x01, value=0x01
I would guess that you need to first select A0000000031010 before getting the processing options.
I was selecting application 2PAY.SYS.DDF01. when I should have been selecting AID = 0xA0000000031010. It looks like there's no records under application 2PAY.SYS.DDF01.
But there was 1 record under application 0xA0000000031010. After I got this application, I performed a READ RECORD, and the first record gave me the PAN and all the credit card info I wanted.
Thanks everyone for chiming in.

Accessing New messages from Yahoo Mail using YQL

I am currently writing a JAVA application in which I need to access the following information from users Yahoo email messages (to display back to them). YQL looked like a 'quick easy way' to do this, however it's proving to be more difficult. All tests I ran were done here: http://developer.yahoo.com/yql/console/ I can replicate the same results using my webapp/oauth.
To
FromEmail
FromName
Subject
Message
Date
MID
I am having trouble getting this all in to 1 query call (or even 2, although I have not invested as much time researching that as a solution). Here is the short of it, currently I have the following YQL:
SELECT folder.unread, message FROM ymail.msgcontent
WHERE (fid,mids )
IN
(SELECT folder.folderInfo.fid, mid
FROM ymail.messages
WHERE numMid=2
AND startMid=0)
AND fid='Inbox'
AND message.flags.isRead=0;
This works the best out of all the solutions I have, however there is one major crippling flaw. If we have 10 emails, E1 - E10 and they are all unread with the exception of E2,E3 then after running that query, the result set will show E1, not E1, E4. Obviously this is not good. So I tried plugging the "AND message.flags.isRead=0" in the sub select:
SELECT folder.unread, message FROM ymail.msgcontent
WHERE (fid,mids )
IN
(SELECT folder.folderInfo.fid, mid
FROM ymail.messages
WHERE numMid=10
AND startMid=0
AND message.flags.isRead=0)
AND fid='Inbox'
However, this Yields 'null' as a result. In order to debug this I just run the sub select and come up with this:
SELECT folder.folderInfo.fid, mid
FROM ymail.messages
WHERE numMid=10
AND startMid=0
AND messageInfo.flags.isRead=0
This query returns 10, unfortunately after further review, it does not filter out the read VS unread. After some more toying around I change the select statement to the following query:
SELECT folder.folderInfo.fid, messageInfo.mid
FROM ymail.messages
WHERE numMid=10
AND startMid=0
AND messageInfo.flags.isRead=0
Finally, this works! EXCEPT 47 emails are returned instead of just 10. and to make things more interesting, I know for a fact I have 207 (unread) emails in my inbox, so why 47?? I have changed the 'numMid' (think of this as how many to show) from 0 - 300 and startMid (how many emails in to start, like an offset) from 0 - 300 and neither change the result set count. Of course when i change the select statement back from 'messageInfo.mid' to 'mid' the numMid / startMid 'work' again, however the filtering fromt he isRead no longer works. I know there are other solutions where I set numMid=50000 or something along those lines, however YQL is a bit slow to begin with, and I can only imagine that this will slow it down significantly.
So the question is, has any one done this? Is YQL just broke / not maintained or am I doing something wrong?
Thank you!
EDIT: Apparently this '47' that shows up is from the top 50 emails I have, 3 of which are read. I have yet to figure out how to 'trick' the YQL to allow me to override this 50 limit.
Bit late but I think I have the answer to your question.
Your query is query is almost correct except for the numInfo query parameter. Try changing the query to
SELECT *
FROM ymail.messages
WHERE numMid=75
AND startMid=0 AND numInfo=75
AND messageInfo.flags.isRead=0
Notice the numInfo=75. This should get you the last 75 unread messages. To read more about different query parameters refer to official documentation here
EDIT 1
The table ymail.messages should return unread messages by default. There is a GroupBy parameter which you should use if you want to get unread messages. Find documentation here

Resources