-
Notifications
You must be signed in to change notification settings - Fork 16
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
Icf cpheapm71 72 add guidelines #1118
Open
ZindahFarhaICF
wants to merge
3
commits into
main
Choose a base branch
from
ICF-cpheapm71_72-add-guidelines
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
hawc/apps/animal/migrations/0032_experiment_guideline_profile.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 5.1.1 on 2024-10-11 13:26 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("animal", "0031_tre"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="experiment", | ||
name="guideline_profile", | ||
field=models.CharField(blank=True, max_length=128, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
[ | ||
{ | ||
"guideline_id": "1", | ||
"guideline_number": "870.31", | ||
"guideline_name": "90-day Oral Toxicity in Rodents", | ||
"profile_name": "SUB_oral_rode", | ||
"description": "" | ||
}, | ||
{ | ||
"guideline_id": "2", | ||
"guideline_number": "870.315", | ||
"guideline_name": "90-day Oral Toxicity in Nonrodents", | ||
"profile_name": "SUB_oral_nonr", | ||
"description": "" | ||
}, | ||
{ | ||
"guideline_id": "3", | ||
"guideline_number": "870.325", | ||
"guideline_name": "90-day Dermal Toxicity", | ||
"profile_name": "SUB_sub_derm", | ||
"description": "" | ||
}, | ||
{ | ||
"guideline_id": "4", | ||
"guideline_number": "870.3465", | ||
"guideline_name": "90-Day Inhalation Toxicity", | ||
"profile_name": "SUB_sub_inha", | ||
"description": "" | ||
}, | ||
{ | ||
"guideline_id": "5", | ||
"guideline_number": "870.355", | ||
"guideline_name": "Reproduction/Development Toxicity Screening Test", | ||
"profile_name": "REP_rep_dev", | ||
"description": "" | ||
}, | ||
{ | ||
"guideline_id": "6", | ||
"guideline_number": "870.37", | ||
"guideline_name": "Prenatal Developmental Toxicity Study", | ||
"profile_name": "DEV_pren_dev", | ||
"description": "" | ||
}, | ||
{ | ||
"guideline_id": "7", | ||
"guideline_number": "870.38", | ||
"guideline_name": "Reproduction and Fertility Effects post 1998", | ||
"profile_name": "MGR_rep_fert", | ||
"description": "MGR studies post 1998 (study_year 1996)" | ||
}, | ||
{ | ||
"guideline_id": "8", | ||
"guideline_number": "870.41", | ||
"guideline_name": "Chronic Toxicity", | ||
"profile_name": "CHR_chr_tox", | ||
"description": "" | ||
}, | ||
{ | ||
"guideline_id": "9", | ||
"guideline_number": "870.42", | ||
"guideline_name": "Carcinogenicty", | ||
"profile_name": "CHR_carc", | ||
"description": "" | ||
}, | ||
{ | ||
"guideline_id": "10", | ||
"guideline_number": "870.43", | ||
"guideline_name": "Combined Chronic Toxicity/Carcinogenicity", | ||
"profile_name": "CHR_chr_canc", | ||
"description": "" | ||
}, | ||
{ | ||
"guideline_id": "11", | ||
"guideline_number": "870.62", | ||
"guideline_name": "Neurotoxicity Screening Battery", | ||
"profile_name": "NEU_neur_bat", | ||
"description": "" | ||
}, | ||
{ | ||
"guideline_id": "12", | ||
"guideline_number": "870.63", | ||
"guideline_name": "Developmental Neurotoxicity Study", | ||
"profile_name": "DNT_dev_neur", | ||
"description": "" | ||
}, | ||
{ | ||
"guideline_id": "13", | ||
"guideline_number": "870.38", | ||
"guideline_name": "Reproduction and Fertility Effects pre 1998", | ||
"profile_name": "MGR_rep_fert_pre98", | ||
"description": "MGR studies pre 1998 (study year 1996)" | ||
}, | ||
{ | ||
"guideline_id": "14", | ||
"guideline_number": "870.305", | ||
"guideline_name": "28-day Oral Toxicity in Rodents", | ||
"profile_name": "SAC_oral_rode_28", | ||
"description": "" | ||
}, | ||
{ | ||
"guideline_id": "15", | ||
"guideline_number": "NULL", | ||
"guideline_name": "14-day Toxicity in Rodents", | ||
"profile_name": "SAC_ntp", | ||
"description": "" | ||
}, | ||
{ | ||
"guideline_id": "16", | ||
"guideline_number": "NULL", | ||
"guideline_name": "13-Week Toxicity in Rodents", | ||
"profile_name": "SUB_ntp", | ||
"description": "" | ||
}, | ||
{ | ||
"guideline_id": "17", | ||
"guideline_number": "NULL", | ||
"guideline_name": "2 - Year Toxicity", | ||
"profile_name": "CHR_ntp", | ||
"description": "" | ||
}, | ||
{ | ||
"guideline_id": "18", | ||
"guideline_number": "NULL", | ||
"guideline_name": "Non-guideline", | ||
"profile_name": "NON-GUIDE", | ||
"description": "" | ||
} | ||
] |
24 changes: 24 additions & 0 deletions
24
hawc/apps/vocab/migrations/00010_load_guideline_profile.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from pathlib import Path | ||
|
||
from django.core.management import call_command | ||
from django.db import migrations | ||
|
||
|
||
def load_fixture(apps, schema_editor): | ||
here = Path(__file__).parent | ||
fixtures = (here / "../fixtures").resolve() | ||
call_command("loaddata", str(fixtures / "guideline_profile.jsonl"), app_label="vocab") | ||
|
||
|
||
def unload_fixture(apps, schema_editor): | ||
apps.get_model("vocab", "GuidelineProfile").objects.all().delete() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("vocab", "0009_guideline_profile"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(load_fixture, reverse_code=unload_fixture), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Generated by Django 5.1.1 on 2024-10-11 14:36 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("vocab", "0008_alter_term_namespace"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="GuidelineProfile", | ||
fields=[ | ||
( | ||
"guideline_profile_id", | ||
models.PositiveIntegerField( | ||
primary_key=True, serialize=False, unique=True, verbose_name="ID" | ||
), | ||
), | ||
("guideline_id", models.PositiveIntegerField()), | ||
( | ||
"endpoint", | ||
models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="vocab.term", | ||
), | ||
), | ||
("endpoint_category", models.CharField(max_length=256)), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Guideline_profile_id is the primary key, and I kept the 3 vocab name fields that make up the endpoint. If they were mainly for my benefit to load in the vocab ids, I can remove them! |
||
("endpoint_type", models.CharField(max_length=256)), | ||
("endpoint_target", models.CharField(max_length=256)), | ||
( | ||
"obs_status", | ||
models.CharField( | ||
choices=[ | ||
("NM", "NM"), | ||
("not required", "not required"), | ||
("recommended", "recommended"), | ||
("required", "required"), | ||
("triggered", "triggered"), | ||
], | ||
null=True, | ||
), | ||
), | ||
("description", models.TextField(blank=True)), | ||
], | ||
options={ | ||
"ordering": ("guideline_profile_id",), | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added type checking for GuidelineProfile observation status, can be changed/removed as needed