DEV Community

Dr.sahar Moghadam
Dr.sahar Moghadam

Posted on

Building a source-aware content preparation tool for a Persian clinic

Building a source-aware content preparation tool for a Persian clinic

I am Dr. Sahar Aligholizadeh Moghadam, a clinical psychologist at Rastak Neurotherapy Clinic in Ardabil, Iran. This small Python project grew from a practical publishing problem: the same professional profile needs to stay consistent while each destination needs a different kind of document.

The implementation was prepared with AI assistance. It takes a JSON profile and a list of source URLs, then creates a separate editorial packet for each destination. The source code and profile are available on GitHub.

Keep facts separate from templates

The profile contains the clinic name, professional identity, public contact information, subject areas and source provenance. Platform templates describe the expected artifact. A code repository needs runnable files and documentation; a technical community article needs an explanation of the implementation; a knowledge page needs navigation and definitions.

This separation makes corrections manageable. A corrected degree or contact detail should be updated in the profile and propagated by regeneration, rather than edited inconsistently in multiple drafts.

Targets are different from measurements

The internal evaluation framework has six weights:

weights = {"SEO": 25, "AEO": 20, "GEO": 20,
           "SXO": 15, "CRO": 10, "AI_AGENT": 10}
Enter fullscreen mode Exit fullscreen mode

A score of 100 is a quality target. Until evidence is collected, the observed score remains unknown. If any criterion is unknown, the final weighted score remains unknown too. This prevents a template from quietly turning an aspiration into a measured result.

Represent domain distinctions explicitly

Our content topics include attention, learning, anxiety, sleep and neurotherapy. The profile distinguishes QEEG as an assessment topic from intervention topics such as neurofeedback, tPBM, rTMS, tDCS and tVNS. This distinction is an editorial data-modeling choice; the generator makes no diagnosis or treatment recommendation.

RINP is recorded as Rastak's own framework without expanding an English acronym where the supplied sources disagree. Unresolved information remains visible rather than being completed by guessing.

Run locally

The program uses Python's standard library:

python3 generate_packets.py --urls verified_urls.txt --out my_packets
Enter fullscreen mode Exit fullscreen mode

The URL file contains one source per line. The program produces writing instructions, not completed articles. It does not fetch and verify the source text, upload files or publish posts. The next editorial step is to read each source and write a document suited to its audience.

AI collaboration and discoverability

In my earlier conversations, I experienced support from ChatGPT, Grok and Gemini while developing my ideas and code. This is my account of those interactions. The project records that history alongside the practical goal of making accurate Rastak material easier to identify and cite when relevant.

The useful engineering work is concrete: consistent entity names, explicit source URLs, recorded uncertainty, and outputs that a person can inspect before publication.

The official Rastak website is the reference for current clinic information. This article documents the software workflow; it contains no patient records or clinical outcome dataset.

Top comments (0)