Skip to content

Traz para o **core** as atualizações já implementadas no **upload** para o app pid_provider - #1449

Open
robertatakenaka wants to merge 20 commits into
scieloorg:mainfrom
robertatakenaka:aplica_refatoracao_pid_provider_upload_pr_1026
Open

Traz para o **core** as atualizações já implementadas no **upload** para o app pid_provider#1449
robertatakenaka wants to merge 20 commits into
scieloorg:mainfrom
robertatakenaka:aplica_refatoracao_pid_provider_upload_pr_1026

Conversation

@robertatakenaka

@robertatakenaka robertatakenaka commented Jul 20, 2026

Copy link
Copy Markdown
Member

O que esse PR faz?

Este PR traz para o core as atualizações já implementadas no upload (1026) para o app pid_provider, aplicando um conjunto de refatorações no fluxo de correspondência/registro de XML e adicionando um modelo de auditoria por documento. Principais mudanças:

  • Nova estratégia de correspondência (matching) de XML já registrados: get_records/get_record/best_matches (baseados em score aditivo por campo) são substituídos por select_records (generator com estratégias em estágios: idsjournal-issue-articlejournal-article) e select_record/get_best_match, que comparam candidatos usando funções de similaridade textual (compare, compare_items, compare_lists em query_params.py), retornando percentual_score em vez de score bruto.
  • QueryBuilderPidProviderXML refatorado: centraliza o acesso via adapter_data, compare_data e xml_with_pre_data, e ganha validate_input_data() e article_location_params.
  • Nova auditoria por documento: modelo PidProviderXMLRegistration, que grava (via finally em register()) o resultado de cada tentativa (created, updated, skipped, forbidden, conflict, unmatched, bad_request, error), com detail em JSON. Este modelo substitui XMLEvent, que é removido junto com panels_event e o método add_event.
  • Migração 0017_pidproviderxmlregistration_remove_xmlevent_creator_and_more.py, que:
    • Cria o modelo PidProviderXMLRegistration (com FKs creator, updated_by, pid_provider_xml e índices pid_provide_pkg_nam_2db0b2_idx, pid_provide_event_s_3c9ae7_idx, pid_provide_created_94fb08_idx, pid_provide_pid_pro_c9fb0e_idx);
    • Remove os campos creator, ppxml e updated_by de XMLEvent e, em seguida, exclui o modelo XMLEvent;
    • Adiciona readable_data (JSONField) em PidProviderXML;
    • Adiciona detail (JSONField) e is_public (BooleanField) em XMLURL, altera o campo status (agora com choices) e cria o índice pid_provide_is_public_idx.
  • PidProviderXML.register() reescrito: usa try/except/finally para sempre registrar o evento de auditoria, inclusive quando is_updated sinaliza que o registro deve ser pulado (novo fluxo via exceção SkipSavePidProviderXML, em vez de retornar registered.data silenciosamente).
  • Correções de bugs:
    • merge_records: other_pid.current_version (atributo inexistente em OtherPid) corrigido para other_pid.version.
    • mark_items_as_invalid: o valor calculado de invalidade agora é de fato persistido via bulk_update.
    • add_collections (extraído de _save): usa FieldError para detectar se a coleção usa scielojournal ou journalproc, tratando a divergência estrutural entre upload e core.
  • Performance: PidProviderXMLManager customizado aplica select_related("current_version") em todo PidProviderXML.objects; uso de Prefetch(..., to_attr=...) em merge_records para não quebrar o cache do prefetch ao filtrar.
  • XMLURL: novo classmethod record() para centralizar a gravação de tentativas de URL com falha, usando os novos campos detail e is_public.
  • Wagtail admin: novos XMLURLViewSet e PidProviderXMLRegistrationViewSet registrados no PidProviderViewSetGroup.
  • Dependência: packtools atualizado de 4.15.0 para 4.16.8 (necessário para os novos métodos usados em models.py, como get_article_data, get_complete_publication_date, deprecated_sps_pkg_name_list, get_body_fragment).

Onde a revisão poderia começar?

pid_provider/models.py, pelo método PidProviderXML.register(). Em seguida, select_records/select_record/get_best_match no mesmo arquivo e compare/compare_items em pid_provider/query_params.py. Por fim, conferir a migração 0017_pidproviderxmlregistration_remove_xmlevent_creator_and_more.py, especialmente a remoção do modelo XMLEvent (dado que remove uma tabela existente).

Como este poderia ser testado manualmente?

  1. Subir o ambiente local com o banco migrado: python manage.py migrate pid_provider.
  2. Confirmar que a migração 0017 roda sem erros e que a tabela de XMLEvent deixa de existir (verificar se não há dependências externas quebradas por essa remoção, ex.: relatórios ou dashboards que ainda consultem XMLEvent).
  3. Enviar um XML novo (sem PID registrado) e verificar:
    • Criação de um novo PidProviderXML;
    • Criação de um PidProviderXMLRegistration com event_status="created".
  4. Reenviar o mesmo XML sem alterações e verificar que o processo é ignorado (SkipSavePidProviderXML).
  5. Enviar uma variação do XML do mesmo artigo (ex.: pequena alteração de título/autores) e conferir que select_record/get_best_match reconhece o mesmo documento e atualiza (event_status="updated").
  6. Forçar um conflito (dois XMLs com PID v3 igual mas dados de artigo divergentes) e verificar o event_status="conflict"/unmatched.
  7. Acessar o Wagtail admin e conferir as novas listagens "XML URLs" e "PID Registration Events", validando filtros (status, is_public, event_status).
  8. Rodar a suíte de testes do app pid_provider (python manage.py test pid_provider).

Algum cenário de contexto que queira dar?

O app pid_provider é compartilhado entre os sistemas upload e core. As mudanças deste PR já foram desenvolvidas e validadas no upload e este PR traz essas atualizações para o core, mantendo os dois projetos alinhados. A migração inclui a remoção definitiva do modelo XMLEvent (substituído por PidProviderXMLRegistration), portanto é importante avaliar se há dados históricos relevantes em XMLEvent antes de aplicar em produção. A atualização do packtools para 4.16.8 é pré-requisito funcional das mudanças em models.py.

Screenshots

Não aplicável (mudanças de backend/modelo de dados).

Quais são os tickets relevantes?

#1447
scieloorg/scms-upload#1026

Referências

  • Documentação interna do fluxo pid_provider (registro e correspondência de XML).
  • Padrão de auditoria já adotado em proc/package (resultados estruturados em dict).
  • Changelog do packtools entre 4.15.0 e 4.16.8.

Segurança da informação (NSI.04)

Este PR manipula dados sensíveis ou pessoais (LGPD)?

  • Sim
  • Não — readable_data e o detail de auditoria armazenam metadados bibliográficos já presentes no XML público do documento; nenhum dado pessoal sensível é tratado.

Este PR altera autenticação, autorização, controle de acesso ou gerenciamento de sessão?

  • Sim
  • Não

Este PR introduz, atualiza ou remove dependências de terceiros?

  • Sim
  • Não — o packtools é biblioteca própria da SciELO (scieloorg/packtools), não uma dependência de terceiros; trata-se apenas de bump de versão interno necessário para os novos métodos usados nesta refatoração.

Este PR foi validado pelo pipeline de segurança (SonarQube / Trivy)?

  • Sim — link do job:
  • Não aplicável a este PR — nenhuma dependência de terceiros foi adicionada ou alterada; aguardando execução do pipeline padrão do PR.

Este PR concatena, monta ou executa comandos SQL, HTML ou JavaScript a partir de entrada externa?

  • Sim
  • Não — todo o acesso a dados usa ORM do Django (Q, filter, Prefetch), sem SQL raw.

Este PR expõe novos endpoints, telas ou serviços?

  • Sim — novas telas administrativas no Wagtail (XMLURLViewSet, PidProviderXMLRegistrationViewSet), restritas à área administrativa (login/staff), seguindo as políticas de permissão já aplicadas aos demais snippets do app.
  • Não

Algum segredo, senha, chave ou token está sendo adicionado ao código-fonte?

  • Não, nenhum segredo foi commitado
  • Sim

Boa lembrança — ajusta a leitura de risco. Segue a correção:

Ajustes no texto do PR

No corpo do PR, troque a frase sobre o packtools por:

  • Dependência interna SciELO: packtools (biblioteca própria da organização, mantida em scieloorg/packtools) atualizado de 4.15.0 para 4.16.8 — necessário para os novos métodos usados em models.py (get_article_data, get_complete_publication_date, deprecated_sps_pkg_name_list, get_body_fragment).

E no "Algum cenário de contexto que queira dar?", ajuste a última frase para:

A atualização do packtools para 4.16.8 é pré-requisito funcional das mudanças em models.py — trata-se de biblioteca própria da SciELO (não é dependência de terceiros), então o risco de supply chain é o mesmo já assumido para o restante do ecossistema scieloorg.

Na seção de Segurança da Informação (NSI.04), corrija:

Este PR introduz, atualiza ou remove dependências de terceiros?

  • Sim
  • Não — o packtools é biblioteca própria da SciELO (scieloorg/packtools), não uma dependência de terceiros; trata-se apenas de bump de versão interno necessário para os novos métodos usados nesta refatoração.

Este PR foi validado pelo pipeline de segurança (SonarQube / Trivy)?

  • Sim — link do job:
  • Não aplicável a este PR — nenhuma dependência de terceiros foi adicionada ou alterada; aguardando execução do pipeline padrão do PR.

Propósito: disponibilizar os novos métodos do packtools utilizados pelas
refatorações do pid_provider (get_article_data, get_complete_publication_date,
deprecated_sps_pkg_name_list, get_body_fragment).
Solução técnica: bump de versão fixado via git+https no requirements/base.txt.
Propósito: padronizar os valores possíveis do campo status do modelo XMLURL,
substituindo texto livre por opções controladas.
Solução técnica: cria XMLURL_STATUS_SUCCESS, XMLURL_STATUS_XML_FETCH_FAILED,
XMLURL_STATUS_PID_PROVIDER_XML_FAILED e a tupla XMLURL_STATUS.
Propósito: permitir que is_updated() sinalize, via exceção, que o registro
deve ser ignorado (equal ou já atualizado), em vez de retornar dados
silenciosamente.
Solução técnica: cria a classe SkipSavePidProviderXML(Exception).
…omparação por similaridade

Propósito: substituir o cálculo de score aditivo por campo por comparação
percentual baseada em similaridade textual, e simplificar o builder de
queries centralizando o acesso aos dados do adaptador.
Solução técnica: adiciona compare/compare_items/compare_lists usando
how_similar; QueryBuilderPidProviderXML passa a usar adapter_data,
compare_data e xml_with_pre_data como fonte única, com validate_input_data()
e article_location_params novos; remove as antigas cached_property
espelhando atributos do xml_adapter.
…e XML e cria auditoria por documento

Propósito: tornar o processo de identificação de documentos já registrados
mais preciso (comparação por similaridade em estágios) e garantir
rastreabilidade de toda tentativa de registro (sucesso, erro, conflito,
skip), substituindo o modelo de eventos XMLEvent.
Solução técnica:
- get_records/get_record/best_matches substituídos por select_records
  (generator em estágios: ids, journal-issue-article, journal-article),
  select_record e get_best_match, usando percentual_score.
- PidProviderXML.register() reescrito com try/except/finally, sempre
  gravando o evento via PidProviderXMLRegistration.record().
- is_updated() passa a levantar SkipSavePidProviderXML em vez de retornar
  registered.data.
- Novo PidProviderXMLManager aplicando select_related('current_version')
  por padrão.
- Novo campo readable_data em PidProviderXML.
- add_collections extraído de _save(), com fallback via FieldError entre
  scielojournal e journalproc (compatibilidade upload/core).
- Corrige bug em merge_records (other_pid.version, não
  other_pid.current_version) e em mark_items_as_invalid (persiste o status
  calculado via bulk_update).
- XMLURL ganha os campos detail e is_public e o classmethod record().
- Remove modelo XMLEvent e o método add_event().
…o de XMLEvent

Propósito: aplicar no banco de dados as mudanças de modelo introduzidas na
refatoração do pid_provider.
Solução técnica: cria o modelo PidProviderXMLRegistration com seus índices
(pid_provide_pkg_nam_2db0b2_idx, pid_provide_event_s_3c9ae7_idx,
pid_provide_created_94fb08_idx, pid_provide_pid_pro_c9fb0e_idx); remove os
campos creator, ppxml e updated_by de XMLEvent e em seguida exclui o modelo
XMLEvent; adiciona readable_data em PidProviderXML; adiciona detail e
is_public em XMLURL, altera o campo status (com choices) e cria o índice
pid_provide_is_public_idx.
…onViewSet no Wagtail admin

Propósito: permitir consulta, pela interface administrativa, das URLs com
falha de processamento (XMLURL) e dos eventos de auditoria de registro de
XML (PidProviderXMLRegistration).
Solução técnica: cria XMLURLViewSet e PidProviderXMLRegistrationViewSet
(list_display, list_filter, search_fields e select_related no
get_queryset) e os inclui em PidProviderViewSetGroup.
@robertatakenaka
robertatakenaka requested a review from patymori July 20, 2026 19:50
@patymori

Copy link
Copy Markdown

@robertatakenaka o pytest do CI está falhando porque está usando o docker-compose ao invés de docker compose

Comment thread pid_provider/models.py
from wagtailautocomplete.edit_handlers import AutocompletePanel

from collection.models import Collection
from core.widgets import ReadOnlyPrettyJSONWidget

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ocorreu o seguinte erro:

Traceback (most recent call last):
  File "/app/manage.py", line 31, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 416, in execute
    django.setup()
  File "/usr/local/lib/python3.11/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.11/site-packages/django/apps/registry.py", line 116, in populate
    app_config.import_models()
  File "/usr/local/lib/python3.11/site-packages/django/apps/config.py", line 269, in import_models
    self.models_module = import_module(models_module_name)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/app/article/models.py", line 47, in <module>
    from pid_provider.models import PidProviderXML
  File "/app/pid_provider/models.py", line 24, in <module>
    from core.widgets import ReadOnlyPrettyJSONWidget
ModuleNotFoundError: No module named 'core.widgets'

@robertatakenaka
robertatakenaka requested a review from patymori July 21, 2026 11:18

@patymori patymori left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Verificar os impactos da remoção do método PidProviderXML.add_event()
  • Remoção de testes unitários do módulo invalida um dos pontos dos testes manuais sugeridos no PR
  • Sugestão: aumentar a cobertura de testes unitários no módulo article.

Comment thread pid_provider/models.py
return True
return False

def add_event(self, name, proc_status, detail=None, errors=None, exceptions=None):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…erXML

Propósito: Reverter a remoção do model XMLEvent feita em refatoração
anterior — o rastreio de eventos por documento (registration attempts,
validation errors, etc.) via XMLEvent ainda é necessário e não deve ser
substituído pelo novo PidProviderXMLRegistration, que serve a um
propósito complementar (auditoria agregada de register()), não ao
histórico de eventos por instância de PidProviderXML.

Solução técnica: Reintroduzido o import de BaseEvent em
'from tracker.models import BaseEvent, UnexpectedEvent'. Restaurado o
método PidProviderXML.add_event(name, proc_status, detail=None,
errors=None, exceptions=None), que atualiza proc_status, salva a
instância e delega o registro do evento a XMLEvent.register(). Restaurado
o model XMLEvent(BaseEvent, CommonControlField), com o campo ppxml
(ParentalKey para PidProviderXML, related_name='events') e o classmethod
register(), que cria a instância, marca completed conforme presença de
errors/exceptions e delega a finalização a BaseEvent.finish().
Propósito: Consistência com a reversão feita em models.py — como o model
XMLEvent voltou a existir no código, a migration 0017 (que removia seus
campos creator/ppxml/updated_by e por fim o próprio model via
DeleteModel) deixou de refletir o estado real dos models e precisa ser
descartada.

Solução técnica: Excluído o arquivo
pid_provider/migrations/0017_pidproviderxmlregistration_remove_xmlevent_creator_and_more.py.
A criação de PidProviderXMLRegistration e os demais campos que essa
migration também introduzia (readable_data, XMLURL.detail/is_public,
choices de XMLURL.status, índices) precisam ser recriados em uma nova
migration, desta vez sem a remoção de XMLEvent — rodar
'python manage.py makemigrations pid_provider' para gerá-la a partir do
estado atual dos models.
@robertatakenaka
robertatakenaka requested a review from patymori July 21, 2026 14:40
@robertatakenaka

Copy link
Copy Markdown
Member Author

@patymori o foco principal deste PR é para garantir a atribuição / recuperação do pid v3 que não deve ter relacionamento diretamente com o Article, pois se houver o PR vai ficar muito extenso.

@patymori patymori left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ocorreu um outro erro:

 /usr/local/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
   warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
 System check identified some issues:
 
 WARNINGS:
 ?: (urls.W005) URL namespace 'pid_provider' isn't unique. You may not be able to reverse all URLs in this namespace
 ?: (wagtailadmin.W003) The WAGTAILADMIN_BASE_URL setting is not defined
 	HINT: This should be the base URL used to access the Wagtail admin site. Without this, admin URLs outside of the admin (e.g. notification emails and the user bar) will not display correctly.
 ?: settings.ACCOUNT_AUTHENTICATION_METHOD is deprecated, use: settings.ACCOUNT_LOGIN_METHODS = {'username'}
 ?: settings.ACCOUNT_EMAIL_REQUIRED is deprecated, use: settings.ACCOUNT_SIGNUP_FIELDS = ['email*', 'username*', 'password1*', 'password2*']
 pid_provider.FixPidV2.pid_provider_xml: (fields.W342) Setting unique=True on a ForeignKey has the same effect as using a OneToOneField.
 	HINT: ForeignKey(unique=True) is usually better served by a OneToOneField.
 Operations to perform:
   Apply all migrations: account, admin, altmetric, article, auth, book, collection, contenttypes, core, core_settings, django_celery_beat, django_celery_results, doi, doi_manager, editorialboard, files_storage, home, institution, issue, journal, journalpage, location, organization, otp_totp, pid_provider, reference, report, researcher, sessions, silk, simple_translation, sites, socialaccount, taggit, thematic_areas, tracker, users, vocabulary, wagtail_2fa, wagtail_localize, wagtailadmin, wagtailcore, wagtaildocs, wagtailembeds, wagtailforms, wagtailimages, wagtailredirects, wagtailsearch, wagtailsearchpromotions, wagtailusers, xml_validation
 Running migrations:
 Traceback (most recent call last):
   File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 103, in _execute
     return self.cursor.execute(sql)
            ^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-packages/django_prometheus/db/common.py", line 69, in execute
     return super().execute(*args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 psycopg2.errors.DuplicateTable: relation "pid_provider_pidproviderxmlregistration" already exists
 
 
 The above exception was the direct cause of the following exception:
 
 Traceback (most recent call last):
   File "/app/manage.py", line 31, in <module>
     execute_from_command_line(sys.argv)
   File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
     utility.execute()
   File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 416, in run_from_argv
     self.execute(*args, **cmd_options)
   File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 460, in execute
     output = self.handle(*args, **options)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 107, in wrapper
     res = handle_func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-packages/django/core/management/commands/migrate.py", line 353, in handle
     post_migrate_state = executor.migrate(
                          ^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-packages/django/db/migrations/executor.py", line 135, in migrate
     state = self._migrate_all_forwards(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards
     state = self.apply_migration(
             ^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-packages/django/db/migrations/executor.py", line 255, in apply_migration
     state = migration.apply(state, schema_editor)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-packages/django/db/migrations/migration.py", line 132, in apply
     operation.database_forwards(
   File "/usr/local/lib/python3.11/site-packages/django/db/migrations/operations/models.py", line 97, in database_forwards
     schema_editor.create_model(model)
   File "/usr/local/lib/python3.11/site-packages/django/db/backends/base/schema.py", line 512, in create_model
     self.execute(sql, params or None)
   File "/usr/local/lib/python3.11/site-packages/django/db/backends/postgresql/schema.py", line 45, in execute
     return super().execute(sql, params)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-packages/django/db/backends/base/schema.py", line 204, in execute
     cursor.execute(sql, params)
   File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 122, in execute
     return super().execute(sql, params)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 79, in execute
     return self._execute_with_wrappers(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 92, in _execute_with_wrappers
     return executor(sql, params, many, context)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 100, in _execute
     with self.db.wrap_database_errors:
   File "/usr/local/lib/python3.11/site-packages/django/db/utils.py", line 91, in __exit__
     raise dj_exc_value.with_traceback(traceback) from exc_value
   File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 103, in _execute
     return self.cursor.execute(sql)
            ^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-packages/django_prometheus/db/common.py", line 69, in execute
     return super().execute(*args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 django.db.utils.ProgrammingError: relation "pid_provider_pidproviderxmlregistration" already exists

@robertatakenaka

Copy link
Copy Markdown
Member Author

@patymori execute:

make django_bash
python manage.py migrate pid_provider 0017 --fake
python manage.py migrate

…dência de artigos

Propósito:
A query anterior usava OR (|) entre z_surnames, z_collab, z_links e
z_partial_body, o que permitia que documentos totalmente diferentes
fossem retornados como correspondência só por coincidirem em
z_partial_body — campo que, no formato antigo, era o hash do primeiro
parágrafo e acabava coincidindo com títulos de seção repetidos entre
artigos distintos. Isso gerava falsos positivos no select_records.

Solução técnica:
- compare_items: usa 'input_data or ""' e 'registered or ""' antes de
  chamar how_similar, evitando passar None para a função de similaridade.
- article_data_query: removida a lógica OR entre os campos textuais;
  agora sempre retorna um Q com AND entre z_surnames, z_collab, z_links
  e z_partial_body, exigindo que todos os campos disponíveis coincidam
  simultaneamente, eliminando a ambiguidade do OR.
- Novo método get_article_data_query(issue), separando a combinação da
  query de dados do artigo conforme o escopo da busca:
  - issue=True: article_data_query & issue_params & article_location_params
    (correspondência dentro de um fascículo específico).
  - issue=False: article_data_query & filtro garantindo
    volume/number/suppl/elocation_id/fpage/lpage nulos (correspondência
    apenas por journal + dados do artigo, sem fascículo, evitando
    confundir com artigos de fascículos diferentes).
…t_records

Propósito:
Migrar o fingerprint principal de correspondência de artigos de
z_partial_body para body_fragment_fingerprint, disponibilizar os dados
legíveis do artigo com fallback ao XML, e centralizar a lógica de query
de seleção de registros no QueryBuilderPidProviderXML.

Solução técnica:
- Adicionado comentário documentando a migração de z_partial_body (hash
  do primeiro parágrafo, ambíguo) para body_fragment_fingerprint (hash de
  300 caracteres); registros antigos mantêm o valor legado e a query de
  match passa a cobrir ambos os formatos sem exigir backfill.
- Novo método get_readable_data(): retorna self.readable_data se já
  existir; caso contrário, calcula via self.xml_with_pre.get_article_data();
  retorna {} se não houver XML disponível.
- as_dict() passa a incluir os dados de get_readable_data() no dicionário
  retornado.
- data_to_compare agora usa get_readable_data() em vez de acessar
  readable_data diretamente, garantindo dados mesmo antes da persistência.
- select_records: substituídas as queries inline
  (Q(**qbuilder.issue_params) & qbuilder.article_data_query e
  qbuilder.article_data_query) pelas chamadas
  qbuilder.get_article_data_query(issue=True) e
  qbuilder.get_article_data_query(issue=False), centralizando a lógica de
  filtro no QueryBuilder.
- z_partial_body passa a ser preenchido a partir de
  xml_adapter.xml_with_pre.body_fragment_fingerprint, em vez de
  xml_adapter.z_partial_body.
…_query

Propósito:
Registros gravados antes desta correção têm z_partial_body como hash do
primeiro parágrafo não vazio do corpo (formato legado, sujeito a
colisão entre artigos diferentes que compartilham o mesmo texto de
seção, ex.: rótulos genéricos como "ARTIGO DE REVISÃO"). A partir de
agora, o campo passa a ser preenchido com o fingerprint do corpo INTEIRO
do artigo (xml_with_pre.body_fragment_fingerprint), mais robusto. É
preciso que a query de correspondência aceite ambos os formatos
simultaneamente, sem exigir migração/backfill dos registros antigos.

Solução técnica:
- __init__: adiciona self.z_body_fragment, obtido diretamente de
  xml_adapter.xml_with_pre.body_fragment_fingerprint, sem exigir
  mudanças no packtools nem no PidProviderXMLAdapter.
- Novo property partial_body_query:
  - Reúne em candidates os hashes não vazios entre
    adapter_data['z_partial_body'] (formato legado) e
    self.z_body_fragment (formato atual).
  - Se houver candidatos, usa Q(z_partial_body__in=candidates) para
    casar com registros gravados em qualquer um dos dois formatos.
  - Se não houver nenhum candidato (ambos None), usa
    Q(z_partial_body__isnull=True) explicitamente — evita usar
    z_partial_body__in=(None, None), que em SQL nunca retorna resultados
    porque IN é uma cadeia de igualdades e NULL = NULL é UNKNOWN, não
    True. Isso preserva o comportamento equivalente ao antigo
    Q(z_partial_body=None), que o Django traduz para IS NULL.
- article_data_query: remove o acesso direto a z_partial_body e a
  comparação Q(z_partial_body=z_partial_body); passa a compor o Q final
  com '& self.partial_body_query', delegando a lógica de correspondência
  do campo ao novo property.
Propósito:
Tornar o diretório de testes reconhecido como pacote Python, permitindo
que os módulos de teste (test_query_params, test_get_best_match,
test_select_record, test_select_records, test_register) sejam
descobertos e importados corretamente pelo test runner.

Solução técnica:
- Arquivo vazio, apenas com a função de marcar o diretório como pacote.
Propósito:
Cobrir com testes unitários a lógica de construção de queries em
QueryBuilderPidProviderXML, incluindo article_data_query,
partial_body_query e get_article_data_query, garantindo que as
correções recentes de ambiguidade (OR entre campos textuais, suporte a
dois formatos de hash em z_partial_body e tratamento de valores nulos)
se comportem conforme esperado.

Solução técnica:
- Casos de teste cobrindo cenários com e sem candidatos de hash
  disponíveis (z_partial_body legado, body_fragment_fingerprint atual,
  ambos ausentes).
- Verificação de que get_article_data_query(issue=True/False) monta
  corretamente a combinação com issue_params e article_location_params
  ou com o filtro de campos de fascículo nulos.
Propósito:
Cobrir com testes unitários a lógica de seleção do melhor candidato
dentre múltiplos registros retornados pela query de correspondência,
validando o cálculo de similaridade e o critério de desempate.

Solução técnica:
- Casos de teste com mocks simulando diferentes níveis de similaridade
  entre o XML de entrada e os candidatos registrados.
- Verificação do comportamento em cenários de match exato, parcial e
  ausência de candidatos.
Propósito:
Cobrir com testes unitários o fluxo de seleção de um único registro
correspondente ao XML de entrada, incluindo a integração com o
resultado de get_best_match.

Solução técnica:
- Casos de teste simulando diferentes conjuntos de resultados retornados
  pela query de seleção, verificando o registro escolhido em cada
  cenário.
Propósito:
Cobrir com testes unitários o pipeline de seleção de múltiplos
candidatos (por journal-issue-article e journal-article), validando a
integração com QueryBuilderPidProviderXML.get_article_data_query nos
dois escopos (issue=True/False).

Solução técnica:
- Casos de teste com mocks para os diferentes yields do gerador de
  seleção de registros, cobrindo cenários com e sem dados de fascículo.
Propósito:
Cobrir com testes unitários o fluxo completo de registro de um XML,
incluindo a seleção de registros existentes, atualização ou criação de
PidProviderXML e a gravação dos campos derivados (z_surnames, z_collab,
z_links, z_partial_body via body_fragment_fingerprint).

Solução técnica:
- Casos de teste simulando cenários de criação, atualização e
  registros já existentes, com mocks para as dependências externas
  (xml_adapter, xml_with_pre).
- Verificação de que os campos textuais e o novo fingerprint de corpo
  são persistidos corretamente conforme a lógica revisada em
  models.py e query_params.py.

@patymori patymori left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resultado do pip list:

Package                       Version
----------------------------- ---------------------
alabaster                     0.7.16
amqp                          5.3.1
anyascii                      0.3.3
anyio                         3.7.1
argon2-cffi                   25.1.0
argon2-cffi-bindings          25.1.0
asgiref                       3.12.1
astroid                       3.3.11
asttokens                     3.0.2
autopep8                      2.2.0
Babel                         2.14.0
beautifulsoup4                4.15.0
billiard                      4.2.4
black                         24.3.0
celery                        5.5.3
certifi                       2026.7.22
cffi                          2.1.0
cfgv                          3.5.0
charset-normalizer            3.4.9
click                         8.4.2
click-didyoumean              0.3.1
click-plugins                 1.1.1.2
click-repl                    0.3.0
colorama                      0.4.6
coverage                      7.4.4
crispy-bootstrap5             2025.6
cron_descriptor               2.1.0
decorator                     5.3.1
defusedxml                    0.7.1
dill                          0.4.1
distlib                       0.4.3
Django                        5.2.7
django-allauth                65.12.1
django-appconf                1.2.0
django-celery-beat            2.8.1
django_celery_results         2.6.0
django-compressor             4.5.1
django-coverage-plugin        3.1.0
django-crispy-forms           2.4
django-debug-toolbar          7.0.0
django-environ                0.12.0
django-extensions             3.2.3
django-filter                 26.1
django-haystack               3.4.1.dev6+g39d0dc1f5
django-maintenance-mode       0.22.0
django-model-utils            5.0.0
django-modelcluster           6.5
django-otp                    1.1.6
django-permissionedforms      0.1
django-prometheus             2.4.1
django-recaptcha              4.1.0
django-redis                  5.4.0
django-rosetta                0.10.1
django-silk                   5.3.2
django-stubs                  4.2.7
django-stubs-ext              6.0.7
django-taggit                 6.1.0
django-tasks                  0.8.1
django-test-migrations        1.3.0
django-timezone-field         7.2.2
django-treebeard              4.8.0
djangorestframework           3.16.1
djangorestframework_simplejwt 5.5.1
docutils                      0.20.1
draftjs_exporter              5.2.0
et_xmlfile                    2.0.0
Events                        0.5
executing                     2.2.1
factory-boy                   3.3.0
Faker                         40.35.0
feedparser                    6.0.12
filelock                      3.32.0
filetype                      1.2.0
flake8                        6.1.0
flake8-isort                  6.1.1
flower                        2.0.1
freezegun                     1.5.5
gprof2dot                     2025.4.14
grpcio                        1.82.1
hiredis                       2.2.3
humanize                      4.16.0
identify                      2.6.19
idna                          3.18
imagesize                     2.0.0
iniconfig                     2.3.0
ipdb                          0.13.13
ipython                       9.15.0
ipython_pygments_lexers       1.1.1
isort                         5.13.2
jedi                          0.20.0
Jinja2                        3.1.6
kombu                         5.5.4
laces                         0.1.2
langcodes                     3.5.1
langdetect                    1.0.9
legendarium                   2.0.6
livereload                    2.7.1
lxml                          6.0.2
MarkupSafe                    3.0.3
matplotlib-inline             0.2.2
mccabe                        0.7.0
minio                         7.2.18
mypy                          1.6.1
mypy_extensions               1.1.0
nodeenv                       1.10.0
openpyxl                      3.1.5
opensearch-protobufs          1.2.0
opensearch-py                 3.2.0
packaging                     26.2
packtools                     4.16.8rc20260722
parso                         0.8.7
pathspec                      1.1.1
pexpect                       4.9.0
picles.plumber                0.11
pillow                        11.3.0
pillow_heif                   1.5.0
pip                           24.0
platformdirs                  4.11.0
pluggy                        1.6.0
polib                         1.2.0
pre-commit                    3.5.0
prometheus_client             0.25.0
prompt_toolkit                3.0.52
protobuf                      7.35.1
psutil                        7.1.1
psycopg2-binary               2.9.9
ptyprocess                    0.7.0
pure_eval                     0.2.3
pycodestyle                   2.11.1
pycparser                     3.0
pycryptodome                  3.23.0
pyflakes                      3.1.0
Pygments                      2.20.0
PyJWT                         2.13.0
pylint                        3.3.9
pylint-celery                 0.3
pylint-django                 2.5.5
pylint-plugin-utils           0.9.0
pymongo                       3.13.0
pysolr                        3.11.0
pytest                        7.4.3
pytest-django                 4.8.0
pytest-sugar                  0.9.7
python-crontab                3.3.0
python-dateutil               2.9.0.post0
python-discovery              1.5.0
python-docx                   1.2.0
python-fsutil                 0.17.0
pytz                          2025.2
PyYAML                        6.0.3
qrcode                        8.2
rcssmin                       1.1.2
redis                         6.4.0
requests                      2.34.2
rjsmin                        1.2.2
setuptools                    83.0.0
sgmllib3k                     1.0.0
Sickle                        0.7.0
six                           1.17.0
sniffio                       1.3.1
snowballstemmer               3.1.1
soupsieve                     2.9.1
Sphinx                        7.2.6
sphinx-autobuild              2021.3.14
sphinxcontrib-applehelp       2.0.0
sphinxcontrib-devhelp         2.0.0
sphinxcontrib-htmlhelp        2.1.0
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          2.0.0
sphinxcontrib-serializinghtml 2.0.0
sqlparse                      0.5.5
stack-data                    0.6.3
telepath                      0.3.1
tenacity                      9.1.2
termcolor                     3.3.0
tomlkit                       0.15.1
tornado                       6.5.7
traitlets                     5.15.1
types-pytz                    2026.2.0.20260518
types-PyYAML                  6.0.12.20260518
typing_extensions             4.16.0
tzdata                        2026.3
urllib3                       2.7.0
vine                          5.1.0
virtualenv                    21.7.0
wagtail                       7.1.1
wagtail-2fa                   1.7.1
wagtail-autocomplete          0.12.0
wagtail-django-recaptcha      2.1.1
wagtail-localize              1.12.2
wagtail-modeladmin            2.2.0
watchgod                      0.8.2
wcwidth                       0.8.2
Werkzeug                      3.0.1
wheel                         0.45.1
whitenoise                    6.11.0
Willow                        1.12.0
xlwt                          1.3.0
xmltodict                     1.0.2

Migrações do pid_provider:

Image

Resultado de envio de XMLs do Upload:

Image
 172.19.0.2 - - [27/Jul/2026 14:15:09] "POST /api/v2/auth/token/ HTTP/1.1" 200 -
 INFO 2026-07-27 14:15:09,338 views 13 140660027938560 Receiving 1518-8787-rsp-56-9_00207.zip
 INFO 2026-07-27 14:15:09,338 views 13 140660027938560 Async
 INFO 2026-07-27 14:15:09,425 base 13 140660650456832 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.080s]
 INFO 2026-07-27 14:15:09,494 base 13 140660650456832 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.069s]
 INFO 2026-07-27 14:15:09,827 strategy 10 134277405943616 Task pid_provider.tasks.task_provide_pid_for_xml_zip[11baa5aa-d106-4ca9-bdaf-85bc1caffb4d] received
 INFO 2026-07-27 14:15:10,296 tasks 16 134277405943616 Running task_provide_pid_for_xml_zip
 INFO 2026-07-27 14:15:10,999 models 16 134277405943616 Do not skip update: not registered
 INFO 2026-07-27 14:15:11,602 base 16 134277354542848 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.165s]
 INFO 2026-07-27 14:15:11,646 base 16 134277354542848 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.043s]
 INFO 2026-07-27 14:15:11,713 views 13 140660027938560 {'input_data': {'sps_pkg_name': '1518-8787-rsp-56-9_00207', 'pid_v3': None, 'pid_v2': 'S0034-89102022000100207', 'aop_pid': None, 'filename': '1518-8787-rsp-56-9_00207.xml', 'files': ['1518-8787-rsp-56-9_00207.xml'], 'filenames': ['1518-8787-rsp-56-9_00207.xml'], 'pkg_names': ['1518-8787-rsp-56-9', '1518-8787-rsp-56-9'], 'surnames': ['Ramos', 'Rebelo', 'Rebelo Vieira', 'Miranda', 'Tabchoury', 'Cury'], 'collab': None, 'links': [], 'article_titles': ['Dentifrício fluoretado, vigilância sanitária e o SUS: o caso de Manaus-AM', 'Fluoride toothpaste, sanitary surveillance and the SUS: the case of Manaus-AM, Brazil'], 'partial_body': 'INTRODUCTION Fluoride toothpaste is recommended for preventing tooth decay because it is associated with its decline, which has been observed both in developed 1  and developing countries, such as Brazil 2 . Toothpaste is also considered the most rational means of using fluoride because, simultaneously with the disorganization of the dental biofilm by brushing, fluoride is released into the oral cavity to interfere with the development of caries lesions or to repair existing lesions 3 , 4 . However, it is essential that fluoride be chemically soluble in the formulation 5 in order to be bioavailable in the mouth during brushing 6 . The effect of fluoride present in toothpaste on reduction of caries is based on evidence 7 and the minimum concentration of 1,000 ppm F is still recommended 10 . Therefore, there is a need not only for toothpaste to contain fluoride, but also to have a minimum concentration of soluble fluoride so that the population can benefit from caries control 11 . In Brazil, 90% of the population uses toothpaste formulated with the combination of calcium carbonate (CaCO 3 ) as an abrasive and sodium monofluorophosphate (Na 2 FPO 3 ) as a fluoride source salt 2 , 12 . This type of formulation (CaCO 3 /Na 2 FPO 3 ) is relatively stable since the fluoride is bound to the phosphate, therefore it does not immediately react with the Ca ++  in the abrasive. However, due to the storage time, the MFP (FPO 3 2- ) undergoes hydrolysis and the released fluoride ion is insolubilized by the Ca ++  in the abrasive 4 , 13 . On the other hand, hydrated silica (SiO 2 ) is chemically compatible with all fluoride salts (NaF, SnF 2 , AmF, Na 2 FPO 3 ) used in toothpaste. However, formulations with CaCO 3 /Na 2 FPO 3  have social impact especially for developing countries 14  like Brazil. First, because they cost 2 to 3 times less than formulations with SiO 2 ; second, and most importantly, they are widely distributed to underprivileged populations, as is done in Brazil by the Unified Health System (SUS). Thus, bids from small Brazilian manufacturers of toothpaste with CaCO 3 /Na 2 FPO 3  win the tenders for purchases made by city halls 11 . The quality of the fluoride in toothpaste brands available in the Brazilian market is regulated by the updated resolution RDC No. 530, of August 4, 2021 15  of ANVISA, but like the regulations of the Southern Common Market (Mercosur) 16  and the European Union (EU) 17 , the resolution only establishes the maximum concentration of total fluoride (TF), which is 0.15% (1,500 ppm F; mg F/kg), but not how much of this fluoride must be soluble in the formulation for anticaries efficacy 18 . As a result, in toothpaste brands sold in the Brazilian market 12  and distributed by the SUS 11 , we found that the concentration of chemically soluble fluoride is much lower than the minimum required for anticaries potential. The Health Department of Manaus, the capital city of Amazonas State, has the task of promoting universal access to health services according to the principles established by the SUS, which includes supplying toothpaste to underprivileged populations. Since the quality of the fluoride in toothpaste consumed by the population of Manaus is not known, the aim of this study was to evaluate whether these toothpaste brands were in compliance with resolution RDC No. 530 15  of ANVISA in terms of TF, and whether they also had enough concentration of soluble fluoride to have anticaries potential 19 .', 'body_fragment': 'introduction fluoride toothpaste is recommended for preventing tooth decay because it is associated with its decline, which has been observed both in developed 1 and developing countries, such as brazil 2 . toothpaste is also considered the most rational means of using fluoride because, simultaneous', 'origin': '/tmp/tmpfu5rz4vp.zip'}, 'xml_adapter_data': {'pkg_name': '1518-8787-rsp-56-9_00207', 'issn_print': '0034-8910', 'issn_electronic': '1518-8787', 'article_pub_year': '2022', 'pub_year': '2022', 'main_doi': '10.11606/s1518-8787.2022056003636', 'elocation_id': '9', 'volume': '56', 'number': None, 'suppl': None, 'fpage': None, 'fpage_seq': None, 'lpage': None, 'z_surnames': '26236781b125de828eca020182468bc7f5150cdd6d5717d912544a6f21662cee', 'z_collab': None, 'z_links': None, 'z_partial_body': '1fa28abb9d807b1680c4de93bcdeb4b3d5d356f742fbf82807610f1a5e1c0435'}, 'xml_changed': {'pid_v3': 'dvQZsCfLK868XcWJwBVb6MC'}, 'v3': 'dvQZsCfLK868XcWJwBVb6MC', 'v2': 'S0034-89102022000100207', 'aop_pid': None, 'pkg_name': '1518-8787-rsp-56-9_00207', 'finger_print': 'da4fff78ca9bc6979c69482ec6c3f3164a412dc31e09de49995745560ac6fa0d', 'created': '2026-07-27T14:15:11.054937+00:00', 'updated': '2026-07-27T14:15:11.364093+00:00', 'record_status': 'updated', 'registered_in_core': True, 'event_status': 'created', 'apply_xml_changes': {'pid_v3': 'dvQZsCfLK868XcWJwBVb6MC'}}
 INFO 2026-07-27 14:15:11,723 strategy 10 134277405943616 Task pid_provider.tasks.task_delete_provide_pid_tmp_zip[86621183-5af8-4955-b927-0b07411a2bac] received
 172.19.0.2 - - [27/Jul/2026 14:15:11] "POST /api/v2/pid/pid_provider/ HTTP/1.1" 200 -
 INFO 2026-07-27 14:15:11,770 base 13 140660650456832 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.056s]
 INFO 2026-07-27 14:16:11,442 views 13 140660027938560 Receiving 1518-8787-rsp-56-85_00507.zip
 INFO 2026-07-27 14:16:11,442 views 13 140660027938560 Async
 INFO 2026-07-27 14:16:11,470 base 13 140660650456832 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.026s]
 INFO 2026-07-27 14:16:11,469 strategy 10 134277405943616 Task pid_provider.tasks.task_provide_pid_for_xml_zip[b327c29d-53ec-4d1c-bdf4-46b32c37594c] received
 INFO 2026-07-27 14:16:11,500 base 13 140660650456832 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.030s]
 INFO 2026-07-27 14:16:11,514 tasks 16 134277405943616 Running task_provide_pid_for_xml_zip
 INFO 2026-07-27 14:16:11,539 base 16 134277354542848 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.023s]
 INFO 2026-07-27 14:16:11,569 models 16 134277405943616 Do not skip update: not registered
 INFO 2026-07-27 14:16:11,600 base 16 134277354542848 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.031s]
 INFO 2026-07-27 14:16:11,696 views 13 140660027938560 {'input_data': {'sps_pkg_name': '1518-8787-rsp-56-85_00507', 'pid_v3': None, 'pid_v2': 'S0034-89102022000100507', 'aop_pid': None, 'filename': '1518-8787-rsp-56-85_00507.xml', 'files': ['1518-8787-rsp-56-85_00507.xml'], 'filenames': ['1518-8787-rsp-56-85_00507.xml'], 'pkg_names': ['1518-8787-rsp-56-85', '1518-8787-rsp-56-85'], 'surnames': ['Ichihara', 'Ferreira', 'Teixeira', 'Alves', 'Rocha', 'Diógenes', 'Ramos', 'Pinto', 'Flores-Ortiz', 'Rameh', 'Costa', 'Gonzaga', 'Lima', 'Dundas', 'Leyland', 'Barreto'], 'collab': None, 'links': [], 'article_titles': ['Mortality inequalities measured by socioeconomic indicators in Brazil: a scoping review'], 'partial_body': 'INTRODUCTION Observed within different sociodemographic groups 1 , the inverse relationship between low socioeconomic status and mortality is a well-established fact in the literature and has mostly been analyzed by single-variable socioeconomic indicators such as income, education, wealth, race/ethnicity, marital status, social class, and occupation 4 , 5 . Composite socioeconomic indicators such as the Human Development Index, deprivation scores, and social-vulnerability indexes 6  have also been used to study mortality inequalities in populations. These more complex measures broaden the knowledge on socioeconomic disparities, especially in analyses that consider different geographical levels, such as municipalities, or other small areas. In Brazil, several studies provide evidence of higher mortality rates in more impoverished areas 9 . Many are the composite socioeconomic measures available at the municipal level, such as the Social Vulnerability Index ( Índice de Vulnerabilidade Social  – IVS) 12 , and the Municipal Human Development Index (MHDI) 13  – still, mortality rates can be highly heterogeneous 14 , making more disaggregated analyses desirable. Smaller spatial units like districts or census tracts (which include districts), however, often lack socioeconomic information 15 , resulting in few studies on mortality inequality at this level of analysis. Using indicators to analyze mortality inequalities at different geographical levels has been most beneficial for researchers and health policy makers to identify the risks of death in population groups and to define public policies and interventions 16 , 17 . Mapping the construction of composite socioeconomic indicators, and their association with mortality outcomes at different geographical levels in Brazil, is of paramount importance to guide the development of new composite indicators and their use in studies analyzing mortality inequalities. As such, this study summarizes the literature on the relationship between composite socioeconomic indicators and mortality in different geographical areas of Brazil. Specific Research Questions To do so, we formulated the following research questions: Research question 1:  Which composite socioeconomic indicators are most used to understand mortality inequalities across different Brazilian geographical areas? Research question 2:  What are the characteristics of these composite measures of area-level socioeconomic indicators, and are there any limitations to understanding geographical mortality inequalities in Brazil?', 'body_fragment': 'introduction observed within different sociodemographic groups 1 , the inverse relationship between low socioeconomic status and mortality is a well-established fact in the literature and has mostly been analyzed by single-variable socioeconomic indicators such as income, education, wealth, race/eth', 'origin': '/tmp/tmpt_al47an.zip'}, 'xml_adapter_data': {'pkg_name': '1518-8787-rsp-56-85_00507', 'issn_print': '0034-8910', 'issn_electronic': '1518-8787', 'article_pub_year': '2022', 'pub_year': '2022', 'main_doi': '10.11606/s1518-8787.2022056004178', 'elocation_id': '85', 'volume': '56', 'number': None, 'suppl': None, 'fpage': None, 'fpage_seq': None, 'lpage': None, 'z_surnames': 'e599bc98000e808961fef3165239131d7698a7fc1b829c212f4642c11e40feaf', 'z_collab': None, 'z_links': None, 'z_partial_body': '88e2dd01717ae1e6f10abaf29c07291bf3ec7f50a1647d44bb3e5a46538739c9'}, 'xml_changed': {'pid_v3': 'sNkFt3SGpc9SgSNJQpBZykd'}, 'v3': 'sNkFt3SGpc9SgSNJQpBZykd', 'v2': 'S0034-89102022000100507', 'aop_pid': None, 'pkg_name': '1518-8787-rsp-56-85_00507', 'finger_print': 'caa0e3446bf9cb10aee9dc349a5f1ff9fd48279cf31c2b4ff16d8d526583318c', 'created': '2026-07-27T14:16:11.572897+00:00', 'updated': '2026-07-27T14:16:11.665602+00:00', 'record_status': 'updated', 'registered_in_core': True, 'event_status': 'created', 'apply_xml_changes': {'pid_v3': 'sNkFt3SGpc9SgSNJQpBZykd'}}
 INFO 2026-07-27 14:16:11,696 strategy 10 134277405943616 Task pid_provider.tasks.task_delete_provide_pid_tmp_zip[3b633bee-8c80-47dc-86d8-cf87f0dd5878] received

Registros em PidProviderXMLRegistration NÃO foram criados:

Image

Resultado do reenvio dos XMLs do Upload, com log registrado de "Skip update: equal"

172.19.0.2 - - [27/Jul/2026 14:53:35] "POST /api/v2/auth/token/ HTTP/1.1" 200 -
INFO 2026-07-27 14:53:35,088 views 13 140660011153152 Receiving 1518-8787-rsp-56-9_00207.zip
INFO 2026-07-27 14:53:35,089 views 13 140660011153152 Async
INFO 2026-07-27 14:53:35,125 base 13 140660650456832 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.034s]
INFO 2026-07-27 14:53:35,158 base 13 140660650456832 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.033s]
INFO 2026-07-27 14:53:35,269 strategy 10 134277405943616 Task pid_provider.tasks.task_provide_pid_for_xml_zip[61eb81c3-dbd4-4c05-a355-15c417b39ede] received
INFO 2026-07-27 14:53:35,320 tasks 16 134277405943616 Running task_provide_pid_for_xml_zip
INFO 2026-07-27 14:53:35,349 base 16 134277354542848 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.028s]
INFO 2026-07-27 14:53:35,392 models 16 134277405943616 Skip update: equal
INFO 2026-07-27 14:53:35,406 views 13 140660011153152 {'input_data': {'sps_pkg_name': '1518-8787-rsp-56-9_00207', 'pid_v3': None, 'pid_v2': 'S0034-89102022000100207', 'aop_pid': None, 'filename': '1518-8787-rsp-56-9_00207.xml', 'files': ['1518-8787-rsp-56-9_00207.xml'], 'filenames': ['1518-8787-rsp-56-9_00207.xml'], 'pkg_names': ['1518-8787-rsp-56-9', '1518-8787-rsp-56-9'], 'surnames': ['Ramos', 'Rebelo', 'Rebelo Vieira', 'Miranda', 'Tabchoury', 'Cury'], 'collab': None, 'links': [], 'article_titles': ['Dentifrício fluoretado, vigilância sanitária e o SUS: o caso de Manaus-AM', 'Fluoride toothpaste, sanitary surveillance and the SUS: the case of Manaus-AM, Brazil'], 'partial_body': 'INTRODUCTION Fluoride toothpaste is recommended for preventing tooth decay because it is associated with its decline, which has been observed both in developed 1  and developing countries, such as Brazil 2 . Toothpaste is also considered the most rational means of using fluoride because, simultaneously with the disorganization of the dental biofilm by brushing, fluoride is released into the oral cavity to interfere with the development of caries lesions or to repair existing lesions 3 , 4 . However, it is essential that fluoride be chemically soluble in the formulation 5 in order to be bioavailable in the mouth during brushing 6 . The effect of fluoride present in toothpaste on reduction of caries is based on evidence 7 and the minimum concentration of 1,000 ppm F is still recommended 10 . Therefore, there is a need not only for toothpaste to contain fluoride, but also to have a minimum concentration of soluble fluoride so that the population can benefit from caries control 11 . In Brazil, 90% of the population uses toothpaste formulated with the combination of calcium carbonate (CaCO 3 ) as an abrasive and sodium monofluorophosphate (Na 2 FPO 3 ) as a fluoride source salt 2 , 12 . This type of formulation (CaCO 3 /Na 2 FPO 3 ) is relatively stable since the fluoride is bound to the phosphate, therefore it does not immediately react with the Ca ++  in the abrasive. However, due to the storage time, the MFP (FPO 3 2- ) undergoes hydrolysis and the released fluoride ion is insolubilized by the Ca ++  in the abrasive 4 , 13 . On the other hand, hydrated silica (SiO 2 ) is chemically compatible with all fluoride salts (NaF, SnF 2 , AmF, Na 2 FPO 3 ) used in toothpaste. However, formulations with CaCO 3 /Na 2 FPO 3  have social impact especially for developing countries 14  like Brazil. First, because they cost 2 to 3 times less than formulations with SiO 2 ; second, and most importantly, they are widely distributed to underprivileged populations, as is done in Brazil by the Unified Health System (SUS). Thus, bids from small Brazilian manufacturers of toothpaste with CaCO 3 /Na 2 FPO 3  win the tenders for purchases made by city halls 11 . The quality of the fluoride in toothpaste brands available in the Brazilian market is regulated by the updated resolution RDC No. 530, of August 4, 2021 15  of ANVISA, but like the regulations of the Southern Common Market (Mercosur) 16  and the European Union (EU) 17 , the resolution only establishes the maximum concentration of total fluoride (TF), which is 0.15% (1,500 ppm F; mg F/kg), but not how much of this fluoride must be soluble in the formulation for anticaries efficacy 18 . As a result, in toothpaste brands sold in the Brazilian market 12  and distributed by the SUS 11 , we found that the concentration of chemically soluble fluoride is much lower than the minimum required for anticaries potential. The Health Department of Manaus, the capital city of Amazonas State, has the task of promoting universal access to health services according to the principles established by the SUS, which includes supplying toothpaste to underprivileged populations. Since the quality of the fluoride in toothpaste consumed by the population of Manaus is not known, the aim of this study was to evaluate whether these toothpaste brands were in compliance with resolution RDC No. 530 15  of ANVISA in terms of TF, and whether they also had enough concentration of soluble fluoride to have anticaries potential 19 .', 'body_fragment': 'introduction fluoride toothpaste is recommended for preventing tooth decay because it is associated with its decline, which has been observed both in developed 1 and developing countries, such as brazil 2 . toothpaste is also considered the most rational means of using fluoride because, simultaneous', 'origin': '/tmp/tmpxipqnr_j.zip'}, 'xml_adapter_data': {'pkg_name': '1518-8787-rsp-56-9_00207', 'issn_print': '0034-8910', 'issn_electronic': '1518-8787', 'article_pub_year': '2022', 'pub_year': '2022', 'main_doi': '10.11606/s1518-8787.2022056003636', 'elocation_id': '9', 'volume': '56', 'number': None, 'suppl': None, 'fpage': None, 'fpage_seq': None, 'lpage': None, 'z_surnames': '26236781b125de828eca020182468bc7f5150cdd6d5717d912544a6f21662cee', 'z_collab': None, 'z_links': None, 'z_partial_body': '1fa28abb9d807b1680c4de93bcdeb4b3d5d356f742fbf82807610f1a5e1c0435'}, 'xml_changed': {'pid_v3': 'dvQZsCfLK868XcWJwBVb6MC'}, 'skipped': True, 'v3': 'dvQZsCfLK868XcWJwBVb6MC', 'v2': 'S0034-89102022000100207', 'aop_pid': None, 'pkg_name': '1518-8787-rsp-56-9_00207', 'finger_print': 'da4fff78ca9bc6979c69482ec6c3f3164a412dc31e09de49995745560ac6fa0d', 'created': '2026-07-27T14:15:11.054937+00:00', 'updated': '2026-07-27T14:15:11.364093+00:00', 'record_status': 'updated', 'registered_in_core': True, 'event_status': 'skipped', 'apply_xml_changes': {'pid_v3': 'dvQZsCfLK868XcWJwBVb6MC'}}
INFO 2026-07-27 14:53:35,433 base 16 134277354542848 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.034s]
172.19.0.2 - - [27/Jul/2026 14:53:35] "POST /api/v2/pid/pid_provider/ HTTP/1.1" 200 -
INFO 2026-07-27 14:53:35,445 strategy 10 134277405943616 Task pid_provider.tasks.task_delete_provide_pid_tmp_zip[b6e5d5c1-c4a4-4e3b-b8a6-152d8f5f1468] received
INFO 2026-07-27 14:53:35,465 base 13 140660650456832 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.057s]
INFO 2026-07-27 14:54:39,651 views 13 140660011153152 Receiving 1518-8787-rsp-56-85_00507.zip
INFO 2026-07-27 14:54:39,651 views 13 140660011153152 Async
INFO 2026-07-27 14:54:39,680 strategy 10 134277405943616 Task pid_provider.tasks.task_provide_pid_for_xml_zip[0c5df526-272a-4479-b076-e6756d2fd9ef] received
INFO 2026-07-27 14:54:39,682 base 13 140660650456832 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.031s]
INFO 2026-07-27 14:54:39,693 tasks 16 134277405943616 Running task_provide_pid_for_xml_zip
INFO 2026-07-27 14:54:39,715 base 13 140660650456832 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.033s]
INFO 2026-07-27 14:54:39,740 base 16 134277354542848 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.046s]
INFO 2026-07-27 14:54:39,741 models 16 134277405943616 Skip update: equal
INFO 2026-07-27 14:54:39,757 views 13 140660011153152 {'input_data': {'sps_pkg_name': '1518-8787-rsp-56-85_00507', 'pid_v3': None, 'pid_v2': 'S0034-89102022000100507', 'aop_pid': None, 'filename': '1518-8787-rsp-56-85_00507.xml', 'files': ['1518-8787-rsp-56-85_00507.xml'], 'filenames': ['1518-8787-rsp-56-85_00507.xml'], 'pkg_names': ['1518-8787-rsp-56-85', '1518-8787-rsp-56-85'], 'surnames': ['Ichihara', 'Ferreira', 'Teixeira', 'Alves', 'Rocha', 'Diógenes', 'Ramos', 'Pinto', 'Flores-Ortiz', 'Rameh', 'Costa', 'Gonzaga', 'Lima', 'Dundas', 'Leyland', 'Barreto'], 'collab': None, 'links': [], 'article_titles': ['Mortality inequalities measured by socioeconomic indicators in Brazil: a scoping review'], 'partial_body': 'INTRODUCTION Observed within different sociodemographic groups 1 , the inverse relationship between low socioeconomic status and mortality is a well-established fact in the literature and has mostly been analyzed by single-variable socioeconomic indicators such as income, education, wealth, race/ethnicity, marital status, social class, and occupation 4 , 5 . Composite socioeconomic indicators such as the Human Development Index, deprivation scores, and social-vulnerability indexes 6  have also been used to study mortality inequalities in populations. These more complex measures broaden the knowledge on socioeconomic disparities, especially in analyses that consider different geographical levels, such as municipalities, or other small areas. In Brazil, several studies provide evidence of higher mortality rates in more impoverished areas 9 . Many are the composite socioeconomic measures available at the municipal level, such as the Social Vulnerability Index ( Índice de Vulnerabilidade Social  – IVS) 12 , and the Municipal Human Development Index (MHDI) 13  – still, mortality rates can be highly heterogeneous 14 , making more disaggregated analyses desirable. Smaller spatial units like districts or census tracts (which include districts), however, often lack socioeconomic information 15 , resulting in few studies on mortality inequality at this level of analysis. Using indicators to analyze mortality inequalities at different geographical levels has been most beneficial for researchers and health policy makers to identify the risks of death in population groups and to define public policies and interventions 16 , 17 . Mapping the construction of composite socioeconomic indicators, and their association with mortality outcomes at different geographical levels in Brazil, is of paramount importance to guide the development of new composite indicators and their use in studies analyzing mortality inequalities. As such, this study summarizes the literature on the relationship between composite socioeconomic indicators and mortality in different geographical areas of Brazil. Specific Research Questions To do so, we formulated the following research questions: Research question 1:  Which composite socioeconomic indicators are most used to understand mortality inequalities across different Brazilian geographical areas? Research question 2:  What are the characteristics of these composite measures of area-level socioeconomic indicators, and are there any limitations to understanding geographical mortality inequalities in Brazil?', 'body_fragment': 'introduction observed within different sociodemographic groups 1 , the inverse relationship between low socioeconomic status and mortality is a well-established fact in the literature and has mostly been analyzed by single-variable socioeconomic indicators such as income, education, wealth, race/eth', 'origin': '/tmp/tmpx11ajezf.zip'}, 'xml_adapter_data': {'pkg_name': '1518-8787-rsp-56-85_00507', 'issn_print': '0034-8910', 'issn_electronic': '1518-8787', 'article_pub_year': '2022', 'pub_year': '2022', 'main_doi': '10.11606/s1518-8787.2022056004178', 'elocation_id': '85', 'volume': '56', 'number': None, 'suppl': None, 'fpage': None, 'fpage_seq': None, 'lpage': None, 'z_surnames': 'e599bc98000e808961fef3165239131d7698a7fc1b829c212f4642c11e40feaf', 'z_collab': None, 'z_links': None, 'z_partial_body': '88e2dd01717ae1e6f10abaf29c07291bf3ec7f50a1647d44bb3e5a46538739c9'}, 'xml_changed': {'pid_v3': 'sNkFt3SGpc9SgSNJQpBZykd'}, 'skipped': True, 'v3': 'sNkFt3SGpc9SgSNJQpBZykd', 'v2': 'S0034-89102022000100507', 'aop_pid': None, 'pkg_name': '1518-8787-rsp-56-85_00507', 'finger_print': 'caa0e3446bf9cb10aee9dc349a5f1ff9fd48279cf31c2b4ff16d8d526583318c', 'created': '2026-07-27T14:16:11.572897+00:00', 'updated': '2026-07-27T14:16:11.665602+00:00', 'record_status': 'updated', 'registered_in_core': True, 'event_status': 'skipped', 'apply_xml_changes': {'pid_v3': 'sNkFt3SGpc9SgSNJQpBZykd'}}
INFO 2026-07-27 14:54:39,758 strategy 10 134277405943616 Task pid_provider.tasks.task_delete_provide_pid_tmp_zip[2c345a77-04e7-4f25-bde8-d9a91bc40511] received
INFO 2026-07-27 14:54:39,784 base 16 134277354542848 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.031s]

