diff --git a/microsetta_private_api/LEGACY/locale_data/__init__.py b/microsetta_private_api/LEGACY/locale_data/__init__.py index c78f317f1..c22042984 100644 --- a/microsetta_private_api/LEGACY/locale_data/__init__.py +++ b/microsetta_private_api/LEGACY/locale_data/__init__.py @@ -11,7 +11,7 @@ available_locales = set([ - 'american_gut', 'british_gut', 'spanish_gut']) + 'american_gut', 'british_gut', 'spanish_gut', 'spain_spanish_gut']) media_locale = { diff --git a/microsetta_private_api/LEGACY/locale_data/english_gut.py b/microsetta_private_api/LEGACY/locale_data/english_gut.py index a68d483f3..8f435af42 100644 --- a/microsetta_private_api/LEGACY/locale_data/english_gut.py +++ b/microsetta_private_api/LEGACY/locale_data/english_gut.py @@ -123,675 +123,452 @@ 'AGE_13_17': '13-17 years', 'AGE_18': '18+ years', 'ASSENT_7_12': ''' -
University of California, San Diego -Assent to Act as a Research Subject -(Ages 7-12 years) -Gut project
- -Dr. Rob Knight and his research team are doing a research study to find out more about the -trillions of tiny living things likes bacteria that live in you or on you. You are being asked if you -want to be in this study because you are different (in a good way) from everybody else and they -are different from each other. We may be able to tell if you have been infected with something -(like the virus that causes COVID-19) but we can’t tell you that because we are not allowed to do -that.
- -If you decide you want to be in this research study, this is what will happen to you: -We will ask you or your mom or dad to sample some place on your body (like skin or mouth) or -your poop (from toilet paper) with something that looks like 2 Q-tips. Sometimes we want more -poop and then we will ask you to poop into a plastic bowl that is under the seat of the toilet and -catches the poop as it comes out. Your mom or dad will send it to us in the bowl. We may ask -your mom or dad to prick your finger so that we can get a little bit of your blood.
- -Sometimes kids don’t feel good while being in this study. You might feel a little bit sore where -your skin is rubbed with the Q-tip and you will feel it when they prick your finger to get blood. -Most people don’t mind these feelings.
- -If you feel any of these things, or other things, be sure to tell your mom or dad.
- -You don’t have to be in this research study if you don’t want to. Nobody will be mad at you if -you say no. Even if you say yes now and change your mind after you start doing this study, you -can stop and no one will be mad.
- -Be sure to ask your parents if you have questions. If they don’t explain it well you can call -Dominic Nguyen for more explanation. His telephone number is: 858-534-8739. There is also a -web site on the internet that can explain things – http://www.americangut.org.
''', +University of California, San Diego
+ Assent to Act as a Research Subject
+ (Ages 7-12 years)
The Microsetta Initiative (a study about microbes)
++ Dr. Rob Knight and his research team are doing a research study to find out more about the trillions of tiny living things like bacteria and viruses that live in you or on you. These tiny things are called microbes, and you are being asked if you want to be in this study because the kinds of microbes you have is unique - not the same as anyone else on earth. We may be able to tell if you have been infected with something (like the virus that causes COVID-19) but we can’t tell you that because we are not allowed to do that. +
+
+ If you decide you want to be in this research study, this is what will happen to you:
+ We will ask you or your mom or dad to sample some place on your body (like skin or mouth) or your poop (from toilet paper) with something that looks like 2 Q-tips. Sometimes we need more poop for our research and then we will ask you to poop into a plastic bowl that is under the seat of the toilet and catches the poop as it comes out. Your mom or dad will send it to us in the bowl. We may also ask your mom or dad to prick your finger so that we can get a little bit of your blood.
+
+ Sometimes kids don’t feel good while being in this study. You might feel a little bit sore where your skin is rubbed with the Q-tip and you will feel it if they prick your finger to get blood. Most people don’t mind these feelings. +
++ If you feel any of these things, or other things, be sure to tell your mom or dad. +
++ You don’t have to be in this research study if you don’t want to. Nobody will be mad at you if you say no. Even if you say yes now and change your mind after you start doing this study, you can stop and no one will be mad. +
++ Be sure to ask your parents if you have questions. You can also ask them to call Dr. Knight or his research team so they can tell you more about anything you don’t understand. +
+ ''', 'ASSENT_13_17': ''' -University of California, San Diego -Assent to Act as a Research Subject -(Ages 13-17 years) -American Gut Project
- -Who is conducting the study, why you have been asked to participate, how you were selected, -and what is the approximate number of participants in the study? -Dr. Rob Knight is conducting a research study to find out more about the microbiome (harmless -or good microorganisms (tiny living things such as bacteria) that live on and within your body). -You have been asked to participate in this study because you, and everyone else on earth have a -unique microbiome, and the more people we study of all ages will help us to understand how the -micro-organisms may help or harm us. There will be approximately 100,000 participants in total. -
- -Why is this study being done? -The purpose of this study is to more accurately assess the differences between people and -whether these differences can be attributed to lifestyle, diet, body type, age or the presence of -associated diseases. The results will be used to create a database of sequence data and -metabolites from various body sites (e.g. skin, mouth, gut) and details about you (the participant -supplying the sample), that can be used by other researchers when they need samples to compare -to what they are studying e.g. certain diseases where gut abnormalities are common. -
- -What will happen to you in this study and which procedures are standard of care and which -are experimental? -After you have consented to taking part in the study, you will fill in a questionnaire on line that -asks questions about your body, age, weight, height, what you eat, if you have taken antibiotics, -if you have certain diseases and if you take supplements like vitamins. We would also like to know -how the COVID-19 pandemic is affecting how you sleep and how you feel. Then you can sample -yourself with the swab provided in the kit from the American Gut Project. Instructions are -included in the envelope so you know what to do. The most common sample is of your poop -(stool) where you apply a small smear to the tips of a swab from used toilet tissue or to a card -(called an FOBT card). You may also sample any area of skin, your tongue or mouth, your -nostrils, ear wax, or vagina. You may also be asked to poop into a plastic container that you -place under the toilet seat to catch the poop. We may also ask someone (like your mom or dad) to -take a small sample of blood by pricking your finger and then collecting the blood on 2 small swabs. -None of these samples or investigations will allow us to make a diagnosis of disease and we are not -looking at anything in your own DNA that can also be found in your poop or skin or saliva. -
- -How much time will each study procedure take, what is your total time commitment, and how -long will the study last? -To complete the online questionnaire should take 30-45 minutes or less. Each sample you send can -be obtained in 5 minutes or less. We expect the study to continue for 5 years but your results -will be available to you before the end of the study (usually within 2 months of us receiving the -sample). You can elect to sample yourself more than once. If your personal details change (e.g. -address, or your heath status) we request that you re-enter your responses to the -questionnaire or re-enter your contact information so we can follow up with you. -
- -What risks are associated with this study? -The sampling techniques have been used for about 5 years with no reported side effects. There is -a small chance you may hurt yourself when you are sampling. There may be some pain when -your finger is pricked and it may leave a bruise. We do not examine your personal genetic -information and any information we release in a public data repository either has no human -genetic information or has the known human genetic information filtered out of it. The -investigation personnel have taken precautions to ensure that there is minimal risk of your -private information leaking out. If the information about you were to become public the -impilications are minimal because the tests cannot be used for diagnosis. -
- -Because this is a research study, there may be some unknown risks that are currently -unforeseeable. You and your parents will be informed of any significant new findings. -
- -What are the alternatives to participating in this study? -You do not have to participate. No harm would come to you. -
- -What benefits can be reasonably expected? -There is no direct benefit to you for participating in this study. The investigator will publish a -scientific article to describe what is in all of the samples in the study including yours, but not in -such a way that anyone would know it is your sample. This will provide a valuable resource for -other researchers in other studies. You will get a link to your data that will give you and your -parent’s an idea of what is in your sample and how it compares with other people like you (age, -sex). -
- -Can you choose to not participate or withdraw from the study without penalty or loss of -benefits? -Participation in research is entirely voluntary. You may refuse to participate -or withdraw at any time without penalty or loss of benefits to which you are -entitled. If you decide that you no longer wish to continue in this study, you -will be requested to contact the American Gut Project helpline to inform us of -your intent to withdraw.
- -You will be told if any important new information is -found during the course of this study that may affect your wanting to continue. -
- -Can you be withdrawn from the study without your assent? -You may be withdrawn from the study if you do not complete the consent. You may also be -withdrawn from the study if you do not follow the instructions given you by the study personnel. -
- -Will you be compensated for participating in this study? -You will not be financially compensated in this study. -
- -What if you are injured as a direct result of being in this study? -If you are injured or become ill as a direct result of this research study, you will be provided with -medical care. -
- -What about your confidentiality? -Research records will be kept confidential to the extent allowed by law. All data about you that is -entered on the web site is stored on a password-protected server located at the SDSC (San Diego -Supercomputer Center) a biometric feature controlled-entrance facility at UCSD. The code key -(that records which barcode was on your sample) is stored on a separate password-protected -server that is accessible only to Dr. Knight, the sample coordinator and the database coders. All -analysis is done on data that has no record of who you are. We will put the data into a place -where other reseachers can access it, but there will not be a way of determining who you are -from what is in there, e.g. we will not publish your address. Research records may be reviewed -by the UCSD Institutional Review Board. -
- -Who can you call if you have questions? -If you have questions or research-related problems, you may reach Rob Knight at 858-246-1184 -or contact Dominic Nguyen at 858-534-8739. -
- -You may call the Human Research Protections Program Office at 858-246-4777 to inquire about -your rights as a research subject or to report research-related problems. -
- -Your Signature and Assent -You have received a copy of this assent document and a copy of the “Experimental Subject's Bill -of Rights” to keep. -
- -You agree to participate.
''', +University of California, San Diego
+ Assent to Act as a Research Subject
+ (Ages 13-17 years)
The Microsetta Initiative
+
+ Who is conducting the study, why have you been asked to participate, how were you selected, and what is the approximate number of participants in the study?
+ Dr. Rob Knight is conducting a research study to find out more about all the many bacteria and other microorganisms (called your microbiome) that live on and within your body. You have been asked to participate in this study because you, and everyone else on earth, have a unique microbiome, and the more people we study of all ages, the more we will understand about how the microorganisms may help or harm us. There will be approximately 100,000 participants in total in the study from across the USA and from other countries around the world.
+
+ Why is this study being done?
+ The purpose of this study is to assess more accurately the differences between people and whether these differences can be attributed to factors such as lifestyle, diet, body type, age or the presence of associated diseases. The results will be used to create a database of sequence data and metabolites from various body sites (e.g. skin, mouth, gut, blood), as well as details about you (the participant supplying the sample). Researchers can then use that data while studying relevant topics, such as gut-related health conditions.
+
+ What will happen to you in this study and which procedures are standard of care and which are experimental?
+ If you agree to participate in this study, the following will happen to you:
+ You will fill in a questionnaire online that asks questions about you, such as age, weight, height, what you eat, if you have taken antibiotics, if you have certain diseases and if you take supplements like vitamins. You will also be asked to answer questions about how the COVID-19 pandemic is affecting how you sleep and how you feel. There are also other types of questions that are about specific topics which you can choose to answer if you think they apply to you. Then you will sample yourself using the kit that was provided to you . Instructions are included in the kit so you know what to do. The most common sample is of your poop (stool) where you apply a small smear to the tips of a swab from used toilet tissue or to a card (called an FOBT card). You may also be asked to scoop some poop using a small spoon-like tool, place used toilet paper into a special receptacle we provide, or poop into a plastic container that you place under the toilet seat. You may also need to sample a small area of skin, your tongue or mouth, your nostrils, ear wax, or vagina. We may also ask someone (like your mom or dad) to take a small sample of blood by pricking your finger and then collecting the blood on 2 small swabs. None of these samples or investigations will allow us to make a diagnosis of disease and we are not looking at anything in your own DNA that can also be found in your poop,skin, or saliva.
+
+ How much time will each study procedure take, what is your total time commitment, and how long will the study last?
+ To complete the online questionnaire should take 30-45 minutes or less. Each sample you send can be obtained in 5 minutes or less. We expect the study to continue for many years but your results will be available to you before the end of the study (usually within a few months of us receiving the sample).
+
+ What risks are associated with this study?
+ Participation in this study may involve some added risks or discomforts. These include the following:
+
++ Because this is a research study, there may be some unknown risks that are currently unforeseeable. You and your parents will be informed of any significant new findings. + ++
+- While answering surveys, you may feel frustration, emotional discomfort, fatigue, and/or boredom.
+- You may experience temporary pain or a bruise at the site of the needle-stick if you take the blood test.
+- There is a risk of loss of confidentiality.
+
+ What are the alternatives to participating in this study?
+ You do not have to participate.
+
+ What benefits can be reasonably expected?
+ There is no direct benefit to you for participating in this study. You will get access to your data that will give you and your parents an idea of what is in your sample and how it compares with other people like you (age, sex).
+
+ Can you choose to not participate or withdraw from the study without penalty or loss of benefits?
+ Participation in research is entirely voluntary. You may refuse to participate or withdraw at any time without penalty or loss of benefits to which you are entitled. If you decide that you no longer wish to continue in this study, you may withdraw your consent by requesting the deletion of your source and/or account through your online account. Our researchers will still use the data about you that was collected before you withdrew. After you withdraw, no further data will be collected from you.
+ We will inform you if any important new information is found during the course of this study that may affect your wanting to continue.
+
+ Can you be withdrawn from the study without your assent?
+ You may be withdrawn from the study if you do not follow the instructions given to you by the study personnel.
+
+ Will you be compensated for participating in this study?
+ You will not be financially compensated in this study.
+
+ Are there any costs associated with participating in this study?
+ After you have signed up for the project and mailed in your sample there will be no costs to you for participating in the study.
+
+ What if you are injured as a direct result of being in this study?
+ If you are injured or become ill as a direct result of this research study, you will be provided with medical care.
+
+ What about your confidentiality?
+ Research records will be kept confidential to the extent allowed by law. As part of your participation in the study, you will provide personal and/or sensitive information that could allow you to be identified if it was made public, such as name, date of birth, or address. We take every precaution to protect your identity. All data you provide is stored on secure systems within UC San Diego's infrastructure and directly identifying information is accessible only to critical study personnel. The code key (that relates participant personal information to sample barcodes) is retained on a separate password-protected server that is accessible only to relevant staff such as the Dr. Knight, Co-Investigators, project and sample coordinators, IT administrator and the database coders. Sample analysis is performed using data from which directly identifying information has been removed, and all data shared with public repositories also undergo this treatment. Research records may be reviewed by the UC San Diego Institutional Review Board.
+
+ Know what we will collect
+ As part of this research study, we will create and obtain information related to you and your participation in the study from you or from collaborators so we can properly conduct this research. Research study data will include: contact information, demographic information, personal experiences, lifestyle preferences, health information, date of birth, opinions or beliefs.
+
+ How we will use your Sample
+ We will use the sample you provide to study the non-human DNA (e.g. bacterial DNA) in it. We may save some of your sample to be accessible to researchers so they can conduct additional studies using the other compounds from it, such as RNA, proteins or metabolites. We may contact you if additional information or action is needed in order to process your sample(s) and/or for re-consenting purposes.
+
+ How we will use your Personal Data
+ The Personal Data you provide will be used for the following purposes:
+
++ ++
+- To share with members of the research team so they can properly conduct the research
+- For future research studies or additional research by other researchers
+- To contact you for the purpose of receiving alerts of your participation status, general program updates, opportunities to take part in new or future research, and/or as a follow-up to questions you have responded to in the questionnaire(s)
+- To comply with legal and regulatory requirements, including requirements to share data with regulatory agencies overseeing the research
+- To confirm proper conduct of the study and research integrity
+
+ Retention of your Personal Data
+ We may retain your personal data for as long as necessary to fulfill the objectives of the research and to ensure the integrity of the research. We will delete your personal data when it is no longer needed for the study or if you withdraw your consent provided such deletion does not render impossible or seriously impair the achievement of the objectives of the research project. However, your information will be retained as necessary to comply with legal or regulatory requirements.
+
+ Your Privacy Rights
+ The General Data Protection Regulation (“GDPR”) requires researchers to provide information to you when we collect and use research data if you are located within the European Union (EU) or the European Economic Area (EEA). The GDPR gives you rights relating to your Personal Data, including the right to access, correct, restrict, and withdraw your personal information.
+ The research team will store and process your Personal Data at our research site in the United States. The United States does not have the same laws to protect your Personal Data as States in the EU/EEA. However, the research team is committed to protecting the confidentiality of your Study Data. Additional information about the protections we will use is included in this consent document.
+
+ Who can you call if you have questions?
+ If you have questions or research-related problems, you may reach us by emailing our help account microsetta@ucsd.edu or Rob Knight at 858-246-1184.
+ You may call the Office of IRB Administration at 858-246-4777 to inquire about your rights as a research subject or to report research-related problems.
+ If you have questions or complaints about our treatment of your Personal Data, or about our privacy practices more generally, please feel free to contact the UC San Diego Privacy Official by email at ucsdprivacy@ucsd.edu.
+
+ Your Signature and Assent
+ You may download a copy of this assent document and a copy of the “Experimental Subject's Bill of Rights” to keep.
+
University of California, San Diego -Consent to Act as a Research Subject -American Gut Project
- -Who is conducting the study, why you have been asked to participate, how you were selected, -and what is the approximate number of participants in the study? -Dr. Rob Knight is conducting a research study to find out more about the trillions of bacteria and -other organisms (called your microbiome) that live in and on your body. You have been asked to -participate in this study because your microbiome is unique – not the same as anyone else on -earth. There will be approximately 100,000 participants in the study from across the USA and -from other countries around the world. -
- -Why is this study being done? -The purpose of this study is to more accurately assess the differences between people and -whether these differences can be attributed to lifestyle, diet, body type, age or the presence of -associated diseases. The results will be used to create a database of sequence data and -metabolites from various body sites (e.g. skin, mouth, gut) and details about the participant -supplying the sample, that can be used by other researchers when they need samples to compare -when they are studying the same type of sample in other scientific studies e.g. certain diseases -where gut abnormalities are common. -
- -What will happen to you in this study? -You are being asked if you want to be in this study because you signed up for microbial analysis -on the American gut website. When you signed up we sent you a sample kit with instructions on -how to login to the website so that you can consent to the study formally. -We will analyze all samples where this consent form and the questionnaire/s are completed. The -samples in the project (including yours) will be analyzed and published in scientific articles -defining the range of diversity in the human microbiome. You will get a link to view, download -and print high-resolution figures suitable for framing of your results, and access to a more -detailed report of the micro-organisms that were identified in your sample. -We would like you to understand from the consent what we will do with your sample and what -you will get in return. We also want you to understand that the methods we use for identifying -micro-organisms in your sample cannot be used to diagnose disease. The results are not -medically actionable. The report includes notation of rare types of micro-organisms for your -interest only. The techniques we use to identify the organisms cannot be used for species level -resolution. -
- -We will ask you to complete an online questionnaire about you your lifestyle and what you eat. -We estimate that this should take no more than 30-45 minutes. There are also other questionnaires -that you can choose to complete if they apply to you.This includes a COVID-19 questionnaire -that asks about your possible exposure to COVID-19 and how it is affecting you personally, -an Autism-Spectrum Disorder questionnaire, a migraine survey, surfer microbiome survey and -fermented foods survey. These should be completed if they apply to you and you want to provide -additional information about yourself that may assist our research. -
- --You will then sample a part of your body (of interest to you) with a sterile Q-tip like swab by -rubbing the surface of your skin, rubbing the surface of your tongue or sampling your stool in -one of 3 ways: -
-You can also sample other parts of your body – ear, nose, vagina, scalp, sole of foot.
- -If you signed up for a blood collection kit, you have a kit with instructions on how to get -a blood sample at home. It is similar to the test used to test glucose levels by pricking -your finger. There are also instructions on line at: https://www.neoteryx.com/how-to-properly-take-a-blood-sample-using-the-mitra-microsampler-vams -
- -The swabs, FOBT cards and/or blood test cartridge should be returned to us in the container -provided according to the instructions provided. Whole stool samples will be returned to the -Knight Lab in the provided shipping container.
- -DNA will be extracted from the sample and amplified by PCR (polymerase chain reaction) and -then sequenced to see what micro-organisms are present and in what proportion in your sample. -We may also use the remaining sample to look at the metabolites like proteins or chemicals -present that are derived from the bacteria, or to look more carefully for specific bacteria that may -be interesting to us. We estimate that it will take 2 months for you to learn the results of the -initial bacterial diversity estimation although some samples like skin may take longer (3-6 -months). -
- -Results will be uploaded to your American Gut account when they are available and you will -receive an email informing you of the availability of results. -
- -We are also asking you to consent to having your sample and the non-human DNA from it (e.g. -bacterial DNA) used in future studies. We would also like you to consent to be re-contacted by -the PI of the study Dr. Rob Knight or members of the research personnel at the email address you -provided to request further information as a follow-up to questions you have responded to in the -questionnaire.
- -Please Note: The sequencing is not for diagnostic purposes and does not target human DNA.
- -How much time will each study procedure take, what is your total time commitment, and how -long will the study last? -To complete the online questionnaire should take 30 - 45 minutes or less. Each sample you send can -be obtained in 5 minutes or less. We expect the study to continue for many years but your results -will be available to you before the end of the study (usually within 2 months of us receiving the -sample). You can elect to sample yourself more than once. If your personal details change (e.g. -address, or your heath status) we request that you voluntarily re-enter your contact information -and responses to the questionnaire. -
- -What risks are associated with this study? -The sampling techniques have been used for ~10 years with no reported side effects. You may -experience temporary pain or a bruise at the site of the needle-stick if you take the blood test. We -do not examine any human DNA that may be in the sample so personal information about your -genome will not be obtained. All data deposited in a publicly accessible data repository is -filtered of known human sequence data before being deposited. The investigation personnel have -taken precautions to ensure that there is minimal risk of loss of confidentiality. Should -confidentiality be compromised, the implications to you are minimal since the results are not -diagnostic and have no implications for insurance companies that could compromise your -insurability. -
-(Federal and State laws generally make it illegal for health insurance companies, group health plans, and most -employers to discriminate against you based on your genetic information. This law generally will protect you in the -following ways: a) Health insurance companies and group health plans may not request your genetic information -that we get from this research. b) Health insurance companies and group health plans may not use your genetic -information when making decisions regarding your eligibility or premiums. c) Employers with 5 or more employees -may not use your genetic information that we get from this research when making a decision to hire, promote, or -fire you or when setting the terms of your employment.)
- -Because this is a research study, there may be some unknown risks that are currently -unforeseeable. You will be informed of any significant new findings. -
- -What are the alternatives to participating in this study? -The study is entirely voluntary and not participating will have no consequence. -
- -What benefits can be reasonably expected? -There is no direct benefit to you for participating in this study. We believe that there may be -natural curiosity to know what microbes are in your sample and how this compares to other -people of the same gender and age. The investigator, however, will learn more about the human -microbiome in health and disease and provide a valuable resource for other researchers in other -studies. Your contribution to the project may be eligible as a tax-deduction. -We will analyze all samples where the consent form and questionnaire is completed. The -samples in the project (including yours) will be analyzed and published as a scientific article. -You will get a link to view, download and print high-resolution figures suitable for framing. The -results from the analysis cannot be used by you or your doctor to confirm a clinical -diagnosis and we are not testing for infectious disease. The report you receive will include -identification of rare micro-organisms that are in your sample and in a small percentage of other -participants. This is provided to you for interest only. The techniques we use do not identify -bacteria at a level of identification that can be used to diagnose disease or infer disease -causation. We may be able to detect RNA or DNA from viruses (including SARS-CoV-2 that causes -COVID-19) but this cannot be used as a substitute for a clinical laboratory test. -
- -Can you choose to not participate or withdraw from the study without penalty or loss of -benefits? -Participation in research is entirely voluntary. You may refuse to participate or withdraw at any -time without penalty or loss of benefits to which you are entitled. If you decide that you no -longer wish to continue in this study, you will be requested to contact the American Gut Project -email helpline to inform us of your intent to withdraw. If your sample has not been processed -you may request a refund which will be processed through the site where you contributed to the -project. -
- -You will be told if any important new information is found during the course of this study that -may affect your wanting to continue. -
- -Can you be withdrawn from the study without your consent? -You may be withdrawn from the study if you do not complete the consent. You may also be -withdrawn from the study if you do not follow the instructions given you by the study personnel. -
- -Will you be compensated for participating in this study? -You will not be financially compensated in this study. -
- -Are there any costs associated with participating in this study? -After you have signed up for the project and mailed in your sample there will be no costs to you -for participating in the study. -
- -What if you are injured as a direct result of being in this study? -If you are injured as a direct result of participation in this research, the University of California -will provide any medical care you need to treat those injuries. The University will not provide -any other form of compensation to you if you are injured. You may call the Human Research -Protections Program Office at (858) 246-4777 for more information about this, to inquire about -your rights as a research subject or to report research-related problems. -
- -What about your confidentiality? -Research records will be kept confidential to the extent allowed by law. All data about you that is -entered on the web site is stored on a password-protected server located at the SDSC (San Diego -Supercomputer Center) a biometric feature controlled-entrance facility at UCSD. Financial -information from participants contributing to the project is not accessible to the researchers. The -code key (that relates participant personal information to sample barcodes) is retained on a -separate password-protected server that is accessible only to the PI, Co-I, sample coordinator, IT -administrator and the database coders. All analysis is done on de-identified data and the data -deposited in a public repository for use by other investigators, is similarly de-identified. -Research records may be reviewed by the UCSD Institutional Review Board. -You will provide information about yourself that could allow you to be identified if it was made -public e.g. name, age, birthdate, address. We have made every effort to ensure that you cannot -be identified from the data you supply about yourself but retaining critical information like -gender, age without compromising your personal information or the data integrity. -We may need to report information about known or reasonably suspected incidents of abuse or -neglect of a child, dependent adult or elder including physical, sexual, emotional, and financial -abuse or neglect. The only way we could discover such abuse is if it is self-reported by the -participant or the legal guardian, so this is not likely. If any investigator has or is given such -information, he or she may report such information to the appropriate authorities. -
- -Who can you call if you have questions? -If you have questions or research-related problems, you may reach Rob Knight at 858-246-1184 -or contact Dominic Nguyen at 858-534-8739. -
- -You may call the Human Research Protections Program Office at 858-246-4777 to inquire about -your rights as a research subject or to report research-related problems. -
- -Your Signature and Consent -You have received a copy of this consent document and a copy of the “Experimental Subject's -Bill of Rights” to keep. -
- -You agree to participate. -
''', +University of California, San Diego
+ Consent to Act as a Research Subject
The Microsetta Initiative
+
+ Who is conducting the study, why have you been asked to participate, how were you selected, and what is the approximate number of participants in the study?
+ Dr. Rob Knight is conducting a research study to find out more about the trillions of bacteria and other microorganisms (called your microbiome) that live in and on your body. This includes eukaryotes like fungi and parasites, prokaryotes like bacteria and archaea, and viruses. You have been asked to participate in this study because your microbiome is unique – not the same as anyone else’s on earth. There will be approximately 100,000 participants in the study from across the USA and from other countries around the world.
+
+ Why is this study being done?
+ The purpose of this study is to assess more accurately the differences among people and whether these differences can be attributed to factors such as lifestyle, diet, body type, age or the presence of associated diseases. The results will be used to create a database of sequence data and metabolites from various body sites (e.g. skin, mouth, gut, blood), as well as details about the person supplying the sample. Researchers can then use that data while studying relevant topics, such as gut-related health conditions.
+
+ What will happen to you in this study?
+ If you agree to be in this study, the following will happen to you:
+ You have received or will receive a sample kit. The kit contains devices used to collect samples and instructions for use. The collection device may also include 95% ethanol to preserve the sample and make it non-infectious.
+ We will ask you to complete an online questionnaire about you (e.g. age, weight, height), your lifestyle, and what you eat. There are also other questionnaires that are more topic-focused, which you can choose to complete if they apply to you. These may include questions related to the following topics, among others: COVID-19, Autism-Spectrum Disorder, migraines, surfing, consumption of fermented foods, consumption of foods containing polyphenols. You should complete these if they're applicable and you want to provide additional information that may assist our research.
+ You will then collect a sample of yourself (e.g. stool, skin, mouth, nostril, ear, vagina), pet, or environment as described in the kit instructions or in the instructions provided to you by study coordinators. If collecting from stool, you will be asked to sample in one of a variety of ways, such as the following:
+
++ If you received a blood collection kit, it contains materials and instructions on how to collect a blood sample at home. It is similar to the test used to test glucose levels by pricking your finger.+
+- By inserting the tips of the swab into used toilet tissue and returning the sample in the provided plastic container;
+- By inserting the tips of the swab into used toilet tissue and applying the tips to the surface of a Fecal Occult Blood Test (FOBT) card, then returning the card to us. The FOBT card is the same device used by your doctor to check for blood in your stool. The FOBT card stabilizes the stool material for later analysis. We will not check if there is blood in the stool for diagnostic purposes because we are not a clinical laboratory;
+- By using the scooper device to scoop a part of the fecal material into the provided tube;
+- Depositing soiled toilet paper into the provided receptacle;
+- Submitting a whole stool sample in a shipping container we will provide. This container will have ice packs that reliably cool the sample to -20 degrees Celsius/-4 degrees Fahrenheit.
+
+ How much time will each study procedure take, what is your total time commitment, and how long will the study last?
+ Completing the main online questionnaire should take 30 - 45 minutes or less. Each additional survey may take up to an additional 30 minutes to complete. Each sample you send can be obtained in 5 minutes or less. We expect the study to continue for many years but your results will be available to you before the end of the study (usually within a few months of us receiving the sample).
+
+ What risks are associated with this study?
+ Participation in this study may involve some added risks or discomforts. These include the following:
+
++ Because this is a research study, there may be some unknown risks that are currently unforeseeable. You will be informed of any significant new findings. + ++
+- While answering surveys, you may feel frustration, emotional discomfort, fatigue, and/or boredom.
+- If using the blood collection device, you may experience temporary pain or a bruise at the site of the needle-stick.
+- There is a risk of loss of confidentiality.
+
+ What are the alternatives to participating in this study?
+ You do not have to participate.
+
+ What benefits can be reasonably expected?
+ There is no monetary or direct benefit for participating in this study. You will receive a report detailing the results of our analysis on your sample, as well as facts and figures comparing your microbiome's composition to that of other study participants.
+
+ Can you choose to not participate or withdraw from the study without penalty or loss of benefits?
+ Participation in research is entirely voluntary. You may refuse to participate or withdraw at any time without penalty or loss of benefits to which you are entitled. If you decide that you no longer wish to continue in this study, you may withdraw your consent by requesting the deletion of your source and/or account through your online account. We will inform you if any important new information is found during the course of this study that may affect your wanting to continue.
+
+ Can you be withdrawn from the study without your consent?
+ You may be withdrawn from the study if you do not follow the instructions given to you by the study personnel.
+
+ Will you be compensated for participating in this study?
+ You will not be financially compensated in this study.
+
+ Are there any costs associated with participating in this study?
+ After you have signed up for the project and mailed in your sample there will be no costs to you for participating in the study.
+
+ What if you are injured as a direct result of being in this study?
+ If you are injured as a direct result of participation in this research, the University of California will provide any medical care you need to treat those injuries. The University will not provide any other form of compensation to you if you are injured. You may call the Office of IRB Administration at (858) 246-4777 for more information about this, to inquire about your rights as a research subject or to report research-related problems.
+
+ What about your confidentiality?
+ Research records will be kept confidential to the extent allowed by law. As part of your participation in the study, you will provide personal and/or sensitive information that could allow you to be identified if it was made public, such as name, date of birth, or address. We take every precaution to protect your identity. All data you provide is stored on secure systems within UC San Diego's infrastructure and directly identifying information is accessible only to critical research personnel. The code key (that relates participant personal information to sample barcodes) is retained on a separate password-protected server that is accessible only to relevant staff such as the Dr. Knight, Co-Investigators, project and sample coordinators, IT administrator and the database coders. Sample analysis is performed using data from which directly identifying information has been removed, and all data shared with public repositories also undergo this treatment. Research records may be reviewed by the UC San Diego Institutional Review Board.
+ We may need to report information about known or reasonably suspected incidents of abuse or neglect of a child, dependent adult or elder including physical, sexual, emotional, and financial abuse or neglect. If any investigator has or is given such information, he or she may report such information to the appropriate authorities.
+ (Federal and State laws generally make it illegal for health insurance companies, group health plans, and most employers to discriminate against you based on your genetic information. This law generally will protect you in the following ways: a) Health insurance companies and group health plans may not request your genetic information that we get from this research. b) Health insurance companies and group health plans may not use your genetic information when making decisions regarding your eligibility or premiums. c) Employers with 5 or more employees may not use your genetic information that we get from this research when making a decision to hire, promote, or fire you or when setting the terms of your employment.
+ Be aware that these laws do not protect you against genetic discrimination by companies that sell life insurance, disability insurance, or long-term care insurance.)
+
+ Know what we will collect
+ As part of this research study, we will create and obtain information related to you and your participation in the study from you or from collaborators so we can properly conduct this research. Research study data will include: contact information, demographic information, personal experiences, lifestyle preferences, health information, date of birth, opinions or beliefs.
+
+ How we will use your Sample
+ We will use the sample you provide to study the non-human DNA (e.g. bacterial DNA) in it. We may save some of your sample to be accessible to researchers so they can conduct additional studies using the other compounds from it, such as RNA, proteins or metabolites. We may contact you if additional information or action is needed in order to process your sample(s) and/or for re-consenting purposes.
+
+ How we will use your Personal Data
+ The Personal Data you provide will be used for the following purposes:
+
++ ++
+- To share with members of the research team so they can properly conduct the research
+- For future research studies or additional research by other researchers
+- To contact you for the purpose of receiving alerts of your participation status, general program updates, opportunities to take part in new or future research, and/or as a follow-up to questions you have responded to in the questionnaire(s)
+- To comply with legal and regulatory requirements, including requirements to share data with regulatory agencies overseeing the research
+- To confirm proper conduct of the study and research integrity
+
+ Retention of your Personal Data
+ We may retain your Personal Data for as long as necessary to fulfill the objectives of the research and to ensure the integrity of the research. We will delete your Personal Data when it is no longer needed for the study or if you withdraw your consent provided such deletion does not render impossible or seriously impair the achievement of the objectives of the research project. However, your information will be retained as necessary to comply with legal or regulatory requirements.
+
+ Your Privacy Rights
+ The General Data Protection Regulation (“GDPR”) requires researchers to provide information to you when we collect and use research data if you are located within the European Union (EU) or the European Economic Area (EEA). The GDPR gives you rights relating to your Personal Data, including the right to access, correct, restrict, and withdraw your personal information.
+ The research team will store and process your Personal Data at our research site in the United States. The United States does not have the same laws to protect your Personal Data as countries in the EU/EEA. However, the research team is committed to protecting the confidentiality of your Study Data. Additional information about the protections we will use is included in this consent document.
+
+ Who can you call if you have questions?
+ If you have questions or research-related problems, you may reach Rob Knight at 858-246-1184 or email our help account: microsetta@ucsd.edu.
+ You may call the Office of IRB Administration at 858-246-4777 to inquire about your rights as a research subject or to report research-related problems.
+ If you have questions or complaints about our treatment of your Personal Data, or about our privacy practices more generally, please feel free to contact the UC San Diego Privacy Official by email at ucsdprivacy@ucsd.edu.
+
+ Your Signature and Consent
+ You may download a copy of this consent document and a copy of the “Experimental Subject's Bill of Rights” to keep.
+ Your consent is entirely voluntary, but declining to provide it may materially impede your ability to participate in this research and receive a kit.
+
University of California, San Diego -Parent Consent for Child to Act as a Research Subject -American Gut Project
- -Who is conducting the study, why your child been asked to participate, how your child was -selected, and what is the approximate number of participants in the study? -Dr. Rob Knight is conducting a research study to find out more about the trillions of bacteria and -other organisms (called the microbiome) that live in and on the body. You are volunteering your -child for this study because you want to know more about the microbiome of your child. -Children like all humans have a unique microbiome and including them in the study will help -elucidate the development of the microbiome. There will be approximately 100,000 participants -in the study from across the USA and from other countries around the world.
- -Why is this study being done? -The purpose of this study is to more accurately assess the differences between people and -whether these differences can be attributed to lifestyle, diet, body type, age or the presence of -associated diseases. The results will be used to create a database of sequence data and -metabolites from various body sites (e.g. skin, mouth, gut) and details about the child participant -supplying the sample that can be used by other researchers when they are studying the same type -of sample in other scientific studies e.g. certain diseases where gut abnormalities are common.
- -What will happen to your child in this study and which procedures are standard of care and -which are experimental? -You are being asked if you want your child to be in this study because you signed up for microbial -analysis on the American gut website. When you signed up we sent you a sample kit with instructions -on how to login to the website so that you can consent to the study formally. The sampling kit -contains polyester-tipped sterile swabs or cotton-tipped swabs with a sterile buffer -(phosphate-buffered saline) that will facilitate sampling. The collection device may also include 95% -ethanol to preserve the sample and make it non-infectious. There are also instructions for returning -the sample to us safely. -
- --We will analyze all samples where this consent form and the questionnaire are completed. The samples -in the project (including your child’s) will be analyzed and published in scientific articles defining -the range of diversity in the human microbiome. You will get a link to view, download and print -high-resolution figures suitable for framing of your results and access to a more detailed report of -the micro-organisms that were identified in your sample. We also want you to understand that the -methods we use for identifying micro-organisms in your child’s sample cannot be used to diagnose -disease. The results are not medically actionable. The report includes notation of rare types of -micro-organisms for your interest only. The techniques we use to identify the organisms cannot be -used for species level resolution. -
- --We would like you to understand from the consent what we will do with your child’s sample and what -you will get in return. -
- --We will ask you to complete an online questionnaire about your child’s lifestyle and what he/she eats. -We estimate that this should take no more than 30-45 minutes. There are also other questionnaires that -you can choose to complete if they apply to your child. This includes a COVID-19 questionnaire that -asks about possible exposure to COVID-19 and how it is affecting your child, an Autism-Spectrum -Disorder questionnaire, a migraine survey, surfer microbiome survey and fermented foods survey. -These should be completed if they apply to your child and you want to provide additional information -that may assist our research. -
- --You will then sample a part of your child’s body (of interest to you or the researcher) with a sterile -Q-tip like swab by rubbing the surface of you’re the skin, rubbing the surface of the tongue or -sampling their stool in one of 3 ways: -
+University of California, San Diego
+ Parent Consent for Child to Act as a Research Subject
The Microsetta Initiative
+
+ Who is conducting the study, why has your child been asked to participate, how was your child selected, and what is the approximate number of participants in the study?
+ Dr. Rob Knight is conducting a research study to find out more about the trillions of bacteria and other microorganisms (called the microbiome) that live in and on the body. This includes eukaryotes like fungi and parasites, prokaryotes like bacteria and archaea, and viruses. You are volunteering your child for this study because you want to know more about the microbiome of your child. Children like all humans have a unique microbiome and including them in the study will help elucidate the development of the microbiome. There will be approximately 100,000 participants in the study from across the USA and from other countries around the world.
+
+ Why is this study being done?
+ The purpose of this study is to assess more accurately the differences between people and whether these differences can be attributed to factors such as lifestyle, diet, body type, age or the presence of associated diseases. The results will be used to create a database of sequence data and metabolites from various body sites (e.g. skin, mouth, gut) as well as details about the child participant supplying the sample. Researchers can then use that data while studying relevant topics, such as gut-related health conditions.
+
+ What will happen to your child in this study and which procedures are standard of care and which are experimental?
+ If you agree to allow your child to participate in this study, the following will happen to your child:
+ You have received or will receive a sample kit. The kit contains devices used to collect samples and instructions for use. The collection device may also include 95% ethanol to preserve the sample and make it non-infectious.
+ We will ask you to complete an online questionnaire about your child (e.g. age, weight, height), your child’s lifestyle, and what your child eats. There are also other questionnaires that are more topic-focused, which you can choose to complete if they apply to your child. These may include questions related to the following topics, among others: COVID-19, Autism-Spectrum Disorder, migraines, surfing, consumption of fermented foods, consumption of foods containing polyphenols. You should complete these if they apply to your child and you want to provide additional information that may assist our research.
+ You will then sample a part of your child’s body (e.g. stool, skin, mouth, nostril, ear, vagina) as described in the kit instructions. If collecting from stool, you will be asked to sample in one of a variety of ways, such as the following:
+
++ If you received a blood collection kit, it contains materials and instructions on how to collect a blood sample at home. It is similar to the test used to test glucose levels by pricking your child’s finger.+
+- By inserting the tips of a Q-tip like swab into used toilet tissue and returning the sample in the provided plastic container;
+- By inserting the tips of the swab into used toilet tissue and applying the tips to the surface of a Fecal Occult Blood Test (FOBT) card, then returning the card to us. The FOBT card is the same device used by your doctor to check for blood in your stool. The FOBT card stabilizes the stool material for later analysis. We will not check if there is blood in the stool for diagnostic purposes because we are not a clinical laboratory;
+- By using the scooper device to scoop a part of the fecal material into the provided tube;
+- Depositing soiled toilet paper into the provided receptacle;
+- Submitting a whole stool sample in a shipping container we will provide. This container will have ice packs that reliably cool the sample to -20 degrees Celsius/-4 degrees Fahrenheit.
+
+ How much time will each study procedure take, what is your child’s total time commitment, and how long will the study last?
+ Completing the main online questionnaire should take 30-45 minutes or less. Each additional survey may take up to an additional 30 minutes to complete. Each sample you send can be obtained in 5 minutes or less. We expect the study to continue for many years but the results will be available to you before the end of the study (usually within a few months of us receiving the sample).
+
+ What risks are associated with this study?
+ Participation in this study may involve some added risks or discomforts. These include the following:
+
++ Because this is a research study, there may be some unknown risks that are currently unforeseeable. You will be informed of any significant new findings. + ++
+- While answering surveys, you or your child may feel frustration, emotional discomfort, fatigue, and/or boredom.
+- If using the blood collection device, your child may experience temporary pain or a bruise at the site of the needle-stick.
+- There is a risk of loss of confidentiality.
+
+ What are the alternatives to participating in this study?
+ Participation is voluntary.
+
+ What benefits can be reasonably expected?
+ There is no direct benefit to your child for participating in this study. You will receive a report detailing the results of our analysis on your child’s sample, as well as facts and figures comparing your child’s microbial composition to that of other study participants. The investigator, however, may learn more about the human microbiome in health and disease and provide a valuable resource for other researchers.
+
+ Can you choose to not have your child participate or withdraw from the study without penalty or loss of benefits?
+ Participation in research is entirely voluntary. You may refuse to have your child participate or withdraw your child at any time without penalty or loss of benefits to which you or your child are entitled. If you decide that you no longer wish your child to continue in this study, you may withdraw your consent by requesting the deletion of your child’s source and/or account through your online account. We will inform you and your child if any important new information is found during the course of this study that may affect your wanting to continue.
+
+ Can your child be withdrawn from the study without your consent?
+ Your child may be withdrawn from the study if the instructions given to you by the study personnel are not followed.
+
+ Will you be compensated for participating in this study?
+ You will not be financially compensated in this study.
+
+ Are there any costs associated with participating in this study?
+ After you have signed your child up for the project and mailed in your child’s sample there will be no costs to you for their participation in the study.
+
+ What if your child is injured as a direct result of being in this study?
+ If your child is injured as a direct result of participation in this research, the University of California will provide any medical care you need to treat those injuries. The University will not provide any other form of compensation to you if your child is injured. You or your child may call the Office of IRB Administration at 858-246-4777 for more information about this, to inquire about your rights as a research subject or to report research-related problems.
+
+ What about your or your child’s confidentiality?
+ Research records will be kept confidential to the extent allowed by law. As part of your child’s participation in the study, you or your child will provide personal and/or sensitive information that could allow your child to be identified if it was made public, such as name, date of birth, or address. We take every precaution to protect your identity. All data you or your child provide are stored on secure systems within UC San Diego's infrastructure and directly identifying information is accessible only to critical study personnel. The code key (that relates participant personal information to sample barcodes) is retained on a separate password-protected server that is accessible only to relevant staff such as the Dr. Knight, Co-Investigators, project and sample coordinators, IT administrator and the database coders. Sample analysis is performed using data from which directly identifying information has been removed, and all data shared with public repositories also undergo this treatment. Research records may be reviewed by the UC San Diego Institutional Review Board.
+ We may need to report information about known or reasonably suspected incidents of abuse or neglect of a child, dependent adult or elder including physical, sexual, emotional, and financial abuse or neglect. If any investigator has or is given such information, he or she may report such information to the appropriate authorities.
+ (Federal and State laws generally make it illegal for health insurance companies, group health plans, and most employers to discriminate against you based on your genetic information. This law generally will protect you in the following ways: a) Health insurance companies and group health plans may not request your genetic information that we get from this research. b) Health insurance companies and group health plans may not use your genetic information when making decisions regarding your eligibility or premiums. c) Employers with 5 or more employees may not use your genetic information that we get from this research when making a decision to hire, promote, or fire you or when setting the terms of your employment.
+ Be aware that these laws do not protect you against genetic discrimination by companies that sell life insurance, disability insurance, or long-term care insurance.)
+
+ Know what we will collect
+ As part of this research study, we will create and obtain information related to your child’s participation in the study from you or from collaborators so we can properly conduct this research. Research study data will include: contact information, demographic information, personal experiences, lifestyle preferences, health information, date of birth, opinions or beliefs.
+
+ How we will use your child’s Sample
+ We will use the sample your child provides to study the non-human DNA (e.g. bacterial DNA) in it. We may save some of your child’s sample to be accessible to researchers so they can conduct additional studies using the other compounds from it, such as RNA, proteins or metabolites. We may contact you if additional information or action is needed in order to process your child’s sample(s) and/or for re-consenting purposes.
+
+ How we will use your child’s Personal Data
+ The Personal Data you provide will be used for the following purposes:
+
++ ++
+- To share with members of the research team so they can properly conduct the research
+- For future research studies or additional research by other researchers
+- To contact you for the purpose of receiving alerts of your child’s participation status, general program updates, opportunities to take part in new or future research, and/or as a follow-up to questions you have responded to in the questionnaire(s)
+- To comply with legal and regulatory requirements, including requirements to share data with regulatory agencies overseeing the research
+- To confirm proper conduct of the study and research integrity
+
+ Retention of your Personal Data
+ We may retain the Personal Data you provide for as long as necessary to fulfill the objectives of the research and to ensure the integrity of the research. We will delete your child’s Personal Data when it is no longer needed for the study or if you withdraw your consent provided such deletion does not render impossible or seriously impair the achievement of the objectives of the research project. However, your child’s information will be retained as necessary to comply with legal or regulatory requirements.
+
+ Your Privacy Rights
+ The General Data Protection Regulation (“GDPR”) requires researchers to provide information to you when we collect and use research data if you are located within the European Union (EU) or the European Economic Area (EEA). The GDPR gives you rights relating to your child’s Personal Data, including the right to access, correct, restrict, and withdraw your child’s personal information.
+ The research team will store and process your child’s Personal Data at our research site in the United States. The United States does not have the same laws to protect your child’s Personal Data as States in the EU/EEA. However, the research team is committed to protecting the confidentiality of your child’s Study Data. Additional information about the protections we will use is included in this consent document.
+
+ Who can you call if you have questions?
+ If you have questions or research-related problems, you may reach Rob Knight at 858-246-1184 or email our help account: microsetta@ucsd.edu.
+ You may call the Office of IRB Administration at 858-246-4777 to inquire about your rights as a research subject or to report research-related problems.
+ If you have questions or complaints about our treatment of your Personal Data, or about our privacy practices more generally, please feel free to contact the UC San Diego Privacy Official by email at ucsdprivacy@ucsd.edu.
+
+ Your Signature and Consent
+ You may download a copy of this consent document and a copy of the “Experimental Subject's Bill of Rights” to keep.
+ Your consent is entirely voluntary, but declining to provide it may materially impede your child’s ability to participate in this research and receive a kit.
+
THE MICROSETTA INITIATIVE
+University of California, San Diego
+PARTICIPATION AGREEMENT
You can also sample other parts of her/his body – ear, nose, vagina, scalp, sole of foot. -If you signed up for a blood collection kit, you have a kit with instructions on how to get a blood -sample at home. It is similar to the test used to test glucose levels by pricking your child’s -finger. There are also instructions on line at: https://www.neoteryx.com/how-to-properly-take-ablood-sample-using-the-mitra-microsampler-vams -The swabs, FOBT cards and/or blood test cartridge should be returned to us in the container -provided according to the provided shipping instructions. Whole stool samples will be returned -to the Knight Lab in the provided shipping container.
- -DNA will be extracted from the sample and amplified by PCR (polymerase chain reaction) and -then sequenced to see what mmicro-organisms are present and in what proportion in the sample. -We may also use the remaining sample to look at the metabolites like proteins or chemicals -present that are derived from the bacteria, or to look more carefully for specific bacteria that may -be interesting to us. We estimate that it will take 2 months for you to learn the results of the -initial bacterial diversity estimation although some samples like skin may take longer (3-6 -months).
- -Results will be uploaded to your American Gut account when they are available and you will -receive an email informing you of the availability of results.
- -We are also asking you to consent to having your child’s sample or the non-human DNA from it -(e.g. bacterial DNA) used in future studies. We would also like you to consent to be re-contacted -by the PI of the study Dr. Rob Knight or members of the research personnel at the email address -you provided to request further information as a follow-up to questions you have responded to -in the questionnaire.
- -Please Note: The sequencing is not for diagnostic purposes and does not target human DNA. - -How much time will each study procedure take, what is your child’s total time commitment, -and how long will the study last? -To complete the online questionnaire should take 30-45 minutes or less. Each sample you send can -be obtained in 5 minutes or less. We expect the study to continue for many years but the results -will be available to you before the end of the study (usually within 2 months of us receiving the -sample). You can choose to sample your child more than once. If your child’s personal details -change (e.g. address, or heath status) we request that you voluntarily re-enter contact information -and/or responses to the questionnaire.
- -What risks are associated with this study? -The sampling techniques have been used for ~10 years with no reported side effects. Your child -may experience temporary pain or a bruise at the site of the needle-stick if you take the blood -test. We do not examine any human DNA that may be in the sample so personal information -about your genome will not be obtained All data deposited in a publically accessible repository -is filtered of known human sequence data before being deposited. The investigation personnel -have taken precautions to ensure that there is minimal risk of loss of confidentiality. Should -confidentiality be compromised, the implications to your child are minimal since the results are -not diagnostic and have no implications for insurance companies that could compromise your -child’s insurability.
-(Federal and State laws generally make it illegal for health insurance companies, group health plans, and most -employers to discriminate against you based on your genetic information. This law generally will protect you in the -following ways: a) Health insurance companies and group health plans may not request your genetic information -that we get from this research. b) Health insurance companies and group health plans may not use your genetic -information when making decisions regarding your eligibility or premiums. c) Employers with 5 or more employees -may not use your genetic information that we get from this research when making a decision to hire, promote, or -fire you or when setting the terms of your employment.)
- -Because this is a research study, there may be some unknown risks that are currently -unforeseeable. You will be informed of any significant new findings.
- -What are the alternatives to participating in this study? -The study is entirely voluntary and not allowing your child to participate will have no -consequence.
- -What benefits can be reasonably expected? -There is no direct benefit to your child for participating in this study. The investigator, however, -may learn more about the human microbiome in health and disease and provide a valuable -resource for other researchers in other studies.
- -We will analyze all samples where the consent form and questionnaire is completed. The -samples in the project (including your child’s) will be analyzed and published as a scientific -article. You will get a link to view, download and print high-resolution figures suitable for -framing. The results from the analysis cannot be used by you or your doctor to confirm a -clinical diagnosis and we are not testing for infectious disease. The report you receive will -include identification of rare micro-organisms that are in your sample and in a small percentage -of other participants. This is provided to you for interest only. The techniques we use do not -identify bacteria at a level of identification that can be used to diagnose disease or infer -disease causation. We may be able to detect RNA or DNA from viruses (including SARS-CoV-2 that -causes COVID-19) but this cannot be used as a substitute for a clinical laboratory test.
- -Can you choose to not to have your child participate or withdraw from the study without -penalty or loss of benefits? -Participation in research is entirely voluntary. You may refuse to participate or withdraw at any -time without penalty or loss of benefits to which you are entitled. If you decide that you no -longer wish to continue in this study, you will be requested to contact the American Gut Project -email helpline to inform us of your intent to withdraw. If your sample has not been processed -you may request a refund which will be processed through the site where you contributed to the -project.
- -You will be told if any important new information is found during the course of this study that -may affect your wanting to continue.
- -Can your child be withdrawn from the study without your consent? -Your child may be withdrawn from the study if you do not complete the consent. Your child may -also be withdrawn from the study if you do not follow the instructions given you by the study -personnel.
- -Will you be compensated for participating in this study? -You will not be financially compensated in this study.
- -Are there any costs associated with participating in this study? -After you have signed up for the project and mailed in your sample there will be no costs to you -for participating in the study.
- -What if your child is injured as a direct result of being in this study? -If your child is injured as a direct result of participation in this research, the University of -California will provide any medical care you need to treat those injuries. The University will not -provide any other form of compensation to you if your child is injured. You or your child may -call the Human Research Protections Program Office at 858-246-4777 for more information -about this, to inquire about your rights as a research subject or to report research-related -problems.
- -What about your confidentiality? -Research records will be kept confidential to the extent allowed by law. All data about your child -that is entered on the web site is stored on a password-protected server located at the SDSC (San -Diego Supercomputer Center) biometric feature controlled-entrance facility at UCSD. Financial -information from participants contributing to the project is not accessible to the researchers. The -code key (that relates participant personal information to sample barcodes) is retained on a -separate password-protected server that is accessible only to the PI, Co-I, sample coordinator and -the database coders. All analysis is done on de-identified data and the data deposited in a public -repository for use by other investigators, is similarly de-identified. Research records may be -reviewed by the UCSD Institutional Review Board.
- -You will provide information about yourself that could allow you to be identified if it was made -public e.g. name, age, birthdate, address. We have made every effort to ensure that you cannot -be identified from the data you supply about yourself but retaining critical information like -gender, age without compromising your personal information or the data integrity.
- -We may need to report information about known or reasonably suspected incidents of abuse or -neglect of a child, dependent adult or elder including physical, sexual, emotional, and financial -abuse or neglect. The only way we could discover such abuse is if it is self-reported by the -participant or the legal guardian, so this is not likely. If any investigator has or is given such -information, he or she may report such information to the appropriate authorities.
- -Who can you call if you have questions? -If you have questions or research-related problems, you may reach Rob Knight at 858-246-1184 -or contact Dominic Nguyen at 858-534-8739.
- -You may call the Human Research Protections Program Office at 858-246-4777 -to inquire about your rights as a research subject or to report research-related problems.
- -Your Signature and Consent -You have received a copy of this consent document and a copy of the “Experimental Subject's -Bill of Rights” to keep.
- -You agree to allow your child to participate.
''', - 'PARTICIPATION_AGREEMENT': '''AMERICAN GUT PROJECT
-University of California, San Diego
-PARTICIPATION AGREEMENT
-EXHIBIT A
-AMERICAN GUT PROJECT STATEMENT OF SERVICES
+ 'EXHIBIT_A': '''EXHIBIT A
+THE MICROSETTA INITIATIVE STATEMENT OF SERVICES
The Services will be performed as set forth below or in accordance with the attachment hereto and incorporated by reference herein.
-When you sign up for the study, you may claim a package of research analyses based on your contribution level. You are mailed a kit with sampling instructions, and directions on how to sign into the website to complete the consent form and submit the questionnaire. Any sample that is received in the laboratory without a completed consent form online is not sequenced. You be able to view, download and print a high-resolution certificate suitable for framing of your results and access to more detailed taxa report of your results - which can be viewed online and downloaded into Excel.
-I have accepted this Scope of Work on behalf of UCSD and the responsibility for administering and monitoring the agreement.
-Approximately 8-10 weeks after we have received your sample you will be notified of your results electronically.
-THE MICROSETTA INITIATIVE
+Universidad de California, San Diego
+ACUERDO DE PARTICIPACIÓN
+ANEXO A
+DECLARACIÓN DE SERVICIOS DEL THE MICROSETTA INITIATIVE
+University of California, San Diego
+ Consentimiento de los padres para que su hijo participe como sujeto en una investigación
Proyecto American Gut
+¿Quién realiza el estudio, por qué se le ha pedido a su hijo que participe, cómo se ha seleccionado a su hijo y cuál es la cifra aproximada de participantes en el estudio?
+El Dr. Rob Knight está realizando un estudio para saber más sobre los billones de bacterias y otros organismos (denominados “microbioma”) que viven dentro de su cuerpo y en la superficie de este. Usted ha inscrito voluntariamente a su hijo en este estudio porque quiere saber más sobre su microbioma. Los niños, como los demás seres humanos, tienen un microbioma único. Incluirlos en el estudio ayudará a definir el desarrollo del microbioma. En el estudio participarán unas 100 000 personas de todo EE. UU. y de otros países.
+¿Por qué se está llevando a cabo este estudio?
+El objetivo del estudio es evaluar con mayor precisión las diferencias entre las personas y determinar si dichas diferencias pueden atribuirse al modo de vida, a la dieta, al tipo de constitución corporal, a la edad o a la presencia de enfermedades relacionadas. Los resultados se utilizarán para crear una base de datos que contendrá secuencias y metabolitos de distintas zonas del cuerpo (p. ej., la piel, la boca, el estómago y los intestinos), y detalles del niño participante que provee la muestra. Otros investigadores podrán usar estos datos cuando estén estudiando el mismo tipo de muestra en otros estudios científicos (p. ej., ciertas enfermedades en las que sean comnes las anomalías del estómago y los intestinos).
+¿Qué le sucederá a su hijo durante el estudio, y qué procedimientos forman parte de la atención estándar y cuáles son experimentales?
+Se le pregunta si desea que su hijo participe en este estudio porque usted se registró en el sitio web de American Gut para un análisis microbiológico. Cuando se registró, le enviamos un kit de toma de muestras junto con las instrucciones de inicio de sesión en el sitio web, de modo que pueda dar su consentimiento formal para el estudio.
+Analizaremos todas las muestras para las que se hayan completado el formulario de consentimiento y el cuestionario. Se analizarán las muestras suministradas para el proyecto (incluidas las de su hijo) y los resultados se publicarán en artículos científicos en los que se definirá la diversidad del microbioma humano. Se le enviará un enlace a través del que podrá ver, descargar e imprimir diagramas en alta resolución —aptos para enmarcar— de sus resultados y acceder a un informe detallado sobre los taxones encontrados.
+A través de este consentimiento, queremos que comprenda lo que haremos con la muestra de su hijo y lo que usted obtendrá a cambio.
+Le pediremos que responda un cuestionario en línea sobre el modo de vida y los hábitos alimentarios de su hijo. Calculamos que no deberá llevarle más de 30 minutos. A continuación, tomará una muestra de una parte del cuerpo de su hijo (de interés para usted) con algo semejante a un bastoncillo de algodón estéril frotándolo por la piel o la lengua. También puede tomar una muestra de las heces de una de las siguientes tres formas:
+También puede tomar muestras de otras partes del cuerpo, como el oído, la nariz, la vagina, el cuero cabelludo o la planta del pie.
+Debe enviarnos los bastoncillos o las tarjetas para pruebas de sangre oculta en las heces en el sobre suministrado y a través del servicio regular de correo nacional. Las muestras de heces completas deben enviarse a los laboratorios Knight Lab en el recipiente para envíos suministrado.
+Se extraerá el ADN de la muestra, que se amplificará mediante PCR (reacción en cadena de la polimerasa) y se secuenciará para ver qué bacterias contiene la muestra y en qué proporción. Es posible que utilicemos el resto de la muestra para analizar los metabolitos, como las proteínas, o las sustancias químicas derivadas de las bacterias o para analizar en mayor detalle bacterias específicas que nos resulten de interés. Creemos que tardaremos unos dos meses en conocer los resultados del cálculo inicial de la diversidad bacteriana.
+Los resultados se cargarán en su cuenta de American Gut en cuanto estén disponibles.
+Le pedimos también que nos autorice a utilizar la muestra de su hijo o el ADN no humano extraído de dicha muestra (p. ej., el ADN de las bacterias) en futuros estudios. Además, queremos solicitarle su consentimiento para ponernos en contacto con usted por correo electrónico para solicitar más información como seguimiento a las preguntas sobre su hijo que haya respondido en el cuestionario.
+Atención: La secuenciación no tiene fines diagnósticos y no está dirigida al ADN humano.> +
¿Cuánto tiempo es necesario para realizar cada procedimiento del estudio, cuánto tiempo debe dedicar en total su hijo y cuánto durará el estudio?
+Tardará 30 minutos o menos en responder el cuestionario en línea. Tardará 5 minutos o menos en tomar cada una de las muestras que vaya a suministrar. En principio, el estudio durará 5 años. No obstante, los resultados estarán a su disposición antes de que este termine (por lo general, en un plazo de 2 meses después de que recibamos la muestra). Puede optar por tomar muestras de su hijo en más de una ocasión. Si los datos personales de su hijo (p. ej., su dirección o estado de salud) cambian, le pedimos que vuelva a introducir voluntariamente los datos de contacto y/o las respuestas del cuestionario.
+¿Cuáles son los riesgos relacionados con este estudio?
+Las técnicas de toma de muestras se usan desde hace más o menos 10 años y no se han notificado efectos secundarios al respecto. No examinamos el ADN humano que haya en la muestra, por lo que no obtendremos información personal sobre el genoma. Antes de consignar datos en archivos de acceso público se eliminan todos los datos conocidos de la secuencia humana. El personal del estudio ha tomado precauciones para garantizar que el riesgo de pérdida de la confidencialidad sea mínimo. Si se pusiera en riesgo la confidencialidad, las consecuencias para su hijo serían mínimas, pues los resultados no son diagnósticos y no repercuten en la decisión de las aseguradoras de darle o no cobertura a su hijo.
+(Por lo general, las leyes federales y estatales consideran que es ilegal que las aseguradoras, las aseguradoras para grupos y la mayor parte de los empleadores le discriminen por su información genética. Por norma general, dichas leyes lo protegen de las siguientes formas: a) las aseguradoras y las aseguradoras para grupos no pueden solicitarnos la información genética que obtengamos sobre usted en esta investigación; b) las aseguradoras y las aseguradoras para grupos no pueden usar su información genética para tomar decisiones sobre sus opciones de cobertura o pagos por seguro; c) los empleadores que tengan cinco empleados o más no pueden usar la información genética que obtengamos sobre usted en esta investigación para tomar decisiones de contratación, ascenso o despido ni para definir condiciones laborales.)
+Dado que este es un estudio de investigación, puede haber riesgos desconocidos que no podemos prever. Le informaremos de cualquier novedad importante al respecto.
+¿Cuáles son las alternativas a no participar en este estudio?
+El estudio es completamente voluntario, y si no permite que su hijo participe no tendrá que hacer frente a ninguna consecuencia. No hay pruebas alternativas.
+¿Cuáles beneficios podrían anticiparse razonablemente?
+Su hijo no obtendrá ningún beneficio directo por participar en este estudio. De cualquier modo, el investigador puede obtener más información sobre el microbioma humano en situaciones de buena salud y de enfermedad, lo que podría resultar valioso para los investigadores de otros estudios.
+¿Puede decidir que su hijo no participe o se retire del estudio sin recibir sanciones ni perder beneficios?
+Ni usted ni su hijo obtendrán ningún beneficio directo por participar en este estudio. Creemos que tal vez sienta curiosidad natural por saber qué bacterias contiene su muestra cómo es en comparación con las muestras de otras personas del mismo sexo y edad. De cualquier modo, el investigador obtendrá más información sobre el microbioma humano en situaciones de buena salud y de enfermedad, lo que podría resultar valioso para los investigadores de otros estudios. Tal vez pueda deducir de sus impuestos la contribución al proyecto. Fundrazr, que se encarga de todas las contribuciones financieras, le enviará un recibo.
+Analizaremos todas las muestras para las que se hayan completado el formulario de consentimiento y el cuestionario. Se analizarán las muestras del proyecto (incluidas las de su hijo) y los resultados se publicarán en un artículo científico. Se le enviará un enlace a través del que podrá ver, descargar e imprimir diagramas en alta resolución de sus resultados, aptos para enmarcar, y acceder a un informe detallado sobre los taxones encontrados.
+Ni usted ni su médico pueden utilizar los resultados del análisis para confirmar diagnósticos clínicos; no realizamos pruebas de detección de enfermedades infecciosas.
+¿Se puede retirar a su hijo del estudio sin su consentimiento?
+La participación en el estudio es completamente voluntaria. Puede negarse a que su hijo participe o hacer que su hijo se retire del estudio en cualquier momento, sin tener que recibir sanciones ni perder los beneficios que le correspondan. Si decide que no desea que su hijo siga participando en el estudio, se le pedirá que se comunique a la línea de asistencia del proyecto American Gut para comunicarnos su intención de que el niño abandone el estudio. Si no se ha procesado la muestra, puede solicitar un reembolso, que se tramitará en el sitio mediante el que realizó su contribución al proyecto.
+Se le notificará cualquier información importante obtenida durante el transcurso del estudio y que pueda afectar a su voluntad de que su hijo siga participando.
+¿Se le pagará por participar en este estudio?
+No recibirá ninguna remuneración económica por participar en este estudio.
+¿Hay algún gasto vinculado con la participación en el estudio?
+Una vez que se haya inscrito en el proyecto y haya enviado por correo su muestra, no tendrá que pagar nada por participar en el estudio.
+¿Qué sucede si su hijo sufre una lesión como consecuencia directa del estudio?
+Si su hijo sufre una lesión como consecuencia directa de su participación en este estudio, la Universidad de California le prestará toda la atención médica necesaria para su tratamiento. Esta universidad no ofrecerá ningún otro tipo de indemnización a su hijo por lesiones. Para saber más sobre este tema, usted o su hijo pueden llamar a la oficina del Programa de protección para investigaciones con seres humanos al 858-246-4777 para consultar sobre sus derechos como sujeto de investigación o denunciar problemas relacionados con el estudio.
+¿Y la confidencialidad?
+Se protegerá la confidencialidad de los registros de la investigación en la medida que lo permita la ley. Todos los datos sobre su hijo que se introduzcan en el sitio web se guardarán en un servidor protegido por contraseña ubicado en el SDSC (San Diego Supercomputer Center), que se encuentra en la UCSD y cuenta con acceso controlado por características biométricas. Los datos financieros de los participantes que contribuyan al proyecto no se pondrán a disposición de los investigadores. El código (que vincula los datos personales del participante con los códigos de barras de las muestras) se guarda en otro servidor protegido por contraseña, al que solo pueden acceder el investigador principal, el investigador secundario, el coordinador de las muestras y los programadores de la base de datos. Todos los análisis se realizan con datos anonimizados; los datos que se consignan en archivos públicos para uso de otros investigadores también se anonimizan. La Junta de Revisión Institucional de la UCSD podrá revisar los registros del estudio.
+Tendrá que presentar datos a través de los que se le podría identificar si se publicaran, como su nombre, su edad, su fecha de nacimiento y su dirección. Hemos hecho todo lo posible para garantizar que nadie pueda identificarle a partir de los datos personales que suministre, pero conservamos información fundamental, como su sexo y su edad, sin poner en riesgo sus datos personales ni la integridad de estos.
+Es posible que debamos denunciar incidentes confirmados o sospechas razonables de maltrato o abandono de niños, adultos dependientes o personas mayores, incluidos el maltrato físico o emocional, el abuso sexual o económico y el abandono. El único modo en que podríamos descubrir dicho maltrato es que lo denuncie el propio participante o su tutor legal, por lo que no es probable que suceda. Si los investigadores se percatan de este tipo de información, podrán denunciarla ante las autoridades pertinentes.
+¿A quién puede llamar si tiene alguna duda?
+Si tiene alguna duda o problemas relacionados con la investigación, puede llamar a Rob Knight al 858-246-1184 o a Dominic Nguyen al 858-534-8739.
+Puede llamar a la oficina del Programa de protección para investigaciones con seres humanos al 858-246-4777 para consultar acerca de sus derechos como sujeto de investigación o denunciar cualquier problema relacionado con el estudio.
+Firma y consentimiento
+Ha recibido una copia de este documento de consentimiento y una copia de la “Declaración de derechos del sujeto experimental”, para que las conserve.
+Autoriza a su hijo a participar.
''', + 'CONSENT_18': ''' +University of California, San Diego
+ Consentimiento para participar como sujeto de investigación
The Microsetta Initiative
+
+ ¿Quién realiza el estudio, por qué se le ha pedido que participe, cómo fue seleccionado y cuál es la cifra aproximada de participantes en el estudio?
+ El Dr. Rob Knight está realizando un estudio de investigación para saber más sobre los trillones de bacterias y otros microorganismos (denominados “microbioma”) que viven dentro de su cuerpo y en su superficie. Estos incluyen eucariotas como hongos y parásitos, procariotas como bacteria y arqueas y virus. Le hemos pedido que participe en este estudio porque posee un microbioma único, distinto al del resto del mundo. En el estudio participarán unas 100 000 personas de todos los EE. UU. y de otros países alrededor del mundo.
+
+ ¿Por qué se está llevando a cabo este estudio?
+ El objetivo del estudio es evaluar con mayor precisión las diferencias entre las personas y determinar si dichas diferencias pueden atribuirse al estilo de vida, a la dieta, al tipo de constitución corporal, a la edad o a la presencia de enfermedades relacionadas. Los resultados se utilizarán para crear una base de datos que contendrá secuencias y metabolitos de distintas partes del cuerpo (p. ej., la piel, la boca, el intestino, la sangre), así como detalles de los participantes que provean las muestras. Luego, los investigadores podrán usar estos datos mientras estudian temas relevantes, como las condiciones de salud relacionadas con el intestino.
+
+ ¿Qué le sucederá durante el estudio?
+ Si acepta participar en este estudio, le ocurrirá lo siguiente:
+ Usted ha recibido o recibirá un kit de muestra. El kit contiene instrumentos utilizados para recolectar muestras e instrucciones de uso. El instrumento de recolección también puede incluir etanol al 95% para preservar la muestra y hacerla no infecciosa.
+ Le pediremos que complete un cuestionario en línea sobre usted (p. ej., edad, peso, altura), su estilo de vida, y sus hábitos alimentarios. También hay otros cuestionarios que se centran más en algún tema en específico, que puede elegir completarlos si se aplican a usted. Estos pueden incluir preguntas relacionadas con los siguientes temas, entre otros: COVID-19, trastorno del espectro autista, migrañas, surf, consumo de alimentos fermentados, consumo de alimentos que contienen polifenoles. Usted puede completarlos si son aplicables y si desea proporcionar información adicional que pueda ayudar a nuestra investigación.
+ Después, usted recolectará una muestra suya (p. ej., heces, piel, boca, orificio nasal, oído, vagina), mascota o entorno, tal como se describe en las instrucciones del kit o en las instrucciones que le proporcionaron los coordinadores del estudio. Si recolecta una muestra de heces, se le pedirá que tome una muestra de una de las diferentes formas, como las siguientes:
+
++ Si recibió un kit de recolección de sangre, este contiene materiales e instrucciones sobre cómo recolectar una muestra de sangre en casa. Es similar a la prueba que se usa para medir los niveles de glucosa pinchando el dedo.+
+- Insertando las puntas del hisopo en papel higiénico usado y devolviendo la muestra en el recipiente de plástico suministrado;
+- Insertando las puntas del hisopo en el papel higiénico usado y pasando las puntas por la superficie de una tarjeta para pruebas de sangre oculta en heces, y luego devuélvanos la tarjeta. La tarjeta para pruebas de sangre oculta en heces es el mismo instrumento que usa su médico para verificar si hay sangre en sus heces. La tarjeta para pruebas de sangre oculta en heces permite estabilizar las heces para su posterior análisis. No verificaremos si hay sangre en las heces con fines diagnósticos, puesto que no somos un laboratorio clínico;
+- Usando el instrumento de cuchara para recoger una parte de la materia fecal en el tubo suministrado;
+- Depositando papel higiénico sucio en el receptáculo suministrado;
+- Enviando una muestra completa de heces en el recipiente de envío que le suministraremos. Dicho recipiente contiene una serie de compresas de hielo que enfriarán la muestra de manera fiable a -20 °C/-4 °F.
+
+ ¿Cuánto tiempo es necesario para realizar cada procedimiento del estudio, cuánto tiempo debe dedicar en total y cuánto durará el estudio?
+ Tardará de 30 a 45 minutos o menos para responder el cuestionario principal en línea. Cada encuesta adicional le puede tomar hasta 30 minutos completarla. Tardará 5 min o menos en tomar cada una de las muestras que vaya a suministrar. Esperamos que el estudio continúe durante muchos años, pero sus resultados estarán a su disposición antes de que el estudio termine (generalmente dentro de unos meses después de que recibamos la muestra).
+
+ ¿Cuáles son los riesgos relacionados con este estudio?
+ La participación en este estudio puede implicar algunos riesgos o molestias adicionales. Estos incluyen los siguientes:
+
++ Dado a que este es un estudio de investigación, puede haber algunos riesgos desconocidos que no podemos prever. Le informaremos de cualquier novedad importante al respecto. + ++
+- Mientras responde las encuestas, usted puede sentir frustración, incomodidad emocional, fatiga y/o aburrimiento.
+- Si utiliza el dispositivo de extracción de sangre, es posible que experimente un dolor temporal o un hematoma en el lugar del pinchazo de la aguja.
+- Existe el riesgo de pérdida de confidencialidad.
+
+ ¿Cuáles son las alternativas a no participar en este estudio?
+ Usted no tiene que participar.
+
+ ¿Cuáles podrían ser los beneficios de participar?
+ No hay ningún beneficio monetario o directo por participar en este estudio. Usted recibirá un informe que detalla los resultados de nuestro análisis en su muestra, así como datos y cifras que comparan la composición de su microbioma con la de otros participantes del estudio.
+
+ ¿Puede decidir no participar o retirarse del estudio sin recibir sanciones ni perder beneficios?
+ La participación en el estudio es completamente voluntaria. Puede negarse a participar o retirarse del estudio en cualquier momento, sin tener que recibir sanciones ni perder los beneficios que le correspondan. Si decide que no desea seguir participando en el estudio, usted puede retirar su consentimiento solicitando la eliminación de su fuente y/o cuenta en línea. Se le notificará cualquier información importante obtenida durante el transcurso del estudio y que pueda afectar a su deseo de seguir participando.
+
+ ¿Se le puede retirar del estudio sin que usted dé su consentimiento?
+ Es posible que se le retire del estudio si no sigue las instrucciones que le dé el personal del estudio.
+
+ ¿Se le pagará por participar en este estudio?
+ No recibirá ninguna remuneración económica por participar en este estudio.
+
+ ¿Hay algún gasto vinculado con la participación en el estudio?
+ Una vez que se haya inscrito en el proyecto y haya enviado por correo su muestra, no tendrá que pagar nada por participar en el estudio.
+
+ ¿Qué sucede si sufre una lesión como consecuencia directa del estudio?
+ Si sufre una lesión como consecuencia directa de su participación en este estudio, la Universidad de California le prestará la atención médica necesaria para el tratamiento de esas lesiones. Esta universidad no le ofrecerá ningún otro tipo de indemnización por lesiones. Para saber más sobre este tema, llame a la oficina del Programa de protección para investigaciones con seres humanos al (858) 246-4777 para consultar acerca de sus derechos como sujeto de investigación o denunciar cualquier problema relacionado con el estudio.
+
+ ¿Y su confidencialidad?
+ Se protegerá la confidencialidad de los registros de la investigación en la medida que lo permita la ley. Como parte de su participación en el estudio, usted proporcionará información personal y/o confidencial que podría permitir su identificación si se hiciera pública, como nombre, fecha de nacimiento o dirección. Nosotros tomamos todas las precauciones para proteger su identidad. Toda la información proporcionada se almacena en sistemas seguros dentro de la infraestructura de UC San Diego y la información de identificación directa sólo es accesible para el personal de investigación crítico. El código (que vincula los datos personales del participante con los códigos de barras de la muestras) se guarda en otro servidor protegido con contraseña, al que solo pueden acceder el personal pertinente, como el Dr. Knight, los coinvestigadores, los coordinadores de proyectos y muestras, el administrador de TI y los programadores de la base de datos. El análisis de muestras se realiza utilizando datos de los que se ha eliminado la información de identificación directa, y todos los datos compartidos con los repositorios públicos también se someten a este tratamiento. Los registros de investigación pueden ser revisados por la Junta de Revisión Institucional de UC San Diego.
+ Es posible que debamos denunciar incidentes confirmados o sospechas razonables de maltrato o abandono de niños, adultos dependientes o personas mayores, incluidos el maltrato físico o emocional, el abuso sexual o economico y el abandono. Si los investigadores se percatan de este tipo de información, podrán denunciarla ante las autoridades pertinentes.
+ Por lo general, las leyes federales y estatales consideran que es ilegal que las aseguradoras, las aseguradoras para grupos y la mayor parte de los empleadores le discriminen por su información genética. Por norma general, dichas leyes lo protegen de las siguientes formas: a) las aseguradoras y las aseguradoras para grupos no pueden solicitarnos la información genética que obtengamos sobre usted en esta investigación; b) las aseguradoras y las aseguradoras para grupos no pueden usar su información genética para tomar decisiones sobre sus opciones de cobertura o pagos por seguro; c) los empleadores que tengan cinco empleados o más no pueden usar la información genética que obtengamos sobre usted en esta investigación para tomar decisiones de contratación, ascenso o despido ni para definir condiciones laborales.
+ Tenga en cuenta que estas leyes no lo protegen contra la discriminación genética por parte de compañías que venden seguros de vida, seguros por discapacidad o seguros de atención a largo plazo.)
+
+ Conozca lo que recopilaremos
+ Como parte de este estudio de investigación, nosotros crearemos y obtendremos información relacionada a usted y su participación en el estudio de usted o de colaboradores para que podamos realizar esta investigación de manera adecuada. Los datos del estudio de investigación incluirán: información de contacto, información demográfica, experiencias personales, preferencias de estilo de vida, información de salud, fecha de nacimiento, opiniones o creencias.
+
+ Cómo usaremos su Muestra
+ Usaremos la muestra que nos proporcione para estudiar el ADN no humano (por ejemplo, ADN de las bacterias) que contiene. Es posible que guardemos parte de su muestra para que los investigadores puedan acceder a ella y puedan realizar estudios adicionales utilizando los otros compuestos de la misma, como el ARN, proteínas, o metabolitos. Es posible que nos comuniquemos con usted si necesitamos más información o alguna acción adicional para procesar su(s) muestra(s) y/o para fines de reconsentimiento.
+
+ Cómo utilizaremos sus datos personales
+ Los Datos Personales que nos proporcione serán utilizados para las siguientes finalidades:
+
+ Retención de sus Datos Personales
+ Es posible que retengamos sus Datos Personales durante el tiempo que sea necesario para cumplir con los objetivos de la investigación y garantizar la integridad de la investigación. Eliminaremos sus Datos Personales cuando ya no sean necesarios para el estudio o si usted retira su consentimiento proporcionado, siempre que dicha eliminación no imposibilite o perjudique gravemente el logro de los objetivos del proyecto de investigación. Sin embargo, su información se conservará según sea necesario para cumplir con los requisitos legales o reglamentarios.
+
+ Sus derechos de privacidad
+ El Reglamento General de Protección de Datos ("RGPD") requiere que los investigadores le proporcionen información a usted cuando recopilamos y usamos datos de investigación si usted se encuentra dentro de la Unión Europea (UE) o el Espacio Económico Europeo (EEE). El RGPD le otorga derechos relacionados con sus Datos Personales, incluido el derecho a acceder, corregir, restringir y retirar su información personal.
+ El equipo de investigación almacenará y procesará sus Datos Personales en nuestro sitio de investigación en los Estados Unidos. Los Estados Unidos no tienen las mismas leyes para proteger sus Datos Personales que los países de la UE/EEE. Sin embargo, el equipo de investigación se compromete a proteger la confidencialidad de sus Datos del Estudio. En este documento de consentimiento se incluye información adicional sobre las protecciones que utilizaremos.
+
+ ¿A quién puede llamar si tiene alguna duda?
+ Si tiene alguna duda o problemas relacionados con la investigación, puede llamar a Rob Knight al 858-246-1184 o enviar un correo electrónico a nuestra cuenta de asistencia: microsetta@ucsd.edu.
+ Puede llamar a la oficina del Programa de protección para investigaciones con seres humanos al 858-246-4777 para consultar acerca de sus derechos como sujeto de investigación o denunciar cualquier problema relacionado con el estudio.
+ Si tiene preguntas o quejas sobre nuestro tratamiento de sus Datos Personales, o sobre nuestras prácticas de privacidad en general, no dude en comunicarse con el Funcionario de Privacidad de UC San Diego por correo electrónico a ucsdprivacy@ucsd.edu.
+
+ Firma y Consentimiento
+ Usted puede descargar una copia de este documento de consentimiento y una copia de la "Declaración de derechos del sujeto experimental" para que las conserve.
+ Su consentimiento es completamente voluntario, pero negarse a proveerlo puede impedir materialmente su capacidad para participar en esta investigación y recibir un kit.
+
+ ''', + 'ASSENT_13_17': ''' +
+ University of California, San Diego
+ Asentimiento para participar como sujeto de investigación
+ (de 13 a 17 años)
+
+ Proyecto American Gut +
+¿Quién realiza el estudio, por qué se te ha pedido que participes, cómo se te ha seleccionado y cuál es la cifra aproximada de participantes en el estudio?
+El Profesor Rob Knight está llevando a cabo un estudio para saber más sobre el microbioma (microorganismos [seres vivos diminutos, como bacterias] inofensivos o inocuos que viven dentro de tu cuerpo y en la superficie de este). Te hemos invitado a participar en este estudio porque como el resto de los habitantes de este planeta, tú tienes un microbioma único, y mientras más personas de todas las edades estudiemos, mejor podremos comprender cómo nos ayudan o nos perjudican los microorganismos. En el estudio participarán unas 100 000 personas.
+¿Por qué se realiza este estudio?
+El objetivo del estudio es evaluar con mayor precisión las diferencias entre las personas y determinar si dichas diferencias pueden atribuirse al modo de vida, a la dieta, al tipo constitucional, a la edad o a la presencia de enfermedades relacionadas. Los resultados se utilizarán para crear una base de datos que contendrá secuencias y metabolitos de distintas zonas del cuerpo (p. ej., la piel, la boca o el estómago y los intestinos), y detalles acerca de ti (el participante que provee la muestra) que otros investigadores podrán usar cuando necesiten muestras para compararlas con lo que ellos estén estudiando, p. ej., ciertas enfermedades en las que las anomalías estomacales son comunes.
+¿Qué te sucederá durante estudio y qué procedimientos son de referencia y cuáles son experimentales?
+Cuando hayas dado tu consentimiento para participar en el estudio, tendrás que completar un cuestionario en línea en el que responderás a preguntas sobre tu cuerpo, edad, peso, estatura y hábitos alimentarios, así como si has tomado antibióticos, si tienes determinadas enfermedades o si tomas suplementos, como vitaminas. A continuación, tendrás que tomar una muestra de tu cuerpo con el bastoncillo que se suministra con el kit del proyecto American Gut (sobre el estómago y los intestinos de los estadounidenses). En el sobre encontrarás unas instrucciones que te indicarán qué debes hacer. La muestra más común es de material fecal (heces). Para tomarla, inserta las puntas del bastoncillo en papel higiénico usado o pasa las puntas por la superficie de la tarjeta (la tarjeta para pruebas de sangre oculta en las heces). También puedes tomar la muestra de cualquier zona de la piel, de la lengua o la boca, de las fosas nasales, de la cera de los oídos o de la vagina. Puede que se te pida que deposites materia fecal en un recipiente de plástico, que debes colocar debajo de la taza del inodoro. Ninguna de estas muestras o investigaciones nos permitirán diagnosticar enfermedades. Tampoco examinaremos nada en tu propio ADN que también pueda encontrarse en la materia fecal, o en la piel o la saliva. Puede que deseemos ponernos en contacto contigo para hacerte más preguntas acerca de la información que tú o tu mamá/papá/tutor hayan suministrado en el cuestionario.
+¿Cuánto tiempo es necesario para realizar los procedimientos del estudio, cuánto tiempo debes dedicar en total y cuánto durará el estudio?
+Tardarás 30 minutos o menos para responder el cuestionario en línea. Tardarás 5 minutos o menos en tomar cada una de las muestras que vayas a suministrar. En principio, el estudio durará 5 años. No obstante, los resultados estarán a tu disposición antes de que este termine (por lo general, en un plazo de 2 meses después de que recibamos la muestra). Puedes optar por tomar muestras en más de una ocasión. Si tus datos personales (p. ej., tu dirección o estado de salud) cambian, te pedimos que vuelvas a introducir voluntariamente tus datos de contacto o las respuestas del cuestionario para que podamos hacer un seguimiento contigo.
+¿Cuáles son los riesgos relacionados con este estudio?
+Las técnicas de toma de muestras se usan desde hace unos 5 años y no se han notificado efectos secundarios al respecto. No examinaremos tu información genética personal y la información que divulguemos en archivos de datos públicos no contendrá información genética humana, puesto que dicha información se habrá eliminado previamente. El personal del estudio ha tomado precauciones para garantizar que el riesgo de filtración de tus datos personales sea mínimo. Si se publicaran tus datos, las consecuencias serían mínimas, puesto que las pruebas no pueden usarse para elaborar diagnósticos. $(20)s
+¿Cuáles son las alternativas a no participar en este estudio?
+No estás obligado a participar. No tendrás que hacer frente a ninguna consecuencia.
+¿Cuáles beneficios podrían anticiparse razonablemente?
+No obtendrás ningún beneficio directo por participar en este estudio. El investigador publicará un artículo científico para describir lo que encuentre en las muestras del estudio, incluida la tuya, pero no de forma tal que se pueda saber que habla de tu muestra. Los resultados serán muy valiosos para los investigadores de otros estudios. Se te enviará un enlace a través del cual podrás acceder a tus datos. De este modo, tanto tú como tus padres sabran qué hay en tu muestra en comparación con las muestras de otras personas similares a ti (del mismo sexo y edad).
+¿Puedes decidir no participar o retirarte del estudio sin recibir sanciones ni perder beneficios?
+La participación en el estudio es completamente voluntaria. Puedes negarte a participar o retirarte del estudio en cualquier momento, sin tener que recibir sanciones ni perder los beneficios que te correspondan. Si decides que no deseas seguir participando en el estudio, se te pedirá que envíes un mensaje a la dirección de correo electrónico del proyecto American Gut para comunicarnos tu intención de abandonar el estudio. Se te notificará cualquier información importante obtenida durante el transcurso del estudio y que pueda afectar a tu voluntad para seguir participando.
+¿Se te puede retirar del estudio sin tu consentimiento?
+Es posible que se te retire del estudio si no completas el formulario de consentimiento. También se te podría retirar si no sigues las instrucciones que te suministre el personal del estudio.
+¿Se te pagará por participar en este estudio?
+No recibirás ninguna remuneración económica por participar en este estudio.
+¿Qué sucede si te lesionas como consecuencia directa del estudio?
+Si sufres una lesión o te enfermas como consecuencia directa de este estudio, se te prestará la atención médica que necesites.
+¿Y la confidencialidad?
+Se protegerá la confidencialidad de los registros de la investigación en la medida que lo permita la ley. Todos los datos que se introduzcan en el sitio web se guardarán en un servidor protegido por contraseña ubicado en el SDSC (San Diego Supercomputer Center), que se encuentra en la UCSD y cuenta con acceso controlado por características biométricas. El código (que indica qué código barras se colocó en tu muestra) se guarda en otro servidor protegido por contraseña, al que solo pueden acceder el prof. Knight, el coordinador de las muestras y los programadores de la base de datos. Los datos que se usan en los análisis no indican quién eres. Guardaremos tus datos en un lugar al que podrán acceder otros investigadores, pero no podrán determinar de ningún modo quién eres a partir de dichos datos; no publicaremos, por ejemplo, tu dirección. La Junta de Revisión Institucional de la UCSD podrá revisar los registros del estudio.
+¿A quién puedes llamar si tienes alguna duda?
+Si tienes alguna duda o problemas relacionados con la investigación, puedes llamar a Rob Knight al 858-246-1184 o a Dominic Nguyen al 858-534-8739.
+Puedes llamar a la oficina del Programa de protección para investigaciones con seres humanos al 858-246-4777 para consultar sobre tus derechos como sujeto de investigación o denunciar problemas relacionados con el estudio.
+Firma y asentimiento
+Has recibido una copia de esta hoja de asentimiento y una copia de la “Declaración de derechos del sujeto experimental”, que deberás guardar.
+Aceptas participar.
''', + 'ASSENT_7_12': ''' +
+ University of California, San Diego
+ Asentimiento para participar como sujeto de investigación
+ (de 7 a 12 años)
+
+ Proyecto Gut +
+El Profesor Rob Knight y su equipo de investigación están realizando un estudio para saber más sobre los billones de diminutos seres vivos, como las bacterias, que viven dentro de tu cuerpo o en la superficie de este. Te preguntan si deseas participar en este estudio porque eres diferente (en buen sentido) de todos los demás, del mismo modo que el resto de las personas son diferentes entre sí.
+Si decides participar en este estudio, esto es lo que sucederá:
+Les pediremos a ti, a tu mamá o a tu papá que tomen una muestra de alguna parte de tu cuerpo (como la piel o la boca) o de tu materia fecal (tomándola del papel higiénico) con un objeto parecido a dos bastoncillos de algodón. A veces necesitamos más materia fecal, por lo que quizá te pidamos que evacúes en un tazón de plástico que se coloca debajo de la silla del inodoro y recibe la materia fecal. Tu mamá o tu papá nos enviará la materia fecal en el tazón.
+A veces los niños no se sienten bien mientras participan en este estudio. Podrías sentir un poco de dolor en el lugar de la piel que se frota con el bastoncillo de algodón. La mayor parte de las personas no sienten este dolor.
+Si sientes algo así o cualquier otra cosa, no dejes de decírselo a tu mamá o a tu papá.
+No es necesario que participes en este estudio de investigación si no quieres. Nadie se molestará contigo si dices que no. Incluso si ahora dices que sí y cambias de opinión después de empezar a participar, podrás retirarte del estudio y nadie se molestará.
+No dejes de hablar con tus padres si tienes alguna duda. Si no te explican bien lo que quieras saber, puedes llamar a Dominic Nguyen para pedirle más información. Su número de teléfono es el 858-534-8739. También hay un sitio web en Internet en que se explican las cosas: .https://www.americangut.org
''', +} diff --git a/microsetta_private_api/LEGACY/locale_data/spanish_gut.py b/microsetta_private_api/LEGACY/locale_data/spanish_gut.py index ecfbbfd28..ea4e58060 100644 --- a/microsetta_private_api/LEGACY/locale_data/spanish_gut.py +++ b/microsetta_private_api/LEGACY/locale_data/spanish_gut.py @@ -1,3 +1,6 @@ +# NOTE: CONSENT_YOUR_CHILD, ASSENT_7_12, and ASSENT_13_17 are NOT up to date. +# Those documents MUST be translated and implemented before allowing Spanish-speaking participants under the age of 18. + media_locale = {} _NEW_PARTICIPANT = { @@ -8,58 +11,59 @@ 'AGE_13_17': '13-17 años', 'AGE_18': '18+ años', - 'PARTICIPATION_AGREEMENT': '''AMERICAN GUT PROJECT
-The Microsetta Initiative
-University of California, San Diego
ACUERDO DE PARTICIPACIÓN
-THE MICROSETTA INITIATIVE
+Universidad de California, San Diego
+ACUERDO DE PARTICIPACIÓN
+ANEXO A
-DECLARACIÓN DE SERVICIOS DEL PROYECTO AMERICAN GUT
+ 'EXHIBIT_A': '''ANEXO A
+DECLARACIÓN DE SERVICIOS DEL THE MICROSETTA INITIATIVE
Los Servicios se realizarán como se establece a continuación o de acuerdo con el anexo del presente y se incorporarán por referencia en este documento.
-Cuando se inscribe en el estudio, puede reclamar un paquete de análisis de investigación basados en su nivel de contribución. Se le envía por correo un kit con instrucciones de muestreo e instrucciones sobre cómo iniciar una sesión en el sitio web para completar el formulario de consentimiento y enviar el cuestionario. Cualquier muestra que se reciba en el laboratorio sin un formulario de consentimiento completado en línea no se secuencia. Usted será capaz de ver, descargar e imprimir un certificado de alta resolución adecuado para el enmarcado de sus resultados y el acceso a un informe de taxones más detallado de sus resultados - que se puede ver en línea y descargar en Excel.
-He aceptado esta descripción de trabajo en nombre de UCSD y la responsabilidad de administrar y supervisar el acuerdo.
-Aproximadamente 8-10 semanas después de haber recibido su muestra, se le notificará de sus resultados electrónicamente.
-Ha recibido una copia de este documento de consentimiento y una copia de la “Declaración de derechos del sujeto experimental”, para que las conserve.
Autoriza a su hijo a participar.
''', 'CONSENT_18': ''' -University of California, San Diego
+
University of California, San Diego
Consentimiento para participar como sujeto de investigación
Proyecto American Gut
-¿Quién realiza el estudio, por qué se le ha pedido que participe, cómo fue seleccionado y cuál es la cifra aproximada de participantes en el estudio?
-El Dr. Rob Knight está realizando un estudio de investigación para saber más sobre los billones de bacterias y otros organismos (denominados “microbioma”) que viven dentro de su cuerpo y en su superficie. Le hemos pedido que participe en este estudio porque posee un microbioma único, distinto al del resto del mundo. En el estudio participarán unas 100 000 personas de todos los EE. UU. y otros países.
-¿Por qué se está llevando a cabo este estudio?
-El objetivo del estudio es evaluar con mayor precisión las diferencias entre las personas y determinar si dichas diferencias pueden atribuirse al modo de vida, a la dieta, al tipo de constitución corporal, a la edad o a la presencia de enfermedades relacionadas. Los resultados se utilizarán para crear una base de datos que contendrá secuencias y metabolitos de distintas zonas del cuerpo (p. ej., la piel, la boca o el estómago), así como detalles de los participantes que provean las muestras que otros investigadores podrán usar cuando necesiten muestras para compararlas al estudiar el mismo tipo de muestra en otros estudios científicos, p. ej., ciertas enfermedades en las que sean comunes las anomalías del estómago y los intestinos.
-¿Qué le sucederá durante el estudio?
-Se le ha pedido que participe en este estudio porque se registró en el sitio web de American Gut (estudio sobre el estómago y los intestinos de los estadounidenses) para un análisis microbiológico. Cuando se registró, le enviamos un kit de toma de muestras junto con las instrucciones de inicio de sesión en el sitio web, de modo que pueda dar su consentimiento formal para participar en el estudio.
-Analizaremos todas las muestras para las que se hayan completado el formulario de consentimiento y el cuestionario. Se analizarán las muestras suministradas para el proyecto (incluidas las suyas) y los resultados se publicarán en artículos científicos en los que se definirá la diversidad del microbioma humano. Se le enviará un enlace a través del que podrá ver, descargar e imprimir diagramas en alta resolución de sus resultados —aptos para enmarcar— y acceder a un informe más detallado sobre los taxones encontrados. A través de este consentimiento queremos que comprenda lo que haremos con la muestra y lo que usted obtendrá a cambio.
-Le pediremos que complete un cuestionario en línea sobre su modo de vida y sus hábitos alimentarios. Calculamos que no deberá llevarle más de 30 minutos. A continuación, le pediremos que tome una muestra de una parte de su cuerpo (de interés para usted) con algo semejante a un bastoncillo de algodón estéril frotándolo por la piel o la lengua. También puede tomar una muestra de sus heces de una de las siguientes tres formas:
-También puede tomar muestras de otras partes del cuerpo, como el oído, la nariz, la vagina, el cuero cabelludo o la planta del pie.
-Debe enviarnos los bastoncillos o las tarjetas para pruebas de sangre oculta en las heces en el sobre suministrado a través del servicio regular de correo nacional. Las muestras de heces completas deben enviarse al laboratorio Knight Lab en el recipiente para envíos suministrado.
-Se extraerá el ADN de la muestra, y este se amplificará mediante PCR (reacción en cadena de la polimerasa) y se secuenciará para ver qué bacterias contiene la muestra y en qué proporción. Es posible que utilicemos el resto de la muestra para analizar los metabolitos, como las proteínas, o las sustancias químicas derivadas de las bacterias o para tratar de detectar bacterias específicas que nos resulten de interés. Creemos que pasarán dos meses para que usted conozca los resultados del cálculo inicial de la diversidad bacteriana.
-Los resultados se cargarán en su cuenta de American Gut en cuanto estén disponibles.
-Queremos también que nos autorice a utilizar la muestra suministrada o el ADN no humano extraído de dicha muestra (p. ej., el ADN de las bacterias) en futuros estudios. Además, queremos solicitarle su consentimiento para ponernos en contacto con usted por correo electrónico a fin de pedirle más información como seguimiento a las preguntas que haya respondido en el cuestionario.
-Atención: La secuenciación no tiene fines diagnósticos y no está dirigida al ADN humano.
-¿Cuánto tiempo es necesario para realizar cada procedimiento del estudio, cuánto tiempo debe dedicar en total y cuánto durará el estudio?
-Tardará 30 minutos o menos para responder el cuestionario en línea. Tardará 5 minutos o menos en tomar cada una de las muestras que vaya a suministrar. Anticipamos que el estudio dure cinco años. No obstante, los resultados estarán a su disposición antes de que el estudio termine (por lo general, en un plazo de 2 meses después de que recibamos la muestra). Puede optar por tomar muestras en más de una ocasión. Si sus datos personales (p. ej., su dirección o estado de salud) cambian, le pedimos que vuelva a introducir voluntariamente sus datos de contacto y/o las respuestas del cuestionario.
-¿Cuáles son los riesgos relacionados con este estudio?
-Las técnicas de toma de muestras se usan desde hace más o menos 10 años, y no se han notificado efectos secundarios al respecto. No examinamos el ADN humano que haya en la muestra, por lo que no obtendremos información personal sobre su genoma. Antes de consignar datos en archivos de acceso público se eliminan todos los datos conocidos de la secuencia humana. El personal del estudio ha tomado precauciones para garantizar que el riesgo de pérdida de la confidencialidad sea mínimo. Si se pusiera en riesgo la confidencialidad, las consecuencias para usted serían mínimas, pues los resultados no son diagnósticos y no repercuten en la decisión de las aseguradoras de darle o no cobertura. (Por lo general, las leyes federales y estatales consideran que es ilegal que las aseguradoras, las aseguradoras para grupos y la mayor parte de los empleadores le discriminen por su información genética. Por norma general, dichas leyes lo protegen de las siguientes formas: a) las aseguradoras y las aseguradoras para grupos no pueden solicitarnos la información genética que obtengamos sobre usted en esta investigación; b) las aseguradoras y las aseguradoras para grupos no pueden usar su información genética para tomar decisiones sobre sus opciones de cobertura o pagos por seguro; c) los empleadores que tengan cinco empleados o más no pueden usar la información genética que obtengamos sobre usted en esta investigación para tomar decisiones de contratación, ascenso o despido ni para definir condiciones laborales.)
-Dado que este es un estudio de investigación, puede haber riesgos desconocidos que no podemos prever. Le informaremos de cualquier novedad importante al respecto.
-¿Cuáles son las alternativas a no participar en este estudio?
-El estudio es completamente voluntario y si no participa, no tendrá que hacer frente a ninguna consecuencia. No hay pruebas alternativas.
-¿Cuáles podrían ser los beneficios de participar?
-No obtendrá ningún beneficio directo por participar en este estudio. Creemos que tal vez sienta curiosidad natural por saber qué microbios contiene su muestra y cómo es en comparación con las muestras de otras personas del mismo sexo y edad. De cualquier modo, el investigador obtendrá más información sobre el microbioma humano en situaciones de buena salud y de enfermedad, lo que podría resultar valioso para los investigadores de otros estudios. Tal vez pueda deducir de sus impuestos la contribución al proyecto. Fundrazr, que se encarga de todas las contribuciones financieras, le enviará un recibo.
-Analizaremos todas las muestras para las que se hayan completado el formulario de consentimiento y el cuestionario. Se analizarán las muestras suministradas (incluidas las suyas) y los resultados se publicarán en un artículo científico. Se le enviará un enlace a través del que podrá ver, descargar e imprimir diagramas en alta resolución de sus resultados, aptos para enmarcar. Ni usted ni su médico pueden utilizar los resultados del análisis para confirmar diagnósticos clínicos; no realizamos pruebas de detección de enfermedades infecciosas.
-¿Puede decidir no participar o retirarse del estudio sin recibir sanciones ni perder beneficios?
-La participación en el estudio es completamente voluntaria. Puede negarse a participar o retirarse del estudio en cualquier momento, sin tener que recibir sanciones ni perder los beneficios que le correspondan. Si decide que no desea seguir participando en el estudio, se le pedirá que envíe un mensaje a la dirección de correo electrónico de asistencia del proyecto American Gut para comunicarnos su intención de retirarse del estudio. Si no se ha procesado la muestra, puede solicitar un reembolso, que se tramitará en el sitio en el que realizó su contribución al proyecto.
-Se le notificará cualquier información importante obtenida durante el transcurso del estudio y que pueda afectar a su deseo de seguir participando.
-¿Se le puede retirar del estudio sin que usted dé su consentimiento?
-Es posible que se le retire del estudio si no completa el consentimiento. También se le podría retirar si no sigue las instrucciones que le dé el personal del estudio.
-¿Se le pagará por participar en este estudio?
-No recibirá ninguna remuneración económica por participar en este estudio.
-¿Hay algún gasto vinculado con la participación en el estudio?
-Una vez que se haya inscrito en el proyecto y haya enviado por correo su muestra, no tendrá que pagar nada por participar en el estudio.
-¿Qué sucede si sufre una lesión como consecuencia directa del estudio?
-Si sufre una lesión como consecuencia directa de su participación en este estudio, la Universidad de California le prestará toda la atención médica necesaria para el tratamiento de esas lesiones. Esta universidad no le ofrecerá ningún otro tipo de indemnización por lesiones. Para saber más sobre este tema, llame a la oficina del Programa de protección para investigaciones con seres humanos al (858) 246-4777 para consultar acerca de sus derechos como sujeto de investigación o denunciar cualquier problema relacionado con el estudio.
-¿Y su confidencialidad?
-Se protegerá la confidencialidad de los registros de la investigación en la medida que lo permita la ley. Todos los datos sobre usted que se introduzcan en el sitio web se guardarán en un servidor protegido por contraseña ubicado en el SDSC (San Diego Supercomputer Center), que se encuentra en la UCSD y cuenta con acceso controlado por características biométricas. Los datos financieros de los participantes que contribuyan al proyecto no se pondrán a disposición de los investigadores. El código (que vincula los datos personales del participante con los códigos de barras de las muestras) se guarda en otro servidor protegido por contraseña, al que solo pueden acceder el investigador principal, el investigador secundario, el coordinador de las muestras, el administrador de TI y los programadores de la base de datos. Todos los análisis se realizan con datos anonimizados; los datos que se consignan en archivos públicos para el uso de otros investigadores también se anonimizan. La Junta de Revisión Institucional de la UCSD podrá revisar los registros del estudio. Tendrá que suministrar datos a través de los que se le podría identificar si se publicaran, como su nombre, su edad, su fecha de nacimiento y su dirección. Hemos hecho todo lo posible para garantizar que nadie pueda identificarle a partir de los datos personales que suministre, pero conservamos información fundamental, como su sexo y su edad, sin poner en riesgo sus datos personales ni la integridad de estos.
-Es posible que debamos denunciar incidentes confirmados o sospechas razonables de maltrato o abandono de niños, adultos dependientes o personas mayores, incluidos el maltrato físico o emocional, el abuso sexual o económico y el abandono. El único modo en que podríamos descubrir dicho maltrato es que lo denuncie el propio participante o su tutor legal, por lo que no es probable que suceda. Si los investigadores se percatan de este tipo de información, podrán denunciarla ante las autoridades pertinentes.
-¿A quién puede llamar si tiene alguna duda?
-Si tiene alguna duda o problemas relacionados con la investigación, puede llamar a Rob Knight al 858-246-1184 o a Dominic Nguyen al 858-534-8739.
-Puede llamar a la oficina del Programa de protección para investigaciones con seres humanos al 858-246-4777 para consultar acerca de sus derechos como sujeto de investigación o denunciar cualquier problema relacionado con el estudio.
-Firma y consentimiento
-Ha recibido una copia de este documento de consentimiento y una copia de la “Declaración de derechos del sujeto experimental” para que las conserve.
-Acepta participar.
''', +The Microsetta Initiative
+
+ ¿Quién realiza el estudio, por qué se le ha pedido que participe, cómo fue seleccionado y cuál es la cifra aproximada de participantes en el estudio?
+ El Dr. Rob Knight está realizando un estudio de investigación para saber más sobre los trillones de bacterias y otros microorganismos (denominados “microbioma”) que viven dentro de su cuerpo y en su superficie. Estos incluyen eucariotas como hongos y parásitos, procariotas como bacteria y arqueas y virus. Le hemos pedido que participe en este estudio porque posee un microbioma único, distinto al del resto del mundo. En el estudio participarán unas 100 000 personas de todos los EE. UU. y de otros países alrededor del mundo.
+
+ ¿Por qué se está llevando a cabo este estudio?
+ El objetivo del estudio es evaluar con mayor precisión las diferencias entre las personas y determinar si dichas diferencias pueden atribuirse al estilo de vida, a la dieta, al tipo de constitución corporal, a la edad o a la presencia de enfermedades relacionadas. Los resultados se utilizarán para crear una base de datos que contendrá secuencias y metabolitos de distintas partes del cuerpo (p. ej., la piel, la boca, el intestino, la sangre), así como detalles de los participantes que provean las muestras. Luego, los investigadores podrán usar estos datos mientras estudian temas relevantes, como las condiciones de salud relacionadas con el intestino.
+
+ ¿Qué le sucederá durante el estudio?
+ Si acepta participar en este estudio, le ocurrirá lo siguiente:
+ Usted ha recibido o recibirá un kit de muestra. El kit contiene instrumentos utilizados para recolectar muestras e instrucciones de uso. El instrumento de recolección también puede incluir etanol al 95% para preservar la muestra y hacerla no infecciosa.
+ Le pediremos que complete un cuestionario en línea sobre usted (p. ej., edad, peso, altura), su estilo de vida, y sus hábitos alimentarios. También hay otros cuestionarios que se centran más en algún tema en específico, que puede elegir completarlos si se aplican a usted. Estos pueden incluir preguntas relacionadas con los siguientes temas, entre otros: COVID-19, trastorno del espectro autista, migrañas, surf, consumo de alimentos fermentados, consumo de alimentos que contienen polifenoles. Usted puede completarlos si son aplicables y si desea proporcionar información adicional que pueda ayudar a nuestra investigación.
+ Después, usted recolectará una muestra suya (p. ej., heces, piel, boca, orificio nasal, oído, vagina), mascota o entorno, tal como se describe en las instrucciones del kit o en las instrucciones que le proporcionaron los coordinadores del estudio. Si recolecta una muestra de heces, se le pedirá que tome una muestra de una de las diferentes formas, como las siguientes:
+
++ Si recibió un kit de recolección de sangre, este contiene materiales e instrucciones sobre cómo recolectar una muestra de sangre en casa. Es similar a la prueba que se usa para medir los niveles de glucosa pinchando el dedo.+
+- Insertando las puntas del hisopo en papel higiénico usado y devolviendo la muestra en el recipiente de plástico suministrado;
+- Insertando las puntas del hisopo en el papel higiénico usado y pasando las puntas por la superficie de una tarjeta para pruebas de sangre oculta en heces, y luego devuélvanos la tarjeta. La tarjeta para pruebas de sangre oculta en heces es el mismo instrumento que usa su médico para verificar si hay sangre en sus heces. La tarjeta para pruebas de sangre oculta en heces permite estabilizar las heces para su posterior análisis. No verificaremos si hay sangre en las heces con fines diagnósticos, puesto que no somos un laboratorio clínico;
+- Usando el instrumento de cuchara para recoger una parte de la materia fecal en el tubo suministrado;
+- Depositando papel higiénico sucio en el receptáculo suministrado;
+- Enviando una muestra completa de heces en el recipiente de envío que le suministraremos. Dicho recipiente contiene una serie de compresas de hielo que enfriarán la muestra de manera fiable a -20 °C/-4 °F.
+
+ ¿Cuánto tiempo es necesario para realizar cada procedimiento del estudio, cuánto tiempo debe dedicar en total y cuánto durará el estudio?
+ Tardará de 30 a 45 minutos o menos para responder el cuestionario principal en línea. Cada encuesta adicional le puede tomar hasta 30 minutos completarla. Tardará 5 min o menos en tomar cada una de las muestras que vaya a suministrar. Esperamos que el estudio continúe durante muchos años, pero sus resultados estarán a su disposición antes de que el estudio termine (generalmente dentro de unos meses después de que recibamos la muestra).
+
+ ¿Cuáles son los riesgos relacionados con este estudio?
+ La participación en este estudio puede implicar algunos riesgos o molestias adicionales. Estos incluyen los siguientes:
+
++ Dado a que este es un estudio de investigación, puede haber algunos riesgos desconocidos que no podemos prever. Le informaremos de cualquier novedad importante al respecto. + ++
+- Mientras responde las encuestas, usted puede sentir frustración, incomodidad emocional, fatiga y/o aburrimiento.
+- Si utiliza el dispositivo de extracción de sangre, es posible que experimente un dolor temporal o un hematoma en el lugar del pinchazo de la aguja.
+- Existe el riesgo de pérdida de confidencialidad.
+
+ ¿Cuáles son las alternativas a no participar en este estudio?
+ Usted no tiene que participar.
+
+ ¿Cuáles podrían ser los beneficios de participar?
+ No hay ningún beneficio monetario o directo por participar en este estudio. Usted recibirá un informe que detalla los resultados de nuestro análisis en su muestra, así como datos y cifras que comparan la composición de su microbioma con la de otros participantes del estudio.
+
+ ¿Puede decidir no participar o retirarse del estudio sin recibir sanciones ni perder beneficios?
+ La participación en el estudio es completamente voluntaria. Puede negarse a participar o retirarse del estudio en cualquier momento, sin tener que recibir sanciones ni perder los beneficios que le correspondan. Si decide que no desea seguir participando en el estudio, usted puede retirar su consentimiento solicitando la eliminación de su fuente y/o cuenta en línea. Se le notificará cualquier información importante obtenida durante el transcurso del estudio y que pueda afectar a su deseo de seguir participando.
+
+ ¿Se le puede retirar del estudio sin que usted dé su consentimiento?
+ Es posible que se le retire del estudio si no sigue las instrucciones que le dé el personal del estudio.
+
+ ¿Se le pagará por participar en este estudio?
+ No recibirá ninguna remuneración económica por participar en este estudio.
+
+ ¿Hay algún gasto vinculado con la participación en el estudio?
+ Una vez que se haya inscrito en el proyecto y haya enviado por correo su muestra, no tendrá que pagar nada por participar en el estudio.
+
+ ¿Qué sucede si sufre una lesión como consecuencia directa del estudio?
+ Si sufre una lesión como consecuencia directa de su participación en este estudio, la Universidad de California le prestará la atención médica necesaria para el tratamiento de esas lesiones. Esta universidad no le ofrecerá ningún otro tipo de indemnización por lesiones. Para saber más sobre este tema, llame a la oficina del Programa de protección para investigaciones con seres humanos al (858) 246-4777 para consultar acerca de sus derechos como sujeto de investigación o denunciar cualquier problema relacionado con el estudio.
+
+ ¿Y su confidencialidad?
+ Se protegerá la confidencialidad de los registros de la investigación en la medida que lo permita la ley. Como parte de su participación en el estudio, usted proporcionará información personal y/o confidencial que podría permitir su identificación si se hiciera pública, como nombre, fecha de nacimiento o dirección. Nosotros tomamos todas las precauciones para proteger su identidad. Toda la información proporcionada se almacena en sistemas seguros dentro de la infraestructura de UC San Diego y la información de identificación directa sólo es accesible para el personal de investigación crítico. El código (que vincula los datos personales del participante con los códigos de barras de la muestras) se guarda en otro servidor protegido con contraseña, al que solo pueden acceder el personal pertinente, como el Dr. Knight, los coinvestigadores, los coordinadores de proyectos y muestras, el administrador de TI y los programadores de la base de datos. El análisis de muestras se realiza utilizando datos de los que se ha eliminado la información de identificación directa, y todos los datos compartidos con los repositorios públicos también se someten a este tratamiento. Los registros de investigación pueden ser revisados por la Junta de Revisión Institucional de UC San Diego.
+ Es posible que debamos denunciar incidentes confirmados o sospechas razonables de maltrato o abandono de niños, adultos dependientes o personas mayores, incluidos el maltrato físico o emocional, el abuso sexual o economico y el abandono. Si los investigadores se percatan de este tipo de información, podrán denunciarla ante las autoridades pertinentes.
+ Por lo general, las leyes federales y estatales consideran que es ilegal que las aseguradoras, las aseguradoras para grupos y la mayor parte de los empleadores le discriminen por su información genética. Por norma general, dichas leyes lo protegen de las siguientes formas: a) las aseguradoras y las aseguradoras para grupos no pueden solicitarnos la información genética que obtengamos sobre usted en esta investigación; b) las aseguradoras y las aseguradoras para grupos no pueden usar su información genética para tomar decisiones sobre sus opciones de cobertura o pagos por seguro; c) los empleadores que tengan cinco empleados o más no pueden usar la información genética que obtengamos sobre usted en esta investigación para tomar decisiones de contratación, ascenso o despido ni para definir condiciones laborales.
+ Tenga en cuenta que estas leyes no lo protegen contra la discriminación genética por parte de compañías que venden seguros de vida, seguros por discapacidad o seguros de atención a largo plazo.)
+
+ Conozca lo que recopilaremos
+ Como parte de este estudio de investigación, nosotros crearemos y obtendremos información relacionada a usted y su participación en el estudio de usted o de colaboradores para que podamos realizar esta investigación de manera adecuada. Los datos del estudio de investigación incluirán: información de contacto, información demográfica, experiencias personales, preferencias de estilo de vida, información de salud, fecha de nacimiento, opiniones o creencias.
+
+ Cómo usaremos su Muestra
+ Usaremos la muestra que nos proporcione para estudiar el ADN no humano (por ejemplo, ADN de las bacterias) que contiene. Es posible que guardemos parte de su muestra para que los investigadores puedan acceder a ella y puedan realizar estudios adicionales utilizando los otros compuestos de la misma, como el ARN, proteínas, o metabolitos. Es posible que nos comuniquemos con usted si necesitamos más información o alguna acción adicional para procesar su(s) muestra(s) y/o para fines de reconsentimiento.
+
+ Cómo utilizaremos sus datos personales
+ Los Datos Personales que nos proporcione serán utilizados para las siguientes finalidades:
+
+ Retención de sus Datos Personales
+ Es posible que retengamos sus Datos Personales durante el tiempo que sea necesario para cumplir con los objetivos de la investigación y garantizar la integridad de la investigación. Eliminaremos sus Datos Personales cuando ya no sean necesarios para el estudio o si usted retira su consentimiento proporcionado, siempre que dicha eliminación no imposibilite o perjudique gravemente el logro de los objetivos del proyecto de investigación. Sin embargo, su información se conservará según sea necesario para cumplir con los requisitos legales o reglamentarios.
+
+ Sus derechos de privacidad
+ El Reglamento General de Protección de Datos ("RGPD") requiere que los investigadores le proporcionen información a usted cuando recopilamos y usamos datos de investigación si usted se encuentra dentro de la Unión Europea (UE) o el Espacio Económico Europeo (EEE). El RGPD le otorga derechos relacionados con sus Datos Personales, incluido el derecho a acceder, corregir, restringir y retirar su información personal.
+ El equipo de investigación almacenará y procesará sus Datos Personales en nuestro sitio de investigación en los Estados Unidos. Los Estados Unidos no tienen las mismas leyes para proteger sus Datos Personales que los países de la UE/EEE. Sin embargo, el equipo de investigación se compromete a proteger la confidencialidad de sus Datos del Estudio. En este documento de consentimiento se incluye información adicional sobre las protecciones que utilizaremos.
+
+ ¿A quién puede llamar si tiene alguna duda?
+ Si tiene alguna duda o problemas relacionados con la investigación, puede llamar a Rob Knight al 858-246-1184 o enviar un correo electrónico a nuestra cuenta de asistencia: microsetta@ucsd.edu.
+ Puede llamar a la oficina del Programa de protección para investigaciones con seres humanos al 858-246-4777 para consultar acerca de sus derechos como sujeto de investigación o denunciar cualquier problema relacionado con el estudio.
+ Si tiene preguntas o quejas sobre nuestro tratamiento de sus Datos Personales, o sobre nuestras prácticas de privacidad en general, no dude en comunicarse con el Funcionario de Privacidad de UC San Diego por correo electrónico a ucsdprivacy@ucsd.edu.
+
+ Firma y Consentimiento
+ Usted puede descargar una copia de este documento de consentimiento y una copia de la "Declaración de derechos del sujeto experimental" para que las conserve.
+ Su consentimiento es completamente voluntario, pero negarse a proveerlo puede impedir materialmente su capacidad para participar en esta investigación y recibir un kit.
+
+ ''', 'ASSENT_13_17': '''
University of California, San Diego
diff --git a/microsetta_private_api/admin/admin_impl.py b/microsetta_private_api/admin/admin_impl.py
index 85088b92f..d15f347e6 100644
--- a/microsetta_private_api/admin/admin_impl.py
+++ b/microsetta_private_api/admin/admin_impl.py
@@ -15,6 +15,7 @@
from microsetta_private_api.repo.kit_repo import KitRepo
from microsetta_private_api.repo.sample_repo import SampleRepo
from microsetta_private_api.repo.survey_answers_repo import SurveyAnswersRepo
+from microsetta_private_api.repo.survey_template_repo import SurveyTemplateRepo
from microsetta_private_api.repo.source_repo import SourceRepo
from microsetta_private_api.repo.transaction import Transaction
from microsetta_private_api.repo.admin_repo import AdminRepo
@@ -591,15 +592,15 @@ def search_activation(token_info, email_query=None, code_query=None):
return jsonify([i.to_api() for i in infos]), 200
-def address_verification(address_1=None, address_2=None,
+def address_verification(address_1=None, address_2=None, address_3=None,
city=None, state=None, postal=None, country=None):
if address_1 is None or len(address_1) < 1 or \
postal is None or len(postal) < 1 or \
country is None or len(country) < 1:
raise Exception("Must include address_1, postal, and country")
- melissa_response = verify_address(address_1, address_2, city, state,
- postal, country)
+ melissa_response = verify_address(address_1, address_2, address_3, city,
+ state, postal, country)
return jsonify(melissa_response), 200
@@ -841,3 +842,11 @@ def delete_account(account_id, token_info):
t.commit()
return None, 204
+
+
+def get_vioscreen_sample_to_user(token_info):
+ validate_admin_access(token_info)
+ with Transaction() as t:
+ st_repo = SurveyTemplateRepo(t)
+ data = st_repo.get_vioscreen_sample_to_user()
+ return jsonify(data), 200
diff --git a/microsetta_private_api/admin/daklapack_polling.py b/microsetta_private_api/admin/daklapack_polling.py
index 707ae7f46..800dcaac9 100644
--- a/microsetta_private_api/admin/daklapack_polling.py
+++ b/microsetta_private_api/admin/daklapack_polling.py
@@ -14,6 +14,13 @@
ERROR_STATUS = "Error"
ARCHIVE_STATUS = "Archived"
CODE_ERROR = "Code Error"
+BARCODE_KEY = "barcode"
+CONTAINER_KEY = "Container-content"
+CONTAINER_ITEMS_KEY = "containerItems"
+TYPE_KEY = "type"
+SINGLE_KIT_TYPES = [BOX_TYPE, REGISTRATION_CARD_TYPE]
+SINGLE_KIT_TYPES.extend(COLLECTION_DEVICE_TYPES)
+MULTI_ITEM_ERR_MSG = "Found multi-item content in a single-kit item"
@celery.task(ignore_result=False)
@@ -124,8 +131,7 @@ def process_order_articles(admin_repo, order_id, status, create_date):
order_proj_ids = admin_repo.get_projects_for_dak_order(order_id)
# call daklapack api to get detailed info on this single order
- dak_orders_response = dc.get_daklapack_order_details(
- order_id)
+ dak_orders_response = dc.get_daklapack_order_details(order_id)
# loop over each kind of "daklapack article" in this order;
# NOTE that although the daklapack api allows >1 type of article (i.e.,
@@ -140,41 +146,88 @@ def process_order_articles(admin_repo, order_id, status, create_date):
# for each instance of this article kind in the order
for curr_article_instance in article_instances:
if status == SENT_STATUS:
- # (Per Daniel 2021-07-01, each instance of a daklapack article
- # represents exactly one kit, no more or less.)
- curr_output = _store_single_sent_kit(
- admin_repo, order_proj_ids, curr_article_instance)
-
- # able to assume there is only one kit uuid bc
- # _store_single_sent_kit stores a single kit, by definition
- kit_uuid = curr_output["created"][0]["kit_uuid"]
- admin_repo.set_kit_uuids_for_dak_order(order_id, [kit_uuid])
+ curr_output = _store_sent_kits_for_article(
+ admin_repo, order_proj_ids, order_id,
+ curr_article_instance)
elif status == ERROR_STATUS:
- curr_output = _gather_article_error_info(
+ single_output = _gather_article_error_info(
order_id, create_date, curr_article_instance)
+ curr_output = [single_output]
else:
raise ValueError(f"Order {order_id} has an unexpected status: "
f"{status}")
- per_article_outputs.append(curr_output)
+ per_article_outputs.extend(curr_output)
# next article instance
# next article type
return per_article_outputs
-def _prevent_overwrite(old_val, new_val, val_type):
- if old_val is not None:
- raise ValueError(f"For type '{val_type}, cannot overwrite first value "
- f"found ('{old_val}') with additional value "
- f"'{new_val}'")
- return new_val
+def _store_sent_kits_for_article(
+ admin_repo, order_proj_ids, order_id, single_article_dict):
+ created_kits = []
+ is_multi_item = None
-def _store_single_sent_kit(admin_repo, order_proj_ids, single_article_dict):
- device_barcodes = []
- kit_name = box_id = None
+ outbound_fedex_code, inbound_fedex_code, address_dict = _get_article_info(
+ single_article_dict)
+ # for each "thing" in a kit
+ # for each "scannable item" (i.e., barcoded thing) in a kit
+ scannable_kit_items = single_article_dict["scannableKitItems"]
+ for curr_scannable in scannable_kit_items:
+ # figure out what *kind* of barcoded thing this is and capture
+ # its barcode to the right field if it is a kind we care about
+ curr_scannable_type = curr_scannable[TYPE_KEY]
+
+ if curr_scannable_type == CONTAINER_KEY:
+ curr_barcode = curr_scannable[BARCODE_KEY]
+ if curr_barcode != "NoLabel":
+ raise ValueError(f"Unexpected barcode for {CONTAINER_KEY}: "
+ f"{curr_barcode}")
+
+ # DON'T change this to "is_multi_item" bc False != None here
+ if is_multi_item is False:
+ raise ValueError(MULTI_ITEM_ERR_MSG)
+ else:
+ is_multi_item = True
+
+ curr_items = curr_scannable[CONTAINER_ITEMS_KEY]
+ for curr_item in curr_items:
+ curr_item_details = curr_item["containerItemDetails"]
+ # ok, NOW we should be at the level of a single kit
+ curr_kit_info = _store_single_sent_kit(
+ admin_repo, order_proj_ids, order_id, outbound_fedex_code,
+ inbound_fedex_code, address_dict, curr_item_details)
+ created_kits.append(curr_kit_info)
+
+ elif curr_scannable_type in SINGLE_KIT_TYPES:
+ is_multi_item = False
+
+ # in theory, at this point I could break from the loop, but I'm
+ # continuing to loop over all the kit items so I can detect if
+ # single-item and multi-item info are both present (which is Bad)
+ # end if
+ # next scannable kit item
+
+ # if we found out above that this scannable_kit_items is for only one kit;
+ # DON'T change this to "is_multi_item" bc False != None here
+ if is_multi_item is False:
+ curr_kit_info = _store_single_sent_kit(
+ admin_repo, order_proj_ids, order_id, outbound_fedex_code,
+ inbound_fedex_code, address_dict, scannable_kit_items)
+ created_kits.append(curr_kit_info)
+
+ if len(created_kits) == 0:
+ raise ValueError(f"Unable to find any kits in order {order_id}, "
+ f"article internal id "
+ f"{single_article_dict['internalId']}")
+
+ return created_kits
+
+
+def _get_article_info(single_article_dict):
# Gather info on address and outbound/inbound fedex tracking
# numbers for this particular article instance (i.e., kit).
# Per Edgar and Daniel, some kits:
@@ -197,19 +250,29 @@ def _store_single_sent_kit(admin_repo, order_proj_ids, single_article_dict):
address_dict = single_article_dict["sendInformation"]
- # for each "scannable item" (i.e., barcoded thing) in a kit
- scannable_kit_items = single_article_dict["scannableKitItems"]
- for curr_scannable in scannable_kit_items:
+ return outbound_fedex_code, inbound_fedex_code, address_dict
+
+
+def _store_single_sent_kit(admin_repo, order_proj_ids, order_id,
+ outbound_fedex_code, inbound_fedex_code,
+ address_dict, items_list):
+
+ device_barcodes = []
+ kit_name = box_id = None
+
+ for curr_scannable in items_list:
# NB: the scannable item can theoretically have a lot of internal
# complexity, like a populated containerItems list that itself
# contains scannable items, on to infinity. HOWEVER, microsetta
- # has defined each article to equal exactly one kit, so it should
- # not be necessary to dig into that.
+ # DOES NOT support that level of nesting, so if it is present, error.
+ curr_subitems = curr_scannable.get(CONTAINER_ITEMS_KEY)
+ if curr_subitems and len(curr_subitems) > 0:
+ raise ValueError(MULTI_ITEM_ERR_MSG)
# figure out what *kind* of barcoded thing this is and capture
# its barcode to the right field if it is a kind we care about
- curr_scannable_type = curr_scannable["type"]
- curr_barcode = curr_scannable["barcode"]
+ curr_scannable_type = curr_scannable[TYPE_KEY]
+ curr_barcode = curr_scannable[BARCODE_KEY]
if curr_scannable_type in COLLECTION_DEVICE_TYPES:
device_barcodes.append(curr_barcode)
elif curr_scannable_type == BOX_TYPE:
@@ -217,8 +280,10 @@ def _store_single_sent_kit(admin_repo, order_proj_ids, single_article_dict):
elif curr_scannable_type == REGISTRATION_CARD_TYPE:
kit_name = _prevent_overwrite(kit_name, curr_barcode,
REGISTRATION_CARD_TYPE)
+ elif curr_scannable_type == CONTAINER_KEY:
+ raise ValueError(MULTI_ITEM_ERR_MSG)
else:
- # Daklapack barcodes this thing but we don't care about it
+ # Something we don't care about it
continue # to next scannable kit item
# next scannable item
@@ -238,9 +303,21 @@ def _store_single_sent_kit(admin_repo, order_proj_ids, single_article_dict):
raise ValueError(f"Expected exactly one kit created, "
f"found {len(created_kit_info['created'])}")
+ # can do [0] since just verified we created ONLY ONE KIT
+ kit_uuid = created_kit_info["created"][0]["kit_uuid"]
+ admin_repo.set_kit_uuids_for_dak_order(order_id, [kit_uuid])
+
return created_kit_info
+def _prevent_overwrite(old_val, new_val, val_type):
+ if old_val is not None:
+ raise ValueError(f"For type '{val_type}, cannot overwrite first value "
+ f"found ('{old_val}') with additional value "
+ f"'{new_val}'")
+ return new_val
+
+
def _gather_article_error_info(order_id, create_date, curr_article_instance):
# dig the info for an error report out of the article instance
curr_error_info = {"order_id": order_id,
diff --git a/microsetta_private_api/admin/tests/test_admin_api.py b/microsetta_private_api/admin/tests/test_admin_api.py
index a89db250e..9560de097 100644
--- a/microsetta_private_api/admin/tests/test_admin_api.py
+++ b/microsetta_private_api/admin/tests/test_admin_api.py
@@ -150,6 +150,16 @@ def tearDown(self):
self.client.__exit__(None, None, None)
teardown_test_data()
+ def test_vioscreen_samples_to_barcodes(self):
+ response = self.client.get(
+ '/api/admin/vioscreen/username_to_barcode',
+ headers=MOCK_HEADERS
+ )
+ self.assertEqual(200, response.status_code)
+ response_obj = json.loads(response.data)
+ self.assertEqual(response_obj['000031536'],
+ 'b98c5ac966b754ff')
+
def _test_project_create_success(self, project_info):
input_json = json.dumps(project_info)
diff --git a/microsetta_private_api/admin/tests/test_daklapack_polling.py b/microsetta_private_api/admin/tests/test_daklapack_polling.py
index 8202a149f..275abed9d 100644
--- a/microsetta_private_api/admin/tests/test_daklapack_polling.py
+++ b/microsetta_private_api/admin/tests/test_daklapack_polling.py
@@ -16,14 +16,14 @@ def make_test_response(status_code, json_dict):
class DaklapackPollingTests(AdminTests):
- ARTICLES_INFO = {"articles": [
- {"articleCode": "350201",
- "total": 2,
- "new": 0,
- "inProduction": 0,
- "sent": 2,
- "errors": 0,
- "articles": [
+ TWO_INSTANCE_ARTICLE = {
+ "articleCode": "350201",
+ "total": 2,
+ "new": 0,
+ "inProduction": 0,
+ "sent": 2,
+ "errors": 0,
+ "articles": [
{"internalId": "729f7149-4889-42b3-8368-1b68284d5b95",
"articleCode": "350201",
"status": "Sent",
@@ -114,7 +114,9 @@ class DaklapackPollingTests(AdminTests):
"outBoundDelivery": {"code": "Tracking Code 2"},
"code": None, "plannedSendDate": None
} # end article instance
- ]}, # end "articles" (instance) list, single article (type) entry
+ ]} # end "articles" (instance) list, single article (type) entry
+ ARTICLES_INFO = {"articles": [
+ TWO_INSTANCE_ARTICLE,
{"articleCode": "350100",
"total": 1,
"new": 0,
@@ -160,6 +162,140 @@ class DaklapackPollingTests(AdminTests):
]} # end "articles" (instance) list, single article (type) entry
]} # end "articles" (type) list, outer dict
+ MULTI_ITEM_ARTICLES_INFO = {"articles": [
+ TWO_INSTANCE_ARTICLE,
+ {
+ "articleCode": "351200460",
+ "total": 1,
+ "new": 0,
+ "inProduction": 0,
+ "sent": 1,
+ "errors": 0,
+ "articles": [
+ {
+ "internalId": "fbe01c9c-ac76-437f-a944-1c9f4da7a8b7",
+ "articleCode": "351200460",
+ "status": "Sent",
+ "description": "",
+ "sendInformation": {
+ "firstName": "THDMI",
+ "lastName": "Spain",
+ "address1": "500 West Main St",
+ "insertion": "",
+ "address2": "Suite 2",
+ "postalCode": "07481",
+ "city": "Wyckoff",
+ "state": "NJ",
+ "country": "USA",
+ "countryCode": "US",
+ "phone": "(858) 555-1212",
+ "companyName": "Cassidy Symons"
+ },
+ "shippingProvider": {
+ "name": "Freight",
+ "shippingType": "Default",
+ "shippingProviderMetadata": []
+ },
+ "scannableKitItems": [
+ {
+ "type": "ShippingLabelOutbound",
+ "barcode": "20220922053001949",
+ "expirationDate": None,
+ "itemCount": 0,
+ "containerItems": []
+ },
+ {
+ "type": "Container-content",
+ "barcode": "NoLabel",
+ "expirationDate": None,
+ "itemCount": 40,
+ "containerItems": [
+ {
+ "stockId": 30616625,
+ "containerItemDetails": [
+ {
+ "type": "KitId",
+ "barcode": "MULTI_BAR_1",
+ "expirationDate": None,
+ "itemCount": 0,
+ "containerItems": []
+ },
+ {
+ "type": "BoxId",
+ "barcode": "MULTI_BOX_1",
+ "expirationDate": None,
+ "itemCount": 0,
+ "containerItems": []
+ },
+ {
+ "type": "Tube",
+ "barcode": "MULTI_TUBE_1",
+ "expirationDate": None,
+ "itemCount": 0,
+ "containerItems": []
+ },
+ {
+ "type": "InstructionCard",
+ "barcode": "R2-SP",
+ "expirationDate": None,
+ "itemCount": 0,
+ "containerItems": []
+ }
+ ],
+ "inboundDelivery": {
+ "code": ""
+ }
+ },
+ {
+ "stockId": 30616627,
+ "containerItemDetails": [
+ {
+ "type": "KitId",
+ "barcode": "MULTI_KIT_2",
+ "expirationDate": None,
+ "itemCount": 0,
+ "containerItems": []
+ },
+ {
+ "type": "BoxId",
+ "barcode": "MULTI_BOX_2",
+ "expirationDate": None,
+ "itemCount": 0,
+ "containerItems": []
+ },
+ {
+ "type": "Tube",
+ "barcode": "MULTI_TUBE_2",
+ "expirationDate": None,
+ "itemCount": 0,
+ "containerItems": []
+ },
+ {
+ "type": "InstructionCard",
+ "barcode": "R2-SP",
+ "expirationDate": None,
+ "itemCount": 0,
+ "containerItems": []
+ }
+ ],
+ "inboundDelivery": {
+ "code": ""
+ }
+ }
+ ]
+ }
+ ],
+ "inBoundDelivery": None,
+ "outBoundDelivery": {
+ "code": ""
+ },
+ "code": None,
+ "plannedSendDate": None
+ }
+ ]
+ }
+ ]}
+
@staticmethod
def _delete_dak_orders_to_kits(t, kit_ids):
if kit_ids is None:
@@ -688,6 +824,82 @@ def test_poll_dak_orders(self):
finally:
self._delete_kits_and_dak_orders_to_kits(registration_card_ids)
+ def test_process_order_articles_nested_sent_status(self):
+ expected_out = [
+ {'created': [
+ {'kit_id': 'ABCR',
+ 'address': {'firstName': 'Natalia J Phillips',
+ 'lastName': '',
+ 'address1': '2166 Chapmans Lane',
+ 'insertion': '',
+ 'address2': '', 'postalCode': '88103',
+ 'city': 'Clovis', 'state': 'NM',
+ 'country': 'USA', 'countryCode': 'US',
+ 'phone': '505-784-5252',
+ 'companyName': 'Jane Doe'},
+ 'box_id': 'ABCX',
+ 'outbound_fedex_tracking': 'Tracking Code 1',
+ 'inbound_fedex_tracking': 'Tracking Code 2',
+ 'sample_barcodes': ['ABCT', 'ABCN']
+ },
+ ]},
+ {'created': [
+ {'kit_id': 'ABCR2',
+ 'box_id': 'ABCX2',
+ 'address': {'firstName': 'Natalia J Phillips',
+ 'lastName': '',
+ 'address1': '2166 Chapmans Lane',
+ 'insertion': '',
+ 'address2': '', 'postalCode': '88103',
+ 'city': 'Clovis', 'state': 'NM',
+ 'country': 'USA', 'countryCode': 'US',
+ 'phone': '505-784-5252',
+ 'companyName': 'Jane Doe'},
+ 'outbound_fedex_tracking': 'Tracking Code 2',
+ 'inbound_fedex_tracking': None,
+ 'sample_barcodes': ['ABCT2', 'ABCN2']
+ }
+ ]},
+ {'created': [
+ {'kit_id': 'MULTI_BAR_1',
+ 'box_id': 'MULTI_BOX_1',
+ 'address': {'firstName': 'THDMI',
+ 'lastName': 'Spain',
+ 'address1': '500 West Main St',
+ 'insertion': '',
+ 'address2': 'Suite 2', 'postalCode': '07481',
+ 'city': 'Wyckoff', 'state': 'NJ',
+ 'country': 'USA', 'countryCode': 'US',
+ 'phone': '(858) 555-1212',
+ 'companyName': 'Cassidy Symons'
+ },
+ 'outbound_fedex_tracking': '',
+ 'inbound_fedex_tracking': None,
+ 'sample_barcodes': ['MULTI_TUBE_1']
+ }
+ ]},
+ {'created': [
+ {'kit_id': 'MULTI_KIT_2',
+ 'box_id': 'MULTI_BOX_2',
+ 'address': {'firstName': 'THDMI',
+ 'lastName': 'Spain',
+ 'address1': '500 West Main St',
+ 'insertion': '',
+ 'address2': 'Suite 2', 'postalCode': '07481',
+ 'city': 'Wyckoff', 'state': 'NJ',
+ 'country': 'USA', 'countryCode': 'US',
+ 'phone': '(858) 555-1212',
+ 'companyName': 'Cassidy Symons'
+ },
+ 'outbound_fedex_tracking': '',
+ 'inbound_fedex_tracking': None,
+ 'sample_barcodes': ['MULTI_TUBE_2']
+ }
+ ]}
+ ]
+ self._test_process_order_articles_sent_status(
+ expected_out, self.MULTI_ITEM_ARTICLES_INFO)
+
def test_process_order_articles_sent_status(self):
expected_out = [
{'created': [
@@ -742,7 +954,10 @@ def test_process_order_articles_sent_status(self):
}
]}
]
+ self._test_process_order_articles_sent_status(
+ expected_out, self.ARTICLES_INFO)
+ def _test_process_order_articles_sent_status(self, expected_out, articles):
with Transaction() as t:
dummy_orders = self.make_dummy_dak_orders(t)
an_order_id = dummy_orders[0][0]
@@ -754,7 +969,7 @@ def test_process_order_articles_sent_status(self):
with patch("microsetta_private_api.admin.daklapack_communication."
"get_daklapack_order_details") as mock_dak_order_info:
mock_dak_order_info.side_effect = [make_test_response(
- 200, self.ARTICLES_INFO)]
+ 200, articles)]
real_out = process_order_articles(
admin_repo, an_order_id, "Sent",
diff --git a/microsetta_private_api/api/_interested_user.py b/microsetta_private_api/api/_interested_user.py
index 6abdaebc0..0bdeed1fe 100644
--- a/microsetta_private_api/api/_interested_user.py
+++ b/microsetta_private_api/api/_interested_user.py
@@ -34,19 +34,23 @@ def create_interested_user(body):
# opening a new transaction for address verification so we don't lose the
# interested user record if something unexpected happens during address
# verification
- with Transaction() as t:
- interested_user_repo = InterestedUserRepo(t)
- try:
- # at this point, we don't particularly care if it's valid
- # we just care that it doesn't fail to execute
- interested_user_repo.verify_address(interested_user_id)
- except RepoException:
- return jsonify(
- code=400,
- message="Failed to verify address."
- ), 400
- t.commit()
+ # NOTE 2022-09-01: Disabling address verification for interested users as
+ # Melissa seems to be throwing false negatives for Spain. Will revisit
+ # in the future.
+ # with Transaction() as t:
+ # interested_user_repo = InterestedUserRepo(t)
+ # try:
+ # at this point, we don't particularly care if it's valid
+ # we just care that it doesn't fail to execute
+ # interested_user_repo.verify_address(interested_user_id)
+ # except RepoException:
+ # return jsonify(
+ # code=400,
+ # message="Failed to verify address."
+ # ), 400
+
+ # t.commit()
return jsonify(user_id=interested_user_id), 200
@@ -85,6 +89,7 @@ def get_interested_user_address_update(interested_user_id, email):
email=interested_user.email,
address_1=interested_user.address_1,
address_2=interested_user.address_2,
+ address_3=interested_user.address_3,
city=interested_user.city,
state=interested_user.state,
postal_code=interested_user.postal_code,
@@ -120,10 +125,10 @@ def put_interested_user_address_update(body):
interested_user.address_checked = False
interested_user.address_1 = body['address_1']
interested_user.address_2 = body['address_2']
- interested_user.address_3 = body.get('address_3', None)
- interested_user.residential_address = body.get(
- 'residential_address', True)
- interested_user.phone = body.get('phone')
+ interested_user.address_3 = body['address_3']
+ interested_user.residential_address = \
+ body['residential_address']
+ interested_user.phone = body['phone']
interested_user.city = body['city']
interested_user.state = body['state']
interested_user.postal_code = body['postal']
diff --git a/microsetta_private_api/api/_survey.py b/microsetta_private_api/api/_survey.py
index 60a52378e..bd935762a 100644
--- a/microsetta_private_api/api/_survey.py
+++ b/microsetta_private_api/api/_survey.py
@@ -15,6 +15,7 @@
from microsetta_private_api.util import vioscreen, myfoodrepo, vue_adapter, \
polyphenol_ffq
from microsetta_private_api.util.vioscreen import VioscreenAdminAPI
+from microsetta_private_api.config_manager import SERVER_CONFIG
def read_survey_templates(account_id, source_id, language_tag, token_info):
@@ -40,7 +41,8 @@ def read_survey_templates(account_id, source_id, language_tag, token_info):
for x in [1, 3, 4, 5, 6, 7,
SurveyTemplateRepo.VIOSCREEN_ID,
SurveyTemplateRepo.MYFOODREPO_ID,
- SurveyTemplateRepo.POLYPHENOL_FFQ_ID]
+ SurveyTemplateRepo.POLYPHENOL_FFQ_ID,
+ SurveyTemplateRepo.SPAIN_FFQ_ID]
]), 200
elif source.source_type == Source.SOURCE_TYPE_ANIMAL:
return jsonify([template_repo.get_survey_template_link_info(x)
@@ -153,6 +155,20 @@ def _remote_survey_url_polyphenol_ffq(transaction, account_id, source_id,
return polyphenol_ffq.gen_ffq_url(polyphenol_ffq_id, study, language_tag)
+def _remote_survey_url_spain_ffq(transaction, account_id, source_id):
+ st_repo = SurveyTemplateRepo(transaction)
+
+ # right now, ID won't exist
+ # future plans to allow surveys to behave more flexibly will use this
+ # functionality to allow participants to re-join in-progress surveys
+ spain_ffq_id = st_repo.get_spain_ffq_id_if_exists(account_id, source_id)
+
+ if spain_ffq_id is None:
+ st_repo.create_spain_ffq_entry(account_id, source_id)
+
+ return SERVER_CONFIG['spain_ffq_url']
+
+
def read_survey_template(account_id, source_id, survey_template_id,
language_tag, token_info, survey_redirect_url=None,
vioscreen_ext_sample_id=None):
@@ -183,6 +199,10 @@ def read_survey_template(account_id, source_id, survey_template_id,
account_id,
source_id,
language_tag)
+ elif survey_template_id == SurveyTemplateRepo.SPAIN_FFQ_ID:
+ url = _remote_survey_url_spain_ffq(t,
+ account_id,
+ source_id)
else:
raise ValueError(f"Cannot generate URL for survey "
f"{survey_template_id}")
diff --git a/microsetta_private_api/api/microsetta_private_api.yaml b/microsetta_private_api/api/microsetta_private_api.yaml
index f2e373f52..260c446f6 100644
--- a/microsetta_private_api/api/microsetta_private_api.yaml
+++ b/microsetta_private_api/api/microsetta_private_api.yaml
@@ -1118,6 +1118,26 @@ paths:
'404':
$ref: '#/components/responses/404NotFound'
+ '/admin/vioscreen/username_to_barcode':
+ get:
+ operationId: microsetta_private_api.admin.admin_impl.get_vioscreen_sample_to_user
+ tags:
+ - Vioscreen
+ summary: Obtain a mapping from Vioscreen username to associated barcode
+ description: Obtain a mapping from Vioscreen username to associated barcode
+ responses:
+ '200':
+ description: Successfully returned username mapping
+ content:
+ application/json:
+ schema:
+ type:
+ object
+ '401':
+ $ref: '#/components/responses/401Unauthorized'
+ '403':
+ $ref: '#/components/responses/403Forbidden'
+
'/vioscreen/dietaryscore/type/{score_type}/code/{score_code}':
get:
operationId: microsetta_private_api.api.get_vioscreen_dietary_scores_by_component
@@ -1922,6 +1942,12 @@ paths:
required: false
schema:
type: string
+ - in: query
+ name: address_3
+ description: Third line of address to verify
+ required: false
+ schema:
+ type: string
- in: query
name: city
description: City of address to verify
@@ -2695,7 +2721,7 @@ components:
example: "standard"
language:
type: string
- enum: ["en_US", "es_MX"]
+ enum: ["en_US", "es_MX", "es_ES"]
example: "en_US"
creation_time:
type: string
diff --git a/microsetta_private_api/api/tests/test_integration.py b/microsetta_private_api/api/tests/test_integration.py
index 6333beb66..e5dfca723 100644
--- a/microsetta_private_api/api/tests/test_integration.py
+++ b/microsetta_private_api/api/tests/test_integration.py
@@ -363,7 +363,7 @@ def test_surveys(self):
# Survey status should not be in templates
self.assertNotIn("survey_status", bobo_surveys[0])
self.assertListEqual([x["survey_template_id"] for x in bobo_surveys],
- [1, 3, 4, 5, 6, 7, 10001, 10002, 10003])
+ [1, 3, 4, 5, 6, 7, 10001, 10002, 10003, 10004])
self.assertListEqual([x["survey_template_id"] for x in doggy_surveys],
[2])
self.assertListEqual([x["survey_template_id"] for x in env_surveys],
@@ -569,6 +569,40 @@ def test_bobo_takes_polyphenol_ffq(self):
)
check_response(resp, 404)
+ @skipIf(SERVER_CONFIG['spain_ffq_url'] in ('', 'sffq_placeholder'),
+ "Spain FFQ secrets not provided")
+ def test_bobo_takes_spain_ffq(self):
+ bobo = self._bobo_to_claim_a_sample()
+
+ # take Spain FFQ
+ resp = self.client.get(
+ '/api/accounts/%s/sources/%s/survey_templates/10004'
+ '?language_tag=es_ES' %
+ (ACCT_ID, bobo['source_id']),
+ headers=MOCK_HEADERS
+ )
+ check_response(resp)
+ data = json.loads(resp.data)
+ exp_start = SERVER_CONFIG['spain_ffq_url']
+ url = data['survey_template_text']['url']
+ self.assertTrue(url.startswith(exp_start))
+
+ # verify we err if we attempt to answer the survey. an "answer" here is
+ # undefined
+ resp = self.client.post(
+ '/api/accounts/%s/sources/%s/surveys'
+ '?language_tag=en_US' %
+ (ACCT_ID, bobo['source_id']),
+ content_type='application/json',
+ data=json.dumps(
+ {
+ "survey_template_id": 10004,
+ "survey_text": {'key': 'stuff'}
+ }),
+ headers=MOCK_HEADERS
+ )
+ check_response(resp, 404)
+
def test_bobo_takes_all_local_surveys(self):
"""
Check that a user can login to an account,
@@ -596,8 +630,8 @@ def test_bobo_takes_all_local_surveys(self):
for bobo_survey in bobo_surveys:
chosen_survey = bobo_survey["survey_template_id"]
- # 10001, 10002, and 10003 are non-local surveys
- if chosen_survey in (10001, 10002, 10003):
+ # 10001, 10002, 10003, and 10004 are non-local surveys
+ if chosen_survey in (10001, 10002, 10003, 10004):
continue
resp = self.client.get(
diff --git a/microsetta_private_api/celery_worker.py b/microsetta_private_api/celery_worker.py
index 214fee341..f81614785 100644
--- a/microsetta_private_api/celery_worker.py
+++ b/microsetta_private_api/celery_worker.py
@@ -2,8 +2,10 @@
from microsetta_private_api.celery_utils import celery, init_celery
from microsetta_private_api.util.vioscreen import refresh_headers
from microsetta_private_api.admin.daklapack_polling import poll_dak_orders
+from microsetta_private_api.tasks import update_qiita_metadata
init_celery(celery, app.app)
# Run any celery tasks that require initialization on worker start
refresh_headers.delay() # Initialize the vioscreen task with a token
poll_dak_orders.delay() # check for orders
+update_qiita_metadata.delay() # run Qiita metadata push
diff --git a/microsetta_private_api/db/patches/0102.sql b/microsetta_private_api/db/patches/0102.sql
new file mode 100644
index 000000000..02cba48de
--- /dev/null
+++ b/microsetta_private_api/db/patches/0102.sql
@@ -0,0 +1,74 @@
+-- BEGIN ADDRESS VERIFICATION CHANGES
+-- Drop old indices that only include address_1 and address_2
+DROP INDEX campaign.source_address_composite;
+DROP INDEX campaign.result_address_composite;
+
+-- Add address_3 columns
+ALTER TABLE campaign.melissa_address_queries ADD COLUMN source_address_3 VARCHAR;
+ALTER TABLE campaign.melissa_address_queries ADD COLUMN result_address_3 VARCHAR;
+
+-- Create new indices that include address_3
+CREATE INDEX idx_melissa_source_address ON campaign.melissa_address_queries (source_address_1, source_address_2, source_address_3, source_postal, source_country, result_processed);
+CREATE INDEX idx_melissa_result_address ON campaign.melissa_address_queries (result_address_1, result_address_2, result_address_3, result_postal, result_country, result_processed);
+-- END ADDRESS VERIFICATION CHANGES
+
+-- BEGIN SURVEY CHANGES FOR SPAIN
+-- Add columns for Spain to the three necessary survey tables
+ALTER TABLE ag.survey_group ADD COLUMN spain_spanish VARCHAR;
+ALTER TABLE ag.survey_question ADD COLUMN spain_spanish VARCHAR;
+ALTER TABLE ag.survey_response ADD COLUMN spain_spanish VARCHAR;
+
+-- Per Alejandra, the vast majority of the translations are the same for Spain as they were for Mexico.
+-- Therefore, we're going to copy those values into the new columns, then update the exceptions by hand.
+UPDATE ag.survey_group SET spain_spanish = spanish;
+UPDATE ag.survey_question SET spain_spanish = spanish;
+UPDATE ag.survey_response SET spain_spanish = spanish;
+
+-- Changes to address specific questions/responses
+UPDATE ag.survey_response SET spain_spanish = 'aumentó más de 10 libras (5kg)' WHERE american = 'Increased more than 10 pounds';
+UPDATE ag.survey_response SET spain_spanish = 'se redujo más de 10 libras (5kg)' WHERE american = 'Decreased more than 10 pounds';
+UPDATE ag.survey_response SET spain_spanish = 'Alubias fermentadas/miso/natto' WHERE american = 'Fermented beans/Miso/Natto';
+UPDATE ag.survey_response SET spain_spanish = 'Pocos días a la semana' WHERE american = 'A few days per week';
+UPDATE ag.survey_response SET spain_spanish = 'No en absoluto' WHERE american = 'Not at all';
+
+UPDATE ag.survey_question SET spain_spanish = 'Por lo general, ¿cuántas veces a la semana cocina y come comidas caseras? (Excluya las comidas listas para consumir, como la pizza, fideos instantaneos, croquetas, empanaillas)' WHERE survey_question_id = 57;
+UPDATE ag.survey_question SET spain_spanish = 'Por lo general, ¿cuántas veces a la semana come alimentos precocinados o listos para consumir (p. ej., pizzas, fideos instantaneos, croquetas, empanadillas)?' WHERE survey_question_id = 58;
+UPDATE ag.survey_question SET spain_spanish = 'Por lo general, ¿cuántas veces a la semana consume al menos 2-3 raciones de fruta al día? (1 ración = 1/2 taza de fruta; 1 fruta mediana; 120ml de jugo de frutas 100 % natural).' WHERE survey_question_id = 61;
+UPDATE ag.survey_question SET spain_spanish = 'Por lo general, ¿cuántas veces a la semana consume al menos 2-3 raciones de verdura al día (incluidas las papas)? (1 ración = 1/2 taza de verduras/papas; 1 taza de verduras de hoja crudas).' WHERE survey_question_id = 62;
+UPDATE ag.survey_question SET spain_spanish = 'Por lo general, ¿cuántas veces a la semana consume una o más raciones de verduras o productos vegetales fermentados al día? (1 ración = 1/2 taza de chucrut, kimchi o verduras fermentadas o 1 taza de kombucha).' WHERE survey_question_id = 63;
+UPDATE ag.survey_question SET spain_spanish = 'Por lo general, ¿cuántas veces a la semana consume al menos 2 raciones de leche o queso al día? (1 ración = 1 taza de leche o yogur; 50gr de queso).' WHERE survey_question_id = 64;
+UPDATE ag.survey_question SET spain_spanish = 'Por lo general, ¿cuántas veces a la semana consume productos sin lactosa (bebida de soja, bebida de almendras, y leche sin lactosa etc.)?' WHERE survey_question_id = 65;
+UPDATE ag.survey_question SET spain_spanish = 'Por lo general, ¿cuántos días a la semana consume aperitivos salados (patatas chips, tortitas de maíz, galletas saladas, palomitas de maíz con mantequilla, patatas fritas, etc.)?' WHERE survey_question_id = 71;
+UPDATE ag.survey_question SET spain_spanish = 'Por lo general, ¿cuántos días a la semana consume alimentos azucarados o reposteria comercial (tartas, galletas, bollos, rosquillas, pastelillos, chocolate, etc.) al menos una vez al día?' WHERE survey_question_id = 72;
+UPDATE ag.survey_question SET spain_spanish = 'Por lo general, ¿cuántos días a la semana cocina con aceite de oliva (o usa aceite de oliva para aliñar ensaladas)?' WHERE survey_question_id = 73;
+UPDATE ag.survey_question SET spain_spanish = '¿Consume huevos enteros (no huevo líquido envasado, ni solo claras de huevo)?' WHERE survey_question_id = 74;
+UPDATE ag.survey_question SET spain_spanish = '¿Bebe 16 onzas (500 ml) o más de bebidas carbonatadas y/o azucaradas como refrescos, colas, bebidas carbonatadas bajas en calorías, o zumos de fruta (que no incluyan zumo 100 % natural) al día? (1 lata de refresco = 355ml).' WHERE survey_question_id = 75;
+UPDATE ag.survey_question SET spain_spanish = '¿Consume bebidas carbonatadas bajas en calorías con endulzantes artificiales?' WHERE survey_question_id = 157;
+UPDATE ag.survey_question SET spain_spanish = 'Por lo general, ¿con qué frecuencia consume remolacha (cruda, enlatada, en escabeche o asada) a la semana? (1 ración = 1 taza cruda o cocida)' WHERE survey_question_id = 236;
+UPDATE ag.survey_question SET spain_spanish = 'Por lo general, ¿con qué frecuencia consume diferentes tipos de proteina vegetal incluyendo tofu, tempeh, edamame, lentejas, garbanzos, cacahuetes, almendras, nueces o quinua a la semana?' WHERE survey_question_id = 237;
+UPDATE ag.survey_question SET spain_spanish = 'Indique cualquier otro dato sobre usted que cree que podría afectar a sus propios microorganismos.' WHERE survey_question_id = 116;
+UPDATE ag.survey_question SET spain_spanish = 'Por lo general, ¿cuántas veces a la semana consume una o más raciones de verduras o alimentos fermentados de origen vegetal al día? (1 ración = 1/2 taza de chucrut, kimchi o verduras fermentadas o 1 taza de kombucha).' WHERE survey_question_id = 165;
+UPDATE ag.survey_question SET spain_spanish = 'Por favor, piense en su nivel de bienestar actual. Cuando piense en su bienestar, piense en su salud física, en su salud emocional, en cualquier desafío que esté experimentando, en las personas de su vida y en las oportunidades o recursos que tiene a su disposición. ¿Cómo describiría su nivel de bienestar actual?' WHERE survey_question_id = 210;
+UPDATE ag.survey_question SET spain_spanish = '¿Ha sospechado que pueda tener infección por coronavirus/COVID-19?' WHERE survey_question_id = 212;
+UPDATE ag.survey_question SET spain_spanish = '¿Cuántas veces ha salido de su casa por cualquier razón, incluido el trabajo (por ejemplo, ha dejado su casa para ir a tiendas, parques, etc.)?' WHERE survey_question_id = 218;
+UPDATE ag.survey_question SET spain_spanish = 'Durante las últimas 2 semanas, ¿con qué frecuencia le ha faltado interés o placer para hacer las cosas?' WHERE survey_question_id = 221;
+UPDATE ag.survey_question SET spain_spanish = '¿Ha participado en la atención directa al paciente que involucre pacientes con COVID-19 confirmados en los últimos 7 días?' WHERE survey_question_id = 227;
+UPDATE ag.survey_question SET spain_spanish = 'Describa la calidad de la evacuación. Utilice el siguiente cuadro a modo de referencia:
' WHERE survey_question_id = 38;
+
+UPDATE ag.survey_group SET spain_spanish = 'Alimentos fermentados' WHERE american = 'Fermented Foods';
+-- END SURVEY CHANGES FOR SPAIN
+
+-- BEGIN SPAIN FFQ
+CREATE TABLE ag.spain_ffq_registry (
+ spain_ffq_id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
+ account_id UUID NOT NULL,
+ source_id UUID,
+ creation_timestamp TIMESTAMPTZ NOT NULL DEFAULT NOW(),
+ deleted BOOLEAN NOT NULL DEFAULT false,
+
+ CONSTRAINT fk_spain_ffq_registry_account FOREIGN KEY (account_id) REFERENCES ag.account(id),
+ CONSTRAINT fk_spain_ffq_registry_source FOREIGN KEY (source_id) REFERENCES ag.source (id)
+);
+
+CREATE INDEX spain_ffq_registry_source ON ag.spain_ffq_registry (account_id, source_id);
+-- END SPAIN FFQ
\ No newline at end of file
diff --git a/microsetta_private_api/localization.py b/microsetta_private_api/localization.py
index 097ebc7b8..981f631b5 100644
--- a/microsetta_private_api/localization.py
+++ b/microsetta_private_api/localization.py
@@ -1,9 +1,10 @@
from microsetta_private_api.LEGACY.locale_data \
- import (american_gut, british_gut, spanish_gut)
+ import (american_gut, british_gut, spanish_gut, spain_spanish_gut)
EN_US = "en_US"
EN_GB = "en_GB"
ES_MX = "es_MX"
+ES_ES = "es_ES"
NEW_PARTICIPANT_KEY = "new_participant"
LANG_NAME_KEY = "lang_name"
@@ -22,5 +23,9 @@
ES_MX: {
NEW_PARTICIPANT_KEY: spanish_gut._NEW_PARTICIPANT,
LANG_NAME_KEY: "spanish"
+ },
+ ES_ES: {
+ NEW_PARTICIPANT_KEY: spain_spanish_gut._NEW_PARTICIPANT,
+ LANG_NAME_KEY: "spain_spanish"
}
}
diff --git a/microsetta_private_api/model/interested_user.py b/microsetta_private_api/model/interested_user.py
index c91ed75c3..3e725a77c 100644
--- a/microsetta_private_api/model/interested_user.py
+++ b/microsetta_private_api/model/interested_user.py
@@ -17,7 +17,7 @@ def __init__(self, **kwargs):
self.phone = kwargs.get('phone')
self.address_1 = kwargs.get('address_1')
self.address_2 = kwargs.get('address_2')
- self.address_3 = kwargs.get('address_3', None)
+ self.address_3 = kwargs.get('address_3')
self.city = kwargs.get('city')
self.state = kwargs.get('state')
self.postal_code = kwargs.get('postal_code')
diff --git a/microsetta_private_api/repo/account_repo.py b/microsetta_private_api/repo/account_repo.py
index 3dc0cbb91..b3133b06f 100644
--- a/microsetta_private_api/repo/account_repo.py
+++ b/microsetta_private_api/repo/account_repo.py
@@ -232,6 +232,7 @@ def geocode_accounts(self):
for r in rows:
try:
melissa_response = verify_address(r['street'],
+ "",
"",
r['city'],
r['state'],
diff --git a/microsetta_private_api/repo/interested_user_repo.py b/microsetta_private_api/repo/interested_user_repo.py
index 42a11990c..c09c20e83 100644
--- a/microsetta_private_api/repo/interested_user_repo.py
+++ b/microsetta_private_api/repo/interested_user_repo.py
@@ -122,11 +122,11 @@ def get_interested_user_by_email(self, email):
cur.execute(
"SELECT interested_user_id, campaign_id, acquisition_source, "
"first_name, last_name, email, phone, address_1, address_2, "
- "city, state, postal_code, country, latitude, longitude, "
- "confirm_consent, ip_address, creation_timestamp, "
+ "address_3, city, state, postal_code, country, latitude, "
+ "longitude, confirm_consent, ip_address, creation_timestamp, "
"update_timestamp, address_checked, address_valid, "
"converted_to_account, converted_to_account_timestamp,"
- "over_18 "
+ "over_18, residential_address "
"FROM campaign.interested_users "
"WHERE email ILIKE %s "
"ORDER BY email",
@@ -138,8 +138,8 @@ def get_interested_user_by_email(self, email):
def verify_address(self, interested_user_id):
with self._transaction.dict_cursor() as cur:
cur.execute(
- "SELECT address_1, address_2, city, state, postal_code, "
- "country "
+ "SELECT address_1, address_2, address_3, city, state, "
+ "postal_code, country "
"FROM campaign.interested_users WHERE interested_user_id = %s "
"AND address_checked = false AND address_1 != '' AND "
"postal_code != '' AND country != ''",
@@ -152,6 +152,7 @@ def verify_address(self, interested_user_id):
try:
melissa_response = verify_address(r['address_1'],
r['address_2'],
+ r['address_3'],
r['city'],
r['state'],
r['postal_code'],
@@ -173,12 +174,13 @@ def verify_address(self, interested_user_id):
cur.execute(
"UPDATE campaign.interested_users "
"SET address_checked = true, address_valid = true, "
- "address_1 = %s, address_2 = %s, city = %s, "
- "state = %s, postal_code = %s, "
+ "address_1 = %s, address_2 = %s, address_3 = %s, "
+ "city = %s, state = %s, postal_code = %s, "
"latitude = %s, longitude = %s "
"WHERE interested_user_id = %s",
(melissa_response['address_1'],
melissa_response['address_2'],
+ melissa_response['address_3'],
melissa_response['city'],
melissa_response['state'],
melissa_response['postal'],
diff --git a/microsetta_private_api/repo/melissa_repo.py b/microsetta_private_api/repo/melissa_repo.py
index 44677f97d..84b9b8776 100644
--- a/microsetta_private_api/repo/melissa_repo.py
+++ b/microsetta_private_api/repo/melissa_repo.py
@@ -5,8 +5,8 @@ class MelissaRepo(BaseRepo):
def __init__(self, transaction):
super().__init__(transaction)
- def create_record(self, address_1, address_2, city, state, postal,
- country):
+ def create_record(self, address_1, address_2, address_3, city, state,
+ postal, country):
"""
Create a record before pinging Melissa so we can include unique ID
@@ -14,6 +14,7 @@ def create_record(self, address_1, address_2, city, state, postal,
----------
address_1 - Primary street address (e.g. 123 Main St)
address_2 - Secondary street address (e.g. Apt 555)
+ address_3 - Tertiary street address
city - City (e.g. San Diego)
state - State (e.g. CA)
postal - Postal code (e.g. 92116)
@@ -28,13 +29,15 @@ def create_record(self, address_1, address_2, city, state, postal,
query_timestamp,
source_address_1,
source_address_2,
+ source_address_3,
source_city,
source_state,
source_postal,
source_country)
- VALUES (NOW(), %s, %s, %s, %s, %s, %s)
+ VALUES (NOW(), %s, %s, %s, %s, %s, %s, %s)
RETURNING melissa_address_query_id""",
- (address_1, address_2, city, state, postal, country))
+ (address_1, address_2, address_3, city, state, postal,
+ country))
record_id = cur.fetchone()[0]
if record_id is None:
@@ -42,7 +45,8 @@ def create_record(self, address_1, address_2, city, state, postal,
else:
return record_id
- def check_duplicate(self, address_1, address_2, postal, country):
+ def check_duplicate(self, address_1, address_2, address_3, postal,
+ country):
"""
Check if an address has already been verified to avoid duplicate
queries against the Melissa API
@@ -55,6 +59,7 @@ def check_duplicate(self, address_1, address_2, postal, country):
----------
address_1 - Primary street address
address_2 - Secondary street address
+ address_3 - Tertiary street address
postal - Postal code
country - Country
@@ -67,16 +72,18 @@ def check_duplicate(self, address_1, address_2, postal, country):
cur.execute("""SELECT * FROM campaign.melissa_address_queries
WHERE (source_address_1 = %s
AND source_address_2 = %s
+ AND source_address_3 = %s
AND source_postal = %s
AND source_country = %s
AND result_processed = true)
OR (result_address_1 = %s
AND result_address_2 = %s
+ AND result_address_3 = %s
AND result_postal = %s
AND result_country = %s
AND result_processed = true)""",
- (address_1, address_2, postal, country,
- address_1, address_2, postal, country))
+ (address_1, address_2, address_3, postal, country,
+ address_1, address_2, address_3, postal, country))
row = cur.fetchone()
if row is None:
return False
@@ -85,8 +92,8 @@ def check_duplicate(self, address_1, address_2, postal, country):
def update_results(self, record_id, source_url, result_raw,
result_codes, result_good, formatted_address,
- address_1, address_2, city, state, postal, country,
- latitude, longitude):
+ address_1, address_2, address_3, city, state, postal,
+ country, latitude, longitude):
"""
Update record in the database with the results from the Melissa API
@@ -105,6 +112,7 @@ def update_results(self, record_id, source_url, result_raw,
formatted_address - The fully formatted address returned from API
address_1 - First address line returned from API
address_2 - Second address line returned from API
+ address_3 - Third address line returned from API
city - City returned from API
state - State returned from API
postal - Postal returned from API
@@ -136,6 +144,7 @@ def update_results(self, record_id, source_url, result_raw,
result_formatted_address = %s,
result_address_1 = %s,
result_address_2 = %s,
+ result_address_3 = %s,
result_city = %s,
result_state = %s,
result_postal = %s,
@@ -144,6 +153,7 @@ def update_results(self, record_id, source_url, result_raw,
result_longitude = %s
WHERE melissa_address_query_id = %s""",
(source_url, result_raw, result_codes, result_good,
- formatted_address, address_1, address_2, city, state,
- postal, country, latitude, longitude, record_id))
+ formatted_address, address_1, address_2, address_3,
+ city, state, postal, country, latitude, longitude,
+ record_id))
return cur.rowcount == 1
diff --git a/microsetta_private_api/repo/metadata_repo/_repo.py b/microsetta_private_api/repo/metadata_repo/_repo.py
index 52f716a3b..801da6ec0 100644
--- a/microsetta_private_api/repo/metadata_repo/_repo.py
+++ b/microsetta_private_api/repo/metadata_repo/_repo.py
@@ -18,8 +18,14 @@
# the vioscreen survey currently cannot be fetched from the database
# there seems to be some detached survey IDs -- see 000089779
# that account has a long and unusual history though
-TEMPLATES_TO_IGNORE = {10001, None}
-
+# Adding the MyFoodRepo, Polyphenol FFQ, and Spain FFQs to the
+# ignore list.
+TEMPLATES_TO_IGNORE = {10001, 10002, 10003, 10004, None}
+
+# TODO 2022-10-03
+# Adding questions from Cooking Oils & Oxalate-rich Foods survey
+# to ignore list as they don't exist in Qiita (OILS_*). We're blocked on
+# pushing them, pending an update to Qiita's API.
EBI_REMOVE = ['ABOUT_YOURSELF_TEXT', 'ANTIBIOTIC_CONDITION',
'ANTIBIOTIC_MED', 'PM_NAME', 'PM_EMAIL',
'BIRTH_MONTH', 'CAT_CONTACT', 'CAT_LOCATION',
@@ -37,7 +43,10 @@
'COVID_SYMPTOMS_OTHER', 'FERMENTED_CONSUMED_OTHER',
'FERMENTED_OTHER', 'FERMENTED_PRODUCE_COMMERCIAL_OTHER',
'FERMENTED_PRODUCE_PERSONAL_OTHER',
- 'OTHER_ANIMALS_FREE_TEXT']
+ 'OTHER_ANIMALS_FREE_TEXT', 'OILS_FREQUENCY_VEGETABLE',
+ 'OILS_FREQUENCY_ANIMAL', 'OILS_FREQUENCY_OTHER',
+ 'OILS_FREQUENCY_MARGARINE', 'OILS_FREQUENCY_OXALATE'
+ 'OILS_FREQUENCY_SOY']
def drop_private_columns(df):
@@ -177,24 +186,31 @@ def _fetch_survey_template(template_id):
-------
dict
The survey structure as returned from the private API
- dict or None
+ string or None
Any error information associated with the retreival. If an error is
observed, the survey responses should not be considered valid.
"""
with Transaction() as t:
+ error = None
+
survey_template_repo = SurveyTemplateRepo(t)
info = survey_template_repo.get_survey_template_link_info(
template_id)
# For local surveys, we generate the json representing the survey
- survey_template = survey_template_repo.get_survey_template(
- template_id, "en_US")
- survey_template_text = vue_adapter.to_vue_schema(survey_template)
+ try:
+ survey_template = survey_template_repo.get_survey_template(
+ template_id, "en_US")
+ except NotFound as e:
+ error = repr(e)
+
+ if error is None:
+ survey_template_text = vue_adapter.to_vue_schema(survey_template)
- info = info.to_api(None, None)
- info['survey_template_text'] = survey_template_text
+ info = info.to_api(None, None)
+ info['survey_template_text'] = survey_template_text
- return info, None
+ return info, error
def _to_pandas_dataframe(metadatas, survey_templates):
diff --git a/microsetta_private_api/repo/metadata_repo/tests/test_repo.py b/microsetta_private_api/repo/metadata_repo/tests/test_repo.py
index 0525bfa6b..56a93e58d 100644
--- a/microsetta_private_api/repo/metadata_repo/tests/test_repo.py
+++ b/microsetta_private_api/repo/metadata_repo/tests/test_repo.py
@@ -167,6 +167,14 @@ def test_fetch_survey_template(self):
self.assertEqual(survey, exp)
self.assertEqual(errors, None)
+ def test_fetch_survey_template_remote(self):
+ # attempt to fetch info for Vioscreen survey
+ survey, errors = _fetch_survey_template(10001)
+
+ # verify that _fetch_survey_template returns an error, reflecting
+ # that it's a remote survey for which we can't extract local data
+ self.assertNotEqual(errors, None)
+
def test_drop_private_columns(self):
df = pd.DataFrame([[1, 2, 3], [4, 5, 6]],
columns=['pM_foo', 'okay', 'ABOUT_yourSELF_TEXT'])
diff --git a/microsetta_private_api/repo/survey_answers_repo.py b/microsetta_private_api/repo/survey_answers_repo.py
index 69f8ccc16..3118349ac 100644
--- a/microsetta_private_api/repo/survey_answers_repo.py
+++ b/microsetta_private_api/repo/survey_answers_repo.py
@@ -67,6 +67,21 @@ def survey_template_id_and_status(self, survey_answers_id):
# the Polyphenol FFQ
pass
+ # see if it's the Spain FFQ
+ try:
+ uuid.UUID(survey_answers_id)
+ cur.execute("""SELECT EXISTS (
+ SELECT spain_ffq_id
+ FROM ag.spain_ffq_registry
+ WHERE spain_ffq_id=%s)""",
+ (survey_answers_id, ))
+ if cur.fetchone()[0] is True:
+ return SurveyTemplateRepo.SPAIN_FFQ_ID, None
+ except ValueError:
+ # Note: we don't care about the error, just means it's not
+ # the Spain FFQ
+ pass
+
# see if it's myfoodrepo
cur.execute("""SELECT EXISTS (
SELECT myfoodrepo_id
@@ -349,6 +364,18 @@ def delete_answered_survey(self, acct_id, survey_id):
# Note: we don't care about the error, just means it's not
# the Polyphenol FFQ
pass
+ try:
+ uuid.UUID(survey_id)
+ cur.execute("UPDATE spain_ffq_registry SET "
+ "deleted = true, "
+ "source_id = NULL "
+ "WHERE "
+ "account_id = %s AND spain_ffq_id = %s",
+ (acct_id, survey_id))
+ except ValueError:
+ # Note: we don't care about the error, just means it's not
+ # the Spain FFQ
+ pass
return True
def associate_answered_survey_with_sample(self, account_id, source_id,
@@ -392,7 +419,8 @@ def dissociate_answered_survey_from_sample(self, account_id, source_id,
"barcode = %s AND "
"survey_id = %s",
(s.barcode, survey_id))
- # Also delete from vioscreen, myfoodrepo and polyphenol registries
+ # Also delete from vioscreen, myfoodrepo, polyphenol, and Spain
+ # registries
cur.execute("UPDATE vioscreen_registry "
"SET deleted=true "
"WHERE "
@@ -421,6 +449,19 @@ def dissociate_answered_survey_from_sample(self, account_id, source_id,
# Note: we don't care about the error, just means it's not
# the Polyphenol FFQ
pass
+ try:
+ uuid.UUID(survey_id)
+ cur.execute("UPDATE spain_ffq_registry "
+ "SET deleted = true "
+ "WHERE "
+ "account_id = %s AND "
+ "source_id = %s AND "
+ "spain_ffq_id = %s",
+ (account_id, source_id, survey_id))
+ except ValueError:
+ # Note: we don't care about the error, just means it's not
+ # the Spain FFQ
+ pass
def build_metadata_map(self):
with self._transaction.cursor() as cur:
diff --git a/microsetta_private_api/repo/survey_template_repo.py b/microsetta_private_api/repo/survey_template_repo.py
index ed1b0a4ff..85874b2a9 100644
--- a/microsetta_private_api/repo/survey_template_repo.py
+++ b/microsetta_private_api/repo/survey_template_repo.py
@@ -23,6 +23,7 @@ class SurveyTemplateRepo(BaseRepo):
VIOSCREEN_ID = 10001
MYFOODREPO_ID = 10002
POLYPHENOL_FFQ_ID = 10003
+ SPAIN_FFQ_ID = 10004
SURVEY_INFO = {
1: SurveyTemplateLinkInfo(
1,
@@ -83,6 +84,12 @@ class SurveyTemplateRepo(BaseRepo):
"Polyphenol Food Frequency Questionnaire",
"1.0",
"remote"
+ ),
+ SPAIN_FFQ_ID: SurveyTemplateLinkInfo(
+ SPAIN_FFQ_ID,
+ "Spain Food Frequency Questionnaire",
+ "1.0",
+ "remote"
)
}
@@ -111,7 +118,8 @@ def get_survey_template(self, survey_id, language_tag):
tag_to_col = {
localization.EN_US: "survey_question.american",
localization.EN_GB: "survey_question.british",
- localization.ES_MX: "survey_question.spanish"
+ localization.ES_MX: "survey_question.spanish",
+ localization.ES_ES: "survey_question.spain_spanish"
}
if language_tag not in tag_to_col:
@@ -178,8 +186,9 @@ def get_survey_template(self, survey_id, language_tag):
triggers = self._get_question_triggers(question_id)
# Quick fix to correctly sort country names in Spanish
- if language_tag == localization.ES_MX and \
- (question_id == 110 or question_id == 148):
+ if (language_tag == localization.ES_MX or language_tag ==
+ localization.ES_ES) and (question_id == 110 or
+ question_id == 148):
responses[1:len(responses)] = \
sorted(responses[1:len(responses)])
@@ -205,7 +214,8 @@ def _get_group_localized_text(self, group_id, language_tag):
tag_to_col = {
localization.EN_US: "american",
localization.EN_GB: "british",
- localization.ES_MX: "spanish"
+ localization.ES_MX: "spanish",
+ localization.ES_ES: "spain_spanish"
}
with self._transaction.cursor() as cur:
cur.execute("SELECT " +
@@ -223,6 +233,7 @@ def _get_question_valid_responses(self, survey_question_id, language_tag):
localization.EN_US: "survey_response.american",
localization.EN_GB: "survey_response.british",
localization.ES_MX: "survey_response.spanish",
+ localization.ES_ES: "survey_response.spain_spanish",
}
with self._transaction.cursor() as cur:
@@ -456,6 +467,79 @@ def get_polyphenol_ffq_id_if_exists(self, account_id, source_id):
else:
return res
+ def create_spain_ffq_entry(self, account_id, source_id):
+ """Return a newly created Spain FFQ ID
+
+ Parameters
+ ----------
+ account_id : str, UUID
+ The account UUID
+ source_id : str, UUID
+ The source UUID
+
+ Returns
+ -------
+ UUID
+ The newly created Spain FFQ ID
+ """
+ with self._transaction.cursor() as cur:
+ cur.execute("""INSERT INTO ag.spain_ffq_registry
+ (account_id, source_id)
+ VALUES (%s, %s)
+ RETURNING spain_ffq_id""",
+ (account_id, source_id))
+ spain_ffq_id = cur.fetchone()[0]
+ if spain_ffq_id is None:
+ raise RepoException("Error creating Spain FFQ entry")
+ else:
+ # Put a survey into ag_login_surveys
+ cur.execute("INSERT INTO ag_login_surveys("
+ "ag_login_id, "
+ "survey_id, "
+ "vioscreen_status, "
+ "source_id) "
+ "VALUES(%s, %s, %s, %s)",
+ (account_id, spain_ffq_id, None, source_id))
+
+ return spain_ffq_id
+
+ def get_spain_ffq_id_if_exists(self, account_id, source_id):
+ """Return a Spain FFQ ID if one exists
+
+ Parameters
+ ----------
+ account_id : str, UUID
+ The account UUID
+ source_id : str, UUID
+ The source UUID
+
+ Returns
+ -------
+ UUID or None
+ The associated Spain FFQ ID or None
+ """
+ with self._transaction.cursor() as cur:
+ cur.execute("""SELECT spain_ffq_id
+ FROM ag.spain_ffq_registry
+ WHERE account_id=%s AND source_id=%s""",
+ (account_id, source_id))
+ res = cur.fetchone()
+
+ if res is None:
+ return None
+ else:
+ return res[0]
+
+ def get_vioscreen_sample_to_user(self):
+ """Obtain a mapping of sample barcode to vioscreen user"""
+ with self._transaction.cursor() as cur:
+ cur.execute("""SELECT barcode, vio_id
+ FROM ag.vioscreen_registry
+ JOIN ag.ag_kit_barcodes
+ ON sample_id=ag_kit_barcode_id
+ WHERE vio_id IS NOT NULL""")
+ return {r[0]: r[1] for r in cur.fetchall()}
+
def create_vioscreen_id(self, account_id, source_id,
vioscreen_ext_sample_id):
with self._transaction.cursor() as cur:
diff --git a/microsetta_private_api/repo/tests/test_account.py b/microsetta_private_api/repo/tests/test_account.py
index 0321bd98e..07cf50280 100644
--- a/microsetta_private_api/repo/tests/test_account.py
+++ b/microsetta_private_api/repo/tests/test_account.py
@@ -91,6 +91,7 @@ def test_geocode_accounts_valid(self, test_verify_address):
test_verify_address.return_value = {
"address_1": DUMMY_ACCT_INFO_1['address']['street'],
"address_2": "",
+ "address_3": "",
"city": DUMMY_ACCT_INFO_1['address']['city'],
"state": DUMMY_ACCT_INFO_1['address']['state'],
"postal": DUMMY_ACCT_INFO_1['address']['post_code'],
@@ -122,6 +123,7 @@ def test_geocode_accounts_invalid(self, test_verify_address):
test_verify_address.return_value = {
"address_1": DUMMY_ACCT_INFO_1['address']['street'],
"address_2": "",
+ "address_3": "",
"city": DUMMY_ACCT_INFO_1['address']['city'],
"state": DUMMY_ACCT_INFO_1['address']['state'],
"postal": DUMMY_ACCT_INFO_1['address']['post_code'],
diff --git a/microsetta_private_api/repo/tests/test_interested_user_repo.py b/microsetta_private_api/repo/tests/test_interested_user_repo.py
index e454892e9..e5748c588 100644
--- a/microsetta_private_api/repo/tests/test_interested_user_repo.py
+++ b/microsetta_private_api/repo/tests/test_interested_user_repo.py
@@ -149,6 +149,7 @@ def test_verify_address_not_verified_is_valid(self, test_verify_address):
test_verify_address.return_value = {
"address_1": ADDRESS_1,
"address_2": ADDRESS_2,
+ "address_3": "",
"city": CITY,
"state": STATE,
"postal": POSTAL,
@@ -181,6 +182,7 @@ def test_verify_address_not_verified_is_invalid(self, test_verify_address):
test_verify_address.return_value = {
"address_1": ADDRESS_1,
"address_2": ADDRESS_2,
+ "address_3": "",
"city": CITY,
"state": STATE,
"postal": POSTAL,
diff --git a/microsetta_private_api/repo/tests/test_survey_template_repo.py b/microsetta_private_api/repo/tests/test_survey_template_repo.py
index dee5aebfb..f8358a0ab 100644
--- a/microsetta_private_api/repo/tests/test_survey_template_repo.py
+++ b/microsetta_private_api/repo/tests/test_survey_template_repo.py
@@ -278,6 +278,44 @@ def test_get_polyphenol_ffq_id_if_exists_false(self):
TEST1_SOURCE_ID)
self.assertEqual(obs, (None, None))
+ def test_create_spain_ffq_entry_valid(self):
+ with Transaction() as t:
+ template_repo = SurveyTemplateRepo(t)
+ obs = template_repo.create_spain_ffq_entry(TEST1_ACCOUNT_ID,
+ TEST1_SOURCE_ID)
+ try:
+ uuid.UUID(obs)
+ valid_uuid_returned = True
+ except ValueError:
+ valid_uuid_returned = False
+ self.assertTrue(valid_uuid_returned)
+
+ def test_create_spain_ffq_entry_invalid(self):
+ with Transaction() as t:
+ template_repo = SurveyTemplateRepo(t)
+ with self.assertRaises(InvalidTextRepresentation):
+ template_repo.create_spain_ffq_entry('',
+ TEST1_SOURCE_ID)
+
+ def test_get_spain_ffq_id_if_exists_true(self):
+ with Transaction() as t:
+ template_repo = SurveyTemplateRepo(t)
+ test_sffq_id = \
+ template_repo.create_spain_ffq_entry(TEST1_ACCOUNT_ID,
+ TEST1_SOURCE_ID)
+ obs = \
+ template_repo.get_spain_ffq_id_if_exists(TEST1_ACCOUNT_ID,
+ TEST1_SOURCE_ID)
+ self.assertEqual(test_sffq_id, obs)
+
+ def test_get_spain_ffq_id_if_exists_false(self):
+ with Transaction() as t:
+ template_repo = SurveyTemplateRepo(t)
+ obs = \
+ template_repo.get_spain_ffq_id_if_exists(TEST1_ACCOUNT_ID,
+ TEST1_SOURCE_ID)
+ self.assertEqual(obs, None)
+
def test_create_vioscreen_id_valid(self):
with Transaction() as t:
template_repo = SurveyTemplateRepo(t)
@@ -343,3 +381,19 @@ def test_get_vioscreen_id_if_exists_invalid(self):
TEST2_SOURCE_ID,
TEST2_SAMPLE_ID)
self.assertEqual(obs, None)
+
+ def test_get_vioscreen_sample_to_user(self):
+ with Transaction() as t:
+ template_repo = SurveyTemplateRepo(t)
+ obs = template_repo.get_vioscreen_sample_to_user()
+
+ # manually checked using
+ # select barcode, sample_id, vio_id
+ # from ag.vioscreen_registry
+ # join ag.ag_kit_barcodes on sample_id=ag_kit_barcode_id
+ # limit 10;
+ tests = [('000031536', 'b98c5ac966b754ff'),
+ ('000020495', '8fecc8f34a133eb8'),
+ ('000023245', '52abc2ea83c08b96')]
+ for sample, user in tests:
+ self.assertEqual(obs.get(sample), user)
diff --git a/microsetta_private_api/server.py b/microsetta_private_api/server.py
index da9f4a251..200996a7c 100644
--- a/microsetta_private_api/server.py
+++ b/microsetta_private_api/server.py
@@ -9,7 +9,7 @@
from microsetta_private_api.exceptions import RepoException
from microsetta_private_api.celery_utils import celery, init_celery
-from microsetta_private_api.localization import EN_US, ES_MX
+from microsetta_private_api.localization import EN_US, ES_MX, ES_ES
"""
@@ -85,7 +85,7 @@ def get_locale():
if not flask.has_request_context():
return EN_US
- return request.accept_languages.best_match([EN_US, ES_MX],
+ return request.accept_languages.best_match([EN_US, ES_ES, ES_MX],
default=EN_US)
init_celery(celery, app.app)
diff --git a/microsetta_private_api/server_config.json b/microsetta_private_api/server_config.json
index a96840034..162a99f20 100644
--- a/microsetta_private_api/server_config.json
+++ b/microsetta_private_api/server_config.json
@@ -40,5 +40,6 @@
"fundrazr_key": "fundrazr_api_placeholder",
"fundrazr_url": "fundrazr_url_placeholder",
"fundrazr_organization": "fundrazr_org_placeholder",
- "polyphenol_ffq_url": "pffq_placeholder"
+ "polyphenol_ffq_url": "pffq_placeholder",
+ "spain_ffq_url": "sffq_placeholder"
}
diff --git a/microsetta_private_api/translations/en_US/LC_MESSAGES/messages.po b/microsetta_private_api/translations/en_US/LC_MESSAGES/messages.po
index de36e8553..2a627eaf4 100644
--- a/microsetta_private_api/translations/en_US/LC_MESSAGES/messages.po
+++ b/microsetta_private_api/translations/en_US/LC_MESSAGES/messages.po
@@ -7,16 +7,40 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2021-06-10 13:58-0700\n"
+"POT-Creation-Date: 2022-09-01 20:49-0700\n"
"PO-Revision-Date: 2021-06-03 17:28-0700\n"
"Last-Translator: FULL NAME