initial commit using functions to read BP+ XML files #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extract the code from bpp_Res2.m which reads the BP+ XML into functions, one for each the xml formats: 'CardioScope' and 'BPplus'. Comment out logic that truncated array data by removing leading NaN to maintain integrity of start of beat indexes.
This initial version runs with a sample CardioScope file and BPplus file. Limited checking of values being correct.
Note BP+ xml data includes 2 or 3 rhythm strips which by default are 10s duration.
ss : measured suprasystolic cuff rhythm (not in CardioScope xml, but included in BPplus xml)
ba : estimated intra-arterial brachial rhythm (ba shape is different to ss)
ao : estimated intra-arterial central aortic (in BPplus xml, these values prefixed with 'c' rather than 'ao')
The xml has average pulses for ss and ao rhythms, but not ba..
I think it becomes confusing to create an array ba_p_av from the ss rhythm data. Probably should be called ss_p_av.
I think ultimately ba_p_av should be reserved for average of ba_p_all if that is ever calculated.
Note the new BPplus xml has many values not previously available in CardioScope xml. Given it is easy for me to reprocess CardioScope to BPplus xml, it would be better to do that than spend lots of effort recalculating values that are incorrect or missing from the CardioScope xml.
selected beats data is always going to be missing from CardioScope data.
sBaseLined is also missing.
AIx (called cAIx)
AP (called cAP)
SEVR (called cSEVR)
Do you still have CardioScope devices in active use in studies?
How do you want to deal with values calculated by the matlab that are now also available from 'research' BP+ xml?
One suggestion might be to have the function that returns BP+ data return all the values under a device parent? Then device.ss.p_av would be the ss.p_av from BP+ and the repo could choose to calculate it's one ss.p_av?
Please try out this code and let me know if there are any questions or errors I should fix.
There are still TODO or FIXME comments that need attention. I wanted to get you an initial version as you are working on the code too.