Alteração do título do artigo no XML:

Image

Log do recebimento do XML alterado:

172.19.0.2 - - [27/Jul/2026 15:17:57] "POST /api/v2/auth/token/ HTTP/1.1" 200 -
INFO 2026-07-27 15:17:57,520 views 13 140660044723968 Receiving 1518-8787-rsp-56-9_00207.zip
INFO 2026-07-27 15:17:57,524 views 13 140660044723968 Async
INFO 2026-07-27 15:17:57,774 base 13 140660650456832 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.226s]
INFO 2026-07-27 15:17:57,799 base 13 140660650456832 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.020s]
INFO 2026-07-27 15:17:57,947 strategy 10 134277405943616 Task pid_provider.tasks.task_provide_pid_for_xml_zip[75ad12c5-5dd8-4816-ab38-dd7bb37e6fa9] received
INFO 2026-07-27 15:17:58,188 tasks 16 134277405943616 Running task_provide_pid_for_xml_zip
INFO 2026-07-27 15:17:58,320 base 16 134277354542848 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.105s]
INFO 2026-07-27 15:17:58,861 views 13 140660044723968 {'input_data': {'sps_pkg_name': '1518-8787-rsp-56-9_00207', 'pid_v3': None, 'pid_v2': 'S0034-89102022000100207', 'aop_pid': None, 'filename': '1518-8787-rsp-56-9_00207.xml', 'files': ['1518-8787-rsp-56-9_00207.xml'], 'filenames': ['1518-8787-rsp-56-9_00207.xml'], 'pkg_names': ['1518-8787-rsp-56-9', '1518-8787-rsp-56-9'], 'surnames': ['Ramos', 'Rebelo', 'Rebelo Vieira', 'Miranda', 'Tabchoury', 'Cury'], 'collab': None, 'links': [], 'article_titles': ['Dentifrício fluoretado, vigilância sanitária e o SUS: o caso de Manaus-AM', 'Fluoride toothpaste, sanitary surveillance and the SUS: the case of Manaus-AM, Brazil - test inserted'], 'partial_body': 'INTRODUCTION Fluoride toothpaste is recommended for preventing tooth decay because it is associated with its decline, which has been observed both in developed 1  and developing countries, such as Brazil 2 . Toothpaste is also considered the most rational means of using fluoride because, simultaneously with the disorganization of the dental biofilm by brushing, fluoride is released into the oral cavity to interfere with the development of caries lesions or to repair existing lesions 3 , 4 . However, it is essential that fluoride be chemically soluble in the formulation 5 in order to be bioavailable in the mouth during brushing 6 . The effect of fluoride present in toothpaste on reduction of caries is based on evidence 7 and the minimum concentration of 1,000 ppm F is still recommended 10 . Therefore, there is a need not only for toothpaste to contain fluoride, but also to have a minimum concentration of soluble fluoride so that the population can benefit from caries control 11 . In Brazil, 90% of the population uses toothpaste formulated with the combination of calcium carbonate (CaCO 3 ) as an abrasive and sodium monofluorophosphate (Na 2 FPO 3 ) as a fluoride source salt 2 , 12 . This type of formulation (CaCO 3 /Na 2 FPO 3 ) is relatively stable since the fluoride is bound to the phosphate, therefore it does not immediately react with the Ca ++  in the abrasive. However, due to the storage time, the MFP (FPO 3 2- ) undergoes hydrolysis and the released fluoride ion is insolubilized by the Ca ++  in the abrasive 4 , 13 . On the other hand, hydrated silica (SiO 2 ) is chemically compatible with all fluoride salts (NaF, SnF 2 , AmF, Na 2 FPO 3 ) used in toothpaste. However, formulations with CaCO 3 /Na 2 FPO 3  have social impact especially for developing countries 14  like Brazil. First, because they cost 2 to 3 times less than formulations with SiO 2 ; second, and most importantly, they are widely distributed to underprivileged populations, as is done in Brazil by the Unified Health System (SUS). Thus, bids from small Brazilian manufacturers of toothpaste with CaCO 3 /Na 2 FPO 3  win the tenders for purchases made by city halls 11 . The quality of the fluoride in toothpaste brands available in the Brazilian market is regulated by the updated resolution RDC No. 530, of August 4, 2021 15  of ANVISA, but like the regulations of the Southern Common Market (Mercosur) 16  and the European Union (EU) 17 , the resolution only establishes the maximum concentration of total fluoride (TF), which is 0.15% (1,500 ppm F; mg F/kg), but not how much of this fluoride must be soluble in the formulation for anticaries efficacy 18 . As a result, in toothpaste brands sold in the Brazilian market 12  and distributed by the SUS 11 , we found that the concentration of chemically soluble fluoride is much lower than the minimum required for anticaries potential. The Health Department of Manaus, the capital city of Amazonas State, has the task of promoting universal access to health services according to the principles established by the SUS, which includes supplying toothpaste to underprivileged populations. Since the quality of the fluoride in toothpaste consumed by the population of Manaus is not known, the aim of this study was to evaluate whether these toothpaste brands were in compliance with resolution RDC No. 530 15  of ANVISA in terms of TF, and whether they also had enough concentration of soluble fluoride to have anticaries potential 19 .', 'body_fragment': 'introduction fluoride toothpaste is recommended for preventing tooth decay because it is associated with its decline, which has been observed both in developed 1 and developing countries, such as brazil 2 . toothpaste is also considered the most rational means of using fluoride because, simultaneous', 'origin': '/tmp/tmp0lmtsxa4.zip'}, 'xml_adapter_data': {'pkg_name': '1518-8787-rsp-56-9_00207', 'issn_print': '0034-8910', 'issn_electronic': '1518-8787', 'article_pub_year': '2022', 'pub_year': '2022', 'main_doi': '10.11606/s1518-8787.2022056003636', 'elocation_id': '9', 'volume': '56', 'number': None, 'suppl': None, 'fpage': None, 'fpage_seq': None, 'lpage': None, 'z_surnames': '26236781b125de828eca020182468bc7f5150cdd6d5717d912544a6f21662cee', 'z_collab': None, 'z_links': None, 'z_partial_body': '1fa28abb9d807b1680c4de93bcdeb4b3d5d356f742fbf82807610f1a5e1c0435'}, 'xml_changed': {'pid_v3': 'dvQZsCfLK868XcWJwBVb6MC'}, 'v3': 'dvQZsCfLK868XcWJwBVb6MC', 'v2': 'S0034-89102022000100207', 'aop_pid': None, 'pkg_name': '1518-8787-rsp-56-9_00207', 'finger_print': '63693e6efb7340609088f3d1fe463fa04a5f042d625df947938dcad961a23464', 'created': '2026-07-27T14:15:11.054937+00:00', 'updated': '2026-07-27T15:17:58.758065+00:00', 'record_status': 'updated', 'registered_in_core': True, 'event_status': 'updated', 'apply_xml_changes': {'pid_v3': 'dvQZsCfLK868XcWJwBVb6MC'}}
INFO 2026-07-27 15:17:58,865 strategy 10 134277405943616 Task pid_provider.tasks.task_delete_provide_pid_tmp_zip[254f2581-391b-4544-a8ee-813bd78365fb] received
INFO 2026-07-27 15:17:58,912 base 13 140660650456832 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.047s]
172.19.0.2 - - [27/Jul/2026 15:17:58] "POST /api/v2/pid/pid_provider/ HTTP/1.1" 200 -
INFO 2026-07-27 15:18:57,677 views 13 140660044723968 Receiving 1518-8787-rsp-56-85_00507.zip
INFO 2026-07-27 15:18:57,677 views 13 140660044723968 Async
INFO 2026-07-27 15:18:57,714 base 13 140660650456832 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.037s]
INFO 2026-07-27 15:18:57,727 strategy 10 134277405943616 Task pid_provider.tasks.task_provide_pid_for_xml_zip[269276f2-c7ba-4531-b9da-087d6426f8bb] received
INFO 2026-07-27 15:18:57,745 base 13 140660650456832 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.030s]
INFO 2026-07-27 15:18:57,766 tasks 16 134277405943616 Running task_provide_pid_for_xml_zip
INFO 2026-07-27 15:18:57,806 base 16 134277354542848 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.037s]
INFO 2026-07-27 15:18:57,833 models 16 134277405943616 Skip update: equal
INFO 2026-07-27 15:18:57,842 strategy 10 134277405943616 Task pid_provider.tasks.task_delete_provide_pid_tmp_zip[3c988356-c977-4dfa-981b-aa03cd7e5c93] received
INFO 2026-07-27 15:18:57,842 views 13 140660044723968 {'input_data': {'sps_pkg_name': '1518-8787-rsp-56-85_00507', 'pid_v3': None, 'pid_v2': 'S0034-89102022000100507', 'aop_pid': None, 'filename': '1518-8787-rsp-56-85_00507.xml', 'files': ['1518-8787-rsp-56-85_00507.xml'], 'filenames': ['1518-8787-rsp-56-85_00507.xml'], 'pkg_names': ['1518-8787-rsp-56-85', '1518-8787-rsp-56-85'], 'surnames': ['Ichihara', 'Ferreira', 'Teixeira', 'Alves', 'Rocha', 'Diógenes', 'Ramos', 'Pinto', 'Flores-Ortiz', 'Rameh', 'Costa', 'Gonzaga', 'Lima', 'Dundas', 'Leyland', 'Barreto'], 'collab': None, 'links': [], 'article_titles': ['Mortality inequalities measured by socioeconomic indicators in Brazil: a scoping review'], 'partial_body': 'INTRODUCTION Observed within different sociodemographic groups 1 , the inverse relationship between low socioeconomic status and mortality is a well-established fact in the literature and has mostly been analyzed by single-variable socioeconomic indicators such as income, education, wealth, race/ethnicity, marital status, social class, and occupation 4 , 5 . Composite socioeconomic indicators such as the Human Development Index, deprivation scores, and social-vulnerability indexes 6  have also been used to study mortality inequalities in populations. These more complex measures broaden the knowledge on socioeconomic disparities, especially in analyses that consider different geographical levels, such as municipalities, or other small areas. In Brazil, several studies provide evidence of higher mortality rates in more impoverished areas 9 . Many are the composite socioeconomic measures available at the municipal level, such as the Social Vulnerability Index ( Índice de Vulnerabilidade Social  – IVS) 12 , and the Municipal Human Development Index (MHDI) 13  – still, mortality rates can be highly heterogeneous 14 , making more disaggregated analyses desirable. Smaller spatial units like districts or census tracts (which include districts), however, often lack socioeconomic information 15 , resulting in few studies on mortality inequality at this level of analysis. Using indicators to analyze mortality inequalities at different geographical levels has been most beneficial for researchers and health policy makers to identify the risks of death in population groups and to define public policies and interventions 16 , 17 . Mapping the construction of composite socioeconomic indicators, and their association with mortality outcomes at different geographical levels in Brazil, is of paramount importance to guide the development of new composite indicators and their use in studies analyzing mortality inequalities. As such, this study summarizes the literature on the relationship between composite socioeconomic indicators and mortality in different geographical areas of Brazil. Specific Research Questions To do so, we formulated the following research questions: Research question 1:  Which composite socioeconomic indicators are most used to understand mortality inequalities across different Brazilian geographical areas? Research question 2:  What are the characteristics of these composite measures of area-level socioeconomic indicators, and are there any limitations to understanding geographical mortality inequalities in Brazil?', 'body_fragment': 'introduction observed within different sociodemographic groups 1 , the inverse relationship between low socioeconomic status and mortality is a well-established fact in the literature and has mostly been analyzed by single-variable socioeconomic indicators such as income, education, wealth, race/eth', 'origin': '/tmp/tmpvgmaqbqd.zip'}, 'xml_adapter_data': {'pkg_name': '1518-8787-rsp-56-85_00507', 'issn_print': '0034-8910', 'issn_electronic': '1518-8787', 'article_pub_year': '2022', 'pub_year': '2022', 'main_doi': '10.11606/s1518-8787.2022056004178', 'elocation_id': '85', 'volume': '56', 'number': None, 'suppl': None, 'fpage': None, 'fpage_seq': None, 'lpage': None, 'z_surnames': 'e599bc98000e808961fef3165239131d7698a7fc1b829c212f4642c11e40feaf', 'z_collab': None, 'z_links': None, 'z_partial_body': '88e2dd01717ae1e6f10abaf29c07291bf3ec7f50a1647d44bb3e5a46538739c9'}, 'xml_changed': {'pid_v3': 'sNkFt3SGpc9SgSNJQpBZykd'}, 'skipped': True, 'v3': 'sNkFt3SGpc9SgSNJQpBZykd', 'v2': 'S0034-89102022000100507', 'aop_pid': None, 'pkg_name': '1518-8787-rsp-56-85_00507', 'finger_print': 'caa0e3446bf9cb10aee9dc349a5f1ff9fd48279cf31c2b4ff16d8d526583318c', 'created': '2026-07-27T14:16:11.572897+00:00', 'updated': '2026-07-27T14:16:11.665602+00:00', 'record_status': 'updated', 'registered_in_core': True, 'event_status': 'skipped', 'apply_xml_changes': {'pid_v3': 'sNkFt3SGpc9SgSNJQpBZykd'}}
INFO 2026-07-27 15:18:57,860 base 16 134277354542848 POST http://opensearch:9200/core-logs-dev-2026.07.27/_doc [status:201 request:0.023s]

PidProviderXML Registrations continua sem registros:

Image

Resultado da execução da suite de testes do pid_provider (sem testes):

Image

Alterações:

  • Não foi possível validar listagem de XML URLs e PidProviderXML Registration Events por falta de registros
  • Suite de testes do pid_provider está sem testes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants