Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Concept maps to multiple entites regardless of the value #258

Open
radaniba opened this issue May 19, 2021 · 2 comments
Open

[BUG] Concept maps to multiple entites regardless of the value #258

radaniba opened this issue May 19, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@radaniba
Copy link

Hi there

I am using the latest version of DHCCE

While playing with the mapping of a concept I noticed that behaviour

image

Basically a concept should be mapping to one entity based on the status of this entity (complete / incomplete ) so the status cannot be 2 at the same time

That said, when I did this (this is equivalent to the hr360 example where the concept was discussed/explained) I found that my concept maps to some entities the wrong way, sometime to the same entity twice, which is not correct

I am attaching an example image for this case, the entity with a red circle, can either be complete or not, yet both concpets map into it

Thanks

@radaniba radaniba added the bug Something isn't working label May 19, 2021
@wpaven
Copy link
Contributor

wpaven commented May 19, 2021

Thanks @radaniba If you have a sample model and data/flow you can share so we can recreate the problem locally that would be very helpful.

@radaniba
Copy link
Author

Sure @wpaven

Here are two entities :

{
  "info" : {
    "title" : "Visit",
    "version" : "0.0.1",
    "baseUri" : "http://example.org/",
    "description" : "An entity describing every single visit or timepoints for the Participants"
  },
  "definitions" : {
    "Visit" : {
      "primaryKey" : "visitID",
      "required" : [ ],
      "pii" : [ ],
      "elementRangeIndex" : [ ],
      "rangeIndex" : [ ],
      "wordLexicon" : [ ],
      "properties" : {
        "visitID" : {
          "datatype" : "string",
          "collation" : "http://marklogic.com/collation/codepoint"
        },
        "visit_date" : {
          "datatype" : "string",
          "collation" : "http://marklogic.com/collation/codepoint"
        },
        "visit_status" : {
          "datatype" : "string",
          "collation" : "http://marklogic.com/collation/codepoint"
        },
        "visit_participant" : {
          "datatype" : "string",
          "collation" : "http://marklogic.com/collation/codepoint"
        },
        "visit_purpose" : {
          "datatype" : "string",
          "collation" : "http://marklogic.com/collation/codepoint"
        },
        "visit_category" : {
          "datatype" : "string",
          "collation" : "http://marklogic.com/collation/codepoint"
        },
        "visit_class" : {
          "datatype" : "string",
          "collation" : "http://marklogic.com/collation/codepoint"
        },
        "visit_name" : {
          "datatype" : "string",
          "collation" : "http://marklogic.com/collation/codepoint"
        },
        "can_be_done_over" : {
          "datatype" : "array",
          "items" : {
            "$ref" : "http://marklogic.envision.com/Time_Point-0.0.1/Time_Point"
          }
        }
      }
    }
  }
}

and

{
  "info" : {
    "title" : "Questionnaire",
    "version" : "0.0.1",
    "baseUri" : "http://marklogic.envision.com/"
  },
  "definitions" : {
    "Questionnaire" : {
      "primaryKey" : "questionnaire_id",
      "required" : [ ],
      "pii" : [ ],
      "elementRangeIndex" : [ ],
      "rangeIndex" : [ ],
      "wordLexicon" : [ ],
      "properties" : {
        "questionnaire_id" : {
          "datatype" : "string",
          "collation" : "http://marklogic.com/collation/codepoint"
        },
        "questionnaire_timepoint" : {
          "datatype" : "string",
          "collation" : "http://marklogic.com/collation/codepoint"
        },
        "questionnaire_participant_id" : {
          "datatype" : "string",
          "collation" : "http://marklogic.com/collation/codepoint"
        },
        "questionnaire_participant_project_id" : {
          "datatype" : "string",
          "collation" : "http://marklogic.com/collation/codepoint"
        },
        "questionnaire_status" : {
          "datatype" : "string",
          "collation" : "http://marklogic.com/collation/codepoint"
        },
        "questionnaire_name" : {
          "datatype" : "string",
          "collation" : "http://marklogic.com/collation/codepoint"
        }
      }
    }
  }
}

I am trying to create a concept called Status on questionnaire_status and visit_status

The values that can go to these are "Complete" , "Incomplete" and "Unknown"

I hope this helps

Rad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants