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

_shema in filenames #7

Open
yibeichan opened this issue Jun 13, 2024 · 9 comments
Open

_shema in filenames #7

yibeichan opened this issue Jun 13, 2024 · 9 comments

Comments

@yibeichan
Copy link
Contributor

yibeichan commented Jun 13, 2024

@ibevers hi, I think we should put _schema at the end of the file name,
can you change the filename in the following places?
for example, instead of using _schema_first_19, we should use _first_19_schema. You'll need to change it in the library too.

"isAbout": "activity_path:dsm_5_parent_guardian_rated_level_1_crosscutting_s/dsm_5_parent_guardian_rated_level_1_crosscutting_s_schema_first_19",
"variableName": "dsm_5_parent_guardian_rated_level_1_crosscutting_s_schema_first_19",
"prefLabel": {
"en": "DSM5 Parent first 19"
},
"isVis": "Number(demo_schema_interview_age) > 12*6 && Number(demo_schema_interview_age) < 12*18"
},
{
"isAbout": "activity_path:dsm_5_parent_guardian_rated_level_1_crosscutting_s/dsm_5_parent_guardian_rated_level_1_crosscutting_s_schema_20_to_25",

and

"activity_path:dsm_5_parent_guardian_rated_level_1_crosscutting_s/dsm_5_parent_guardian_rated_level_1_crosscutting_s_schema_first_19",
"activity_path:dsm_5_parent_guardian_rated_level_1_crosscutting_s/dsm_5_parent_guardian_rated_level_1_crosscutting_s_schema_20_to_25",

@satra quick question for variableName, do we always keep _schema in the end to be consistent with the filename in isAbout or can we get rid of _schema but only have "DSM5_crosscutting_adult"? I have some vague memory that if we remove _schema from variableName we'll probably fail the validation.

"isAbout": "activity_path:DSM-5_A/DSM5_crosscutting_adult_schema",
"variableName": "DSM5_crosscutting_adult_schema",

@satra
Copy link
Contributor

satra commented Jun 14, 2024

variable names can be anything. so it doesn't need to have the _schema at the end. also, i can't remember any longer why every addproperties has a variablename, especially if the response from that schema is not used anywhere.

@yibeichan
Copy link
Contributor Author

ah, that's a good point, @djarecka you can remove _schema if it makes things easier. Also, I couldn't find how variableName was used in UI, I mean I searched it in UI but don't think I understand how it's used.

@satra
Copy link
Contributor

satra commented Jun 14, 2024

Also, I couldn't find how variableName was used in UI, I mean I searched it in UI but don't think I understand how it's used.

you can see how the variable name for demo_schema is being used in isVis - that's all controlled by the UI (and the PR i merged to add scoped variables for calculation).

@yibeichan
Copy link
Contributor Author

i see, it's used in isVis. i am not sure about the relationship between variableName and isAbout, like whether variableName has to be the same as the second part of isAbout (split by "/" or ":")

@satra
Copy link
Contributor

satra commented Jun 14, 2024

isAbout expands to a url if you load it in jsonld viewer, it's not a string. it's the actual pointer to the schema for activity/item. variablename is an alphanumericstring. one points to content, the other is simply a string that gets evaluated to represent a scope or an actual value.

@yibeichan
Copy link
Contributor Author

okay, got it, so variableName is a representation of the value in isAbout, then they don't have to be the same

@djarecka
Copy link
Member

Ok, I understand that variableName doesn't have to be a name of the file.

But also want to point that variableName is important for the compute items. Since in compute there is no isAbout, e.g., here, variableName in addProperties is the only place where I can match variableName from compute to get path

@yibeichan
Copy link
Contributor Author

yes, phq9_total_score is in addProperties, where isAbout exists, so as long as we keep the same variable name consistent, should it be okay to identify which is which?

@djarecka
Copy link
Member

yes, phq9_total_score is in addProperties, where isAbout exists, so as long as we keep the same variable name consistent, should it be okay to identify which is which?

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants