Correct ontological relationship between "start" and "end" - time

I've been cataloguing usage of some common ontology properties in OWL, RDFS, DCMI Terms, SKOS, etc. A question was brought up about how to relate start/end properties to one another (such as "start time" and "end time". Schema.org and OWL-Time do not relate these to one another and Wikidata uses "complementary property" to relate them.
My understanding is that "start time" and "end time" are not true complements to one another, as true complements would be something like "meats" and "non-meats" (for use of the property owl:complementOf, for instance).
After looking around at other ontologies, I can't seem to find one which relates start/end times to one another. Is there an ontology that does so? What is the relationship they have to one another ontologically?

Some properties of the cidoc-crm ontology have build-in properties related to start and end of envents.
It's simple and flat: all the cases have a specific property.
These properties are:
P173 starts before or with the end of
P174 starts before the end of
P175 starts before or with the start of
P176 starts before the start of
P182 ends before or with the start of
P183 ends before the start of
P184 ends before or with the end of
P185 ends before the end of
example
You'll find doc about them here: https://cidoc-crm.org/html/cidoc_crm_v7.1.2.html#P173

Related

How to execute search for FHIR patient with multiple given names?

We've implemented the $match operation for patient that takes FHIR parameters with the search criteria. How should this search work when the patient resource in the parameters contains multiple given names? We don't see anything in FHIR that speaks to this. Our best guess is that we treat it as an OR when trying to match on given names in our system.
We do see that composite parameters can be used in the query string as AND or OR, but not sure how this equates when using the $match operation.
$match is intrinsically a 'fuzzy' search. Different servers will implement it differently. Many will allow for alternate spellings, common short names (e.g. 'Dick' for 'Richard'), etc. They may also allow for transposition of month and day and all sorts of similar data entry errors. The 'closeness' of the match is reflected in the score the match is given. It's entirely possible get back a match candidate that doesn't match any of the given names exactly if the score on other elements is high enough.
So technically, I think SEARCH works this way:
AND
/Patient?givenname=John&givenname=Jacob&givenname=Jingerheimer
The above is an AND clause. There is (can be) a person named with multiple given names "John", "Jacob", "Jingerheimer".
Now I realize SEARCH and MATCH are 2 different operations.
But they are loosely related.
But Patient-Matching is an "art". Be careful, a "false positive" (with a high "score") is/could-be a very big deal.
But as mentioned from Lloyd....you have a little more flexibility with your implementation of $match.
I have worked on 2 different "teams".
One team, we never let "out the door" anything that was below a 80% match-score. (How you determine a match-score is a deeper discussion).
Another team, we made $match work with a "IF you give me enough information to find a SINGLE match, I'll give it to you" .. but if not, tell people "not enough info to match a single".
Patient Matching is HARD. Do not let anyone tell you different.
at HIMSS and other events..when people show a demo of moving data, I always ask "how did you match this single person on this side.....as it is that person on the other side?"
As in "without patient matching...alot of work-flows fall a part at the get go"
Side note, I actually reported a bug with the MS-FHIR-Server (which the team fixed very quickly) (for SEARCH) here:
https://github.com/microsoft/fhir-server/issues/760
"name": [
{
"use": "official",
"family": "Kirk",
"given": [
"James",
"Tiberious"
]
},
Sidenote:
The Hapi-Fhir object to represent this is "ca.uhn.fhir.rest.param.TokenAndListParam"
Sidenote:
There is a feature request for Patient Match on the Ms-Fhir-Server github page:
https://github.com/microsoft/fhir-server/issues/943

How to load value from dynamically specified parameter in NiFi

I have several processes with almost same flow like "Get some parameters, extract data from database according to them and upload them to target". The parameters vary slightly across processes as well as targets but only a bit. Most of the process is the same. I would like to extract those differences to parameter-context and dynamically load them. My idea is to have parameters defined following way and then using them.
So core of question is:
How to dynamically choose which parameter group load and use?
Having several parameter contexts with same-named/different-valued parameters and dynamically switching them would be probably the best, but it is not possible as far as I know.
Also duplicating flows is out-of-the-table. Any error correction would be spread out over several places and maintenance would be a nightmare.
Moreover, I know I can do it like "In GenetrateFlowFile for process A set value1=#{A_value1} and in GenetrateFlowFile for process B set value1=#{B_value1}. But this is tedious, error-prone and scales kinda bad. Not speaking of situation when I can have dozens of parameters and several processes. Also it is a kind of hardcoding, not configuring...
I was hoping for something like defining group=A and then using it like value1=#{ ${ group:append('_value1') } } but this does not work - it is evaluated as parameter literally named ${ group:append('_value1') }.
TL;DR: Use evaluateELString().
The actual solution is to set in GenetrateFlowFile processor group=A and in next UpdateAttribute processor set the following:
value1=${ group:prepend('hash{ '):append('_value1 }'):replace('hash', '#'):evaluateELString() }
The magic being done here is "Take value of group slap around it #{ and _value1 } to make it valid NiFi Expression Language statement and then evaluate it." (Notice - the word hash and function replace is there since I didn´t manage to escape the # char right before {.)
If you would like to have your value1 at the beginning of the statement then you can use following code. The result is same, it is easier to use (often-changed value value1 is at the beginning of the statement) and is less readable "what is really going on?"-wise.
value1=${ literal('value1'):prepend('_'):prepend(${ group }):prepend('hash{ '):append(' }'):replace('hash', '#'):evaluateELString() }

Intelligent addition of words to make a question from the statement

I have 5000 videos and I want to add words in front of it, to make a question out of the title.
For eg. Video title is
1. 'Historian era' I want a question out of it - What is Historian era
2. 'Solve using Quadratic Equation' - 'How to solve using quadratic equation'
My bet:
I would analyze the first word of the title.
If it is a verb, then add 'How to ' in front of it, for example.
For knowing what the first word actually is, I would check them against an API, such as: https://developer.oxforddictionaries.com/
Then you can act accordingly.

Need an algorithm that detects diffs between two files for additions and reorders

I am trying to figure out if there are existing algorithms that can detect changes between two files in terms of additions but also reorders. I have an example below:
1 - User1 commit
processes = 1
a = 0
allactive = []
2 - User2 commit
processes = 2
a = 0
allrecords = range(10)
allactive = []
3 - User3 commit
a = 0
allrecords = range(10)
allactive = []
processes = 2
I need to be able to say that for example user1 code is the three initial lines of code, user 2 added the "allrecords = range(10)" part (as well as a number change), and user 3 did not change anything since he/she just reordered the code.
Ideally, at commit 3, I want to be able to look at the code and say that from character 0 to 20 (this is user1's code), 21-25 user2's code, 26-30 user1's code etc.
I know there are two popular algorithms, Longest common subsequence and longest common substring but I am not sure which one can correctly count additions of new code but be able also to identify reorders.
Of course this still leaves out the question of having the same substring existing twice in a text. Are there any other algorithms that are better suited to this problem?
Each "diff" algorithm defines a set of possible code-change edit types, and then (typically) tries to find the smallest set of such changes that explains how the new file resulted from the old. Usually such algorithms are defined purely syntactically; semantics are not taken into account.
So what you want, based on your example, is an algorithm that allow "change line", "insert line", "move line" (and presumably "delete line" [not in your example but necessary for a practical set of edits]). Given this you ought to be able to define a dynamic programming algorithm to find a smallest set of edits to explain how one file differs from another. Note that this set is defined in terms of edits to whole-lines, rather like classical "diff"; of course classical diff does not have "change line" or "move line" which is why you are looking for something else.
You could pick different types of deltas. Your example explicitly noted "number change"; if narrowly interpreted, this is NOT an edit on lines, but rather within lines. Once you start to allow partial line edits, you need to define how much of a partial line edit is allowed ("unit of change"). (Will your edit set allow "change of digit"?)
Our Smart Differencer family of tools defines the set of edits over well-defined sub-phrases of the targeted language; we use formal language grammar (non)terminals as the unit of change. [This makes each member of the family specific to the grammar of some language] Deltas include programmer-centric concepts such as "replace phrase by phrase", "delete listmember", "move listmember", "copy listmember", "rename identifier"; the algorithm operates by computing a minimal tree difference in terms of these operations. To do this, the SmartDifferencer needs (and has) a full parser (producing ASTs) for the language.
You didn't identify the language for your example. But in general, for a language looking like that, the SmartDifferencer would typically report that User2 commit changes were:
Replaced (numeric literal) "1" in line 1 column 13 by "2"
Inserted (statement) "allrecords = range(10)" after line 2
and that User3 commit changes were:
Move (statement) at line 1 after line 4
If you know who contributed the original code, with the edits you can straightforwardly determine who contributed which part of the final answer. You have to decide the unit-of-reporting; e.g., if you want report such contributions on a line by line basis for easy readability, or if you really want to track that Mary wrote the code, but Joe modified the number.
To detect that User3's change is semantically null can't be done with purely syntax-driven diff tool of any kind. To do this, the tool has to be able to compute the syntactic deltas somehow, and then compute the side effects of all statements (well, "phrases"), requiring a full static analyzer of the language to interpret the deltas to see if they have such null effects. Such a static analyzer requires a parser anyway so it makes sense to do a tree based differencer, but it also requires a lot more than just parser [We have such language front ends and have considered building such tools, but haven't gotten there yet].
Bottom line: there is no simple algorithm for determining "that user3 did not change anything". There is reasonable hope that such tools can be built.

What are all of the possible Class Names in QTP or where can I find them?

I'm using QTP 11 and I could use a handy reference for all of the possible values for "Class Name". I'm not trying to manipulate this information. I just need a reference.
For example I know that I can access any input element using "WebEdit()" but what do I use for, say, a table cell.
I want a list I can refer to, not steps for finding the type of an object.
Three options come to mind immediately:
Option A. The handiest way to find the names probably is to look into the dialog Tools/Object Identification.
There, in the "Test Object classes" listview, you see all test object class names for the environment selected under "Environment" that QTP knows of.
Option B. If in the dialog from A. you push the "Generate script" button, creating a script. Use a grep facility (or TextPad, for that matter) to extract all lines containing the text "Object identification configuration for" from that script. This results in a text which after some cleanup is these lists:
User-defined (?):
"abtobjectgraphicswidget"
"cwarrowbutton"
"cwcheckbutton"
"cwlabel"
"cwpushbutton"
"cwradiobutton"
"cwtext"
"cwtext_multi"
"ewflowediconlist"
"ewiconarea"
"ewiconlist"
"ewicontree"
"ewpmnotebook"
"ewspinbutton"
"ewtablelist"
"ewtabletree"
"ewwinnotebook"
"gxcombobox"
"gxedit"
"gxlistbox"
"listview20wndclass"
"listviewwndclass"
"msvb_lib_toolbar"
"richedit"
"seccustomtoolbar"
"secmenubar"
"sectabctrl"
"sectabwnd"
"sectreectrl"
"sectreeview"
"stgrid"
"sysdatetimepick32"
"sysmonthcal32"
"textedit"
"treeview20wndclass"
"treeviewwndclass"
Standard (?):
"activex"
"acxbutton"
"acxcalendar"
"acxcheckbox"
"acxcombobox"
"acxedit"
"acxradiobutton"
"acxtable"
"javaapplet"
"javabutton"
"javacalendar"
"javacheckbox"
"javadialog"
"javaedit"
"javaexpandbar"
"javainternalframe"
"javalink"
"javalist"
"javamenu"
"javaobject"
"javaradiobutton"
"javaslider"
"javaspin"
"javastatictext"
"javatab"
"javatable"
"javatoolbar"
"javatree"
"javawindow"
"dialog"
"static"
"winbutton"
"wincalendar"
"wincheckbox"
"wincombobox"
"window"
"winedit"
"wineditor"
"winlist"
"winlistview"
"winmenu"
"winobject"
"winradiobutton"
"winradiogroup"
"winscrollbar"
"winspin"
"winstatusbar"
"wintab"
"wintable"
"wintoolbar"
"wintreeview"
"browser"
"frame"
"image"
"link"
"page"
"viewlink"
"webarea"
"webbutton"
"webcheckbox"
"webedit"
"webelement"
"webfile"
"weblist"
"webradiogroup"
"webtable"
Note 1: the user-defined objects are probably add-on specific, or otherwise registered in a special way in QTP.
Note 2: this is just a sample of what you might get on your machine. For example, I don´t have the Delphi add-on active, so all the Delphi control´s test object class names are missing. If you want me to activate all add-ons, and re-create this list, I´ll give you my bank account first ;)
Option C. In the online help, from the contents, try navigating to the "HP QuickTest Professional Object Model Reference". It contains chapters per environment, and most of them consist of "X Object" chapters, i.e. there is a "WebButton Object" chapter under "Web".
Option D. See Rich's answer :-O
Since micclass is the same thing as the Class Name property (other than programming placement), the class names of the objects that you are trying to apply to micclass can be utilized. To find the class names of all objects used in the QTP environment, you can use the Mercury.ObjectRepositoryUtil to iterate through the objects and collect what's necessary for the micclass.
More details on that -> Here and Here

Resources