Skip to content

Commit

Permalink
Apresenta aba de medicamentos comercializados (RxNorm). #14
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciusandrade committed Aug 14, 2019
1 parent 70ea8c1 commit a0e0f50
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 43 deletions.
Binary file modified app/locale/es/LC_MESSAGES/django.mo
Binary file not shown.
57 changes: 34 additions & 23 deletions app/locale/es/LC_MESSAGES/django.po
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: medlist-0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-07 14:28-0300\n"
"PO-Revision-Date: 2019-08-07 14:33-0306\n"
"POT-Creation-Date: 2019-08-14 15:28-0300\n"
"PO-Revision-Date: 2019-08-14 15:33-0306\n"
"Last-Translator: b' <admin@localhost.com>'\n"
"Language-Team: BIREME <reddes@bireme.org>\n"
"Language: \n"
Expand Down Expand Up @@ -79,12 +79,10 @@ msgid "composition"
msgstr "composición"

#: directory/models.py:101
#| msgid "composition"
msgid "composition (Spanish)"
msgstr "Composición (Español)"

#: directory/models.py:102
#| msgid "composition"
msgid "composition (Portuguese)"
msgstr "Composición (Portugués)"

Expand Down Expand Up @@ -193,7 +191,6 @@ msgid "year of publication"
msgstr "año de publicación"

#: history/models.py:34 list/models.py:39
#| msgid "section"
msgid "edition"
msgstr "Edición"

Expand Down Expand Up @@ -223,19 +220,19 @@ msgstr ""
msgid "history translations"
msgstr ""

#: list/admin.py:74
#: list/admin.py:80
msgid "Published or unpublished selected lists"
msgstr "Publicar o despublicar las listas seleccionadas"

#: list/admin.py:80
#: list/admin.py:86
msgid "Created of list archive copy successfully"
msgstr "Archivo de la lista creado con éxito"

#: list/admin.py:82
#: list/admin.py:88
msgid "Create a archive copy of selected lists"
msgstr "Crear una copia de archivo de las listas de seleccionados"

#: list/admin.py:117
#: list/admin.py:123
msgid "Indexes these pharmaceutical forms"
msgstr "Indizar estas formas farmacéuticas"

Expand Down Expand Up @@ -288,32 +285,26 @@ msgid "specialist care for children"
msgstr "especialista en el cuidado de los niños"

#: list/models.py:208
#| msgid "observation"
msgid "Observations (English)"
msgstr "Observaciones (Inglés)"

#: list/models.py:209
#| msgid "observation"
msgid "Observations (Spanish)"
msgstr "Observaciones (Español)"

#: list/models.py:210
#| msgid "observation"
msgid "Observations (Portuguese)"
msgstr "Observaciones (Portugués)"

#: list/models.py:211
#| msgid "restriction age or weight"
msgid "Restriction age or weight (English)"
msgstr "Restricción de la edad o el peso (Inglés)"

#: list/models.py:212
#| msgid "restriction age or weight"
msgid "Restriction age or weight (Spanish)"
msgstr "Restricción de la edad o el peso (Español)"

#: list/models.py:213
#| msgid "restriction age or weight"
msgid "Restriction age or weight (Portuguese)"
msgstr "Restricción de la edad o el peso (Portugués)"

Expand Down Expand Up @@ -350,12 +341,12 @@ msgid "List"
msgstr "Lista"

#: templates/directory/show_medicine.html:46
#| msgid "section"
msgid "Section"
msgstr "Sección"

#: templates/directory/show_medicine.html:47
#| msgid "observation"
#: templates/directory/show_medicine.html:47 templates/list/show_list.html:58
#: templates/list/show_list.html:77 templates/list/show_list.html:96
#: templates/list/show_list.html:115
msgid "Observation"
msgstr "Observación"

Expand Down Expand Up @@ -397,12 +388,16 @@ msgstr "Produccion Cientifica"
msgid "Medicine Evidences Summaries"
msgstr "Sumarios de Evidencia"

#: templates/directory/show_medicine.html:118
#: templates/directory/show_medicine.html:115
msgid "Marketed Drugs"
msgstr "Medicamentos Comercializadas"

#: templates/directory/show_medicine.html:123
#: templates/directory/show_medicine.html:141
msgid "Loading"
msgstr "Cargando"

#: templates/history/show_history.html:27 templates/list/show_list.html:31
#| msgid "history"
msgid "History"
msgstr "Histórico"

Expand Down Expand Up @@ -447,15 +442,19 @@ msgid "Sorry, but there's no results for this filter's combination."
msgstr "No hay resultados para esta combinación de filtro."

#: templates/list/section.html:93
#| msgid "medicine"
msgid "Add medicine"
msgstr "Añadir medicamento"

#: templates/list/section.html:158 templates/list/section.html:165
#| msgid "section"
#: templates/list/section.html:159 templates/list/section.html:167
#: templates/list/section.html:183
msgid "Add section"
msgstr "Añadir sección"

#: templates/list/show_list.html:67 templates/list/show_list.html:86
#: templates/list/show_list.html:105 templates/list/show_list.html:124
msgid "Close"
msgstr "Cerrar"

#: templates/main/index.html:5
msgid "Home"
msgstr "Início"
Expand All @@ -464,6 +463,18 @@ msgstr "Início"
msgid "Compare lists"
msgstr "Compare las listas"

#: templates/utils/rxnorm_data.html:6
msgid "Branded Drug or Pack"
msgstr "Medicamento de Marca ou Paquete"

#: templates/utils/rxnorm_data.html:8
msgid "Clinical Drug or Pack"
msgstr "Medicamento Clínico ou Pacote"

#: templates/utils/rxnorm_data.html:20
msgid "No information available"
msgstr "No hay información disponible"

#~ msgid "restriction age or weight"
#~ msgstr "restricción de la edad o el peso"

Expand Down
Binary file modified app/locale/pt/LC_MESSAGES/django.mo
Binary file not shown.
52 changes: 34 additions & 18 deletions app/locale/pt/LC_MESSAGES/django.po
Expand Up @@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: medlist-0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-07 14:28-0300\n"
"PO-Revision-Date: 2019-08-07 14:35-0306\n"
"POT-Creation-Date: 2019-08-14 15:28-0300\n"
"PO-Revision-Date: 2019-08-14 15:31-0306\n"
"Last-Translator: b' <admin@localhost.com>'\n"
"Language-Team: BIREME <reddes@bireme.org>\n"
"Language: \n"
Expand Down Expand Up @@ -80,12 +80,10 @@ msgid "composition"
msgstr "composição"

#: directory/models.py:101
#| msgid "composition"
msgid "composition (Spanish)"
msgstr "Composição (Espanhol)"

#: directory/models.py:102
#| msgid "composition"
msgid "composition (Portuguese)"
msgstr "Composição (Português)"

Expand Down Expand Up @@ -194,7 +192,6 @@ msgid "year of publication"
msgstr "ano de publicação"

#: history/models.py:34 list/models.py:39
#| msgid "section"
msgid "edition"
msgstr "Edição"

Expand All @@ -221,23 +218,22 @@ msgid "history translation"
msgstr ""

#: history/models.py:74
#| msgid "Evidence Summary Translations"
msgid "history translations"
msgstr "Traduções de histórico"

#: list/admin.py:74
#: list/admin.py:80
msgid "Published or unpublished selected lists"
msgstr "Publicar ou despublicar as listas selecionadas"

#: list/admin.py:80
#: list/admin.py:86
msgid "Created of list archive copy successfully"
msgstr "Criação do histórico da lista realizada com sucesso"

#: list/admin.py:82
#: list/admin.py:88
msgid "Create a archive copy of selected lists"
msgstr "Cria uma cópia de histórico das listas selecionadas"

#: list/admin.py:117
#: list/admin.py:123
msgid "Indexes these pharmaceutical forms"
msgstr "indexar estas formas farmacêuticas"

Expand Down Expand Up @@ -348,12 +344,12 @@ msgid "List"
msgstr "Listas"

#: templates/directory/show_medicine.html:46
#| msgid "section"
msgid "Section"
msgstr "Seção"

#: templates/directory/show_medicine.html:47
#| msgid "observation"
#: templates/directory/show_medicine.html:47 templates/list/show_list.html:58
#: templates/list/show_list.html:77 templates/list/show_list.html:96
#: templates/list/show_list.html:115
msgid "Observation"
msgstr "Observação"

Expand Down Expand Up @@ -393,12 +389,16 @@ msgstr "Produção Científica"
msgid "Medicine Evidences Summaries"
msgstr "Sumários de Evidência"

#: templates/directory/show_medicine.html:118
#: templates/directory/show_medicine.html:115
msgid "Marketed Drugs"
msgstr "Medicamentos Comercializados"

#: templates/directory/show_medicine.html:123
#: templates/directory/show_medicine.html:141
msgid "Loading"
msgstr "Carregando"

#: templates/history/show_history.html:27 templates/list/show_list.html:31
#| msgid "history"
msgid "History"
msgstr "Histórico"

Expand Down Expand Up @@ -444,15 +444,19 @@ msgstr ""
"Desculpe, não existe resultado para a combinação de filtros escolhida."

#: templates/list/section.html:93
#| msgid "medicine"
msgid "Add medicine"
msgstr "Adicionar medicamento"

#: templates/list/section.html:158 templates/list/section.html:165
#| msgid "section"
#: templates/list/section.html:159 templates/list/section.html:167
#: templates/list/section.html:183
msgid "Add section"
msgstr "Adicionar seção"

#: templates/list/show_list.html:67 templates/list/show_list.html:86
#: templates/list/show_list.html:105 templates/list/show_list.html:124
msgid "Close"
msgstr "Fechar"

#: templates/main/index.html:5
msgid "Home"
msgstr "Início"
Expand All @@ -461,6 +465,18 @@ msgstr "Início"
msgid "Compare lists"
msgstr "comparar listas"

#: templates/utils/rxnorm_data.html:6
msgid "Branded Drug or Pack"
msgstr "Medicamento de Marca ou Pacote"

#: templates/utils/rxnorm_data.html:8
msgid "Clinical Drug or Pack"
msgstr "Droga Clínica ou Pacote"

#: templates/utils/rxnorm_data.html:20
msgid "No information available"
msgstr "Nenhuma informação disponível"

#~ msgid "restriction age or weight"
#~ msgstr "restrição de idade ou peso"

Expand Down
2 changes: 2 additions & 0 deletions app/medlist/urls.py
Expand Up @@ -40,6 +40,8 @@

re_path(r'^get_scientific_production/?$', utils_views.get_scientific_production, name='get_scientific_production'),

re_path(r'^get_rxnorm_data/?$', utils_views.get_rxnorm_data, name='get_rxnorm_data'),

# internationalization
re_path(r'^i18n/', include('django.conf.urls.i18n')),
#re_path(r'^cookie-lang/?$', 'utils.views.cookie_lang'),
Expand Down
23 changes: 22 additions & 1 deletion app/templates/directory/show_medicine.html
Expand Up @@ -111,7 +111,11 @@ <h1 class="titulo1"><span class="colorText">{% trans "Information Resources" %}:
<li class="nav-item">
<a class="nav-link {% if not evidences %}disabled{% endif %}" id="profile-tab" data-toggle="tab" href="#resource2" role="tab" aria-controls="profile" aria-selected="false">{% trans "Medicine Evidences Summaries" %}</a>
</li>
<li class="nav-item">
<a class="nav-link" id="rxnav-tab" data-toggle="tab" href="#resource3" role="tab" aria-controls="profile" aria-selected="false">{% trans "Marketed Drugs" %}</a>
</li>
</ul>

<div class="tab-content font12 containerTab" id="myTabContent">
<!-- resource1 -->
<div class="tab-pane fade show active" id="resource1" role="tabpanel" aria-labelledby="profile-tab">
Expand All @@ -131,6 +135,12 @@ <h1 class="titulo1"><span class="colorText">{% trans "Information Resources" %}:
{% endfor %}
{% endif %}
</div>
<!-- resource3 -->
<div class="tab-pane fade" id="resource3" role="tabpanel" aria-labelledby="rxnav-tab">
<div class="spinner-border" role="status">
<span class="sr-only">{% trans "Loading" %} ...</span>
</div>
</div>
</div>
</div>
</section>
Expand All @@ -139,13 +149,24 @@ <h1 class="titulo1"><span class="colorText">{% trans "Information Resources" %}:

{% block "extrafooter" %}
<script>
// Get scientific production
var similar_url = '{% url "home" %}get_scientific_production/?text={{medicine}}';
// Send the data
var jqxhr = $.get(similar_url);

// Put the results in a div
jqxhr.done(function( data ) {
$('#resource1').empty().append(data);
});

// Get RxNorm data
var rxnorm_url = '{% url "home" %}get_rxnorm_data/?medicine={{medicine}}'
var jqxhr = $.get(rxnorm_url);

// Put the results in a div
jqxhr.done(function( data ) {
$('#resource3').empty().append(data);
});


</script>
{% endblock %}
21 changes: 21 additions & 0 deletions app/templates/utils/rxnorm_data.html
@@ -0,0 +1,21 @@
{% load i18n %}

{% if term_list %}
{% for key, value_list in term_list.items %}
{% if key == 'SBD' %}
<b>{% trans "Branded Drug or Pack" %}</b>
{% elif key == 'SCD' %}
<b>{% trans "Clinical Drug or Pack" %}</b>
{% endif %}
<br/>

{% for value in value_list %}
<a href="https://mor.nlm.nih.gov/RxNav/search?searchBy=RXCUI&searchTerm={{value.id}}" target="_blank">
{{value.name}}
</a>
<hr>
{% endfor %}
{% endfor %}
{% else %}
{% trans "No information available" %}
{% endif %}

0 comments on commit a0e0f50

Please sign in to comment.