Marcin Dadura
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Dokumentacja mikrousługi aplikacyjnej DoctorApp -------------------------------------- ##### Autorzy: ###### Maciej Włodarczyk ###### Marcin Dadura ------------------------- ### 1. Cel Mikrousługa DoctorApp ma za zadanie dostarczyć interfejs REST, który korzysta z mikrousług `data`. Interfejs dostarcza metody, które przetwarzają dane dostarczone prze mikrousługi danych na interfejsie REST. Interfejs powinien być przejrzysty oraz nie ujawniać szczegółów implementacji. ### 2. API Usługa wystawia interfejs z którego można korzystać za pomocą HTTP REST. Usługa wystawia następujące metody na punktach końcowych: * metody `GET`: * `/patients` - zwraca listę wszyskich pacjentów dostępnych w repozytorium danych, nie przyjmuje argumentów * `/patient/{id}` - metoda zwracająca pacjenta o danym id, przyjmuje liczbę całkowitą jako ID pacjenta * `/patient/condition/{condition}` - metoda zwracająca listę pacjentów z danymi schorzeniami, przyjmuje liczbę całkowitą, jako typ schorzenia * `/patient/pesel/{pesel}` - metoda zwracająca pacjenta o danym peselu, przyjmuje stringa jako Pesel * `/doctors` - zwraca listę wszyskich doktorów dostępnych w repozytorium danych, nie przyjmuje argumentów * `/doctor/{id}` - metoda zwracająca doktora o danym id, przyjmuje liczbę całkowitą jako ID doktora * `/doctor/specialization/{specialization}` - metoda zwracająca listę doktora z danymi specjalizacjami, przyjmuje liczbę całkowitą, jako specjalizację * `/doctor/pesel/{pesel}` - metoda zwracająca doktora o danym peselu, przyjmuje stringa jako Pesel * `/doctor/{id}/can-treat` - metoda zwracająca pacjentów, których może wyleczyć dany pacjent, pprzyjmuje id doktora * `/doctor-patient-matches` - metoda zwracająca najlepsze przypisanie doktorów do pacjentów * metoda `POST`: * `/patient` - wysyłając obiekt json metoda ta pozwala na dodanie pacjenta * `/doctor` - wysyłając obiekt json metoda ta pozwala na dodanie doktora ### 3. Struktura projektu ``` DoctorsApp ├── DoctorsApp.Web │   ├── Application │   │   ├── DataServiceClients │   │   │   ├── DoctorsDataServiceClient.cs - klasa komunikująca sie z API mikrousługi danych lekarzy │   │   │   ├── IDoctorsDataServiceClient.cs - interfejs, który implementuje metody zapytań do mikrousługi danych lekarzy │   │   │   ├── IPatientsDataServiceClient.cs - interfejs, który implementuje metody zapytań do mikrousługi danych pacjentów │   │   │   └── PatientsDataServiceClient.cs - klasa komunikująca sie z API mikrousługi danych pacjentów │   │   ├── Dtos │   │   │   ├── ConditionDto.cs - model do wysyłania danych o schorzeniach │   │   │   ├── DoctorDto.cs - model do wysyłania danych o lekarzach │   │   │   ├── PatientDoctorDto.cs - model do przytrzymawania par doktor-pacjent │   │   │   ├── PatientDto.cs - model do wysyłania danych o pacjentach │   │   │   └── SpecializationDto.cs - model do wysyłania danych o specjalizacjach │   │   └── Queries │   │   ├── DoctorQueryHandler.cs - klasa zajmująca się obsługą zapytań dotyczących doktorów - przekazuje ona zapytania klienta http. │   │   ├── IDoctorsQueryHandler.cs - interfejs, który implementuje obsługę zapytań dla lekarzy. │   │   ├── IPatientsQueryHandler.cs - interfejs, który implementuje obsługę zapytań dla pacjentów. │   │   ├── ISelectorQueryHandler.cs - interfejs, który implementuje obsługę złożonych zapytań dotyczących lekarzy i pacjentów. │   │   ├── PatientsQueryHandler.cs - klasa zajmująca się obsługą zapytań dotyczących pacjentów - przekazuje ona zapytania do klienta http. │   │   └── SelectorQueryHandler.cs - klasa zajmująca się obsługą złożonych zapytań dotyczących jednoczesnie pacjentów i lekarzy - przekazuje ona zapytania do klienta http. │   ├── Configuration │   │   └── ServiceConfiguration.cs - klasa zapewniająca url potrzebne dla klienta http │   ├── Controllers │   │   └── DoctorsAppController.cs - kontroler odpowiedzialny za obsługę end-pointów zdefiniowanych w usłudze - wywołuje on metody z *QueriesHandler.cs. │   ├── DoctorsApp.Web.csproj - plik zawierający wszystkie informacje o projekcie, w tym używane pakiety │   ├── Logic │   │   └── Selector │   │   └── PatientSelector.cs - klasa zapewniająca metody wykonujące obliczenia na danych │   ├── Program.cs - znajduje się tutaj funkcja wejściowa do programu │   ├── Properties │   │   └── launchSettings.json - plik JSON z ustawieniami łądowanymi przy uruchomieniu aplikacji │   ├── Startup.cs - klasa zajmująca cię wstepną konfiguracją mikrousługi przy uruchomieniu │   ├── appsettings.Development.json - ustawienia aplikacji dla stanu Development │   └── appsettings.json - ustawienia aplikacji dla stanu Release └── DoctorsApp.sln - plik opisujący rozwiązanie ``` Zapytania obsługiwane są w następującym schemacie. Zapytanie przechwytuje `controller` i przekazuje je do `QueryHandlera`. `QueryHandler` pobiera dane za pośrednictwem `DataService` i działa na obiektach `Data Transfer Object` oraz zwraca je do `Controllera`, który wystawia dane na wyjście. ### 3. Diagram sekwencji wiadomości #### metody `GET`: ##### `/patients` ![get-patients](https://user-images.githubusercontent.com/56841909/114302128-fe447200-9ac7-11eb-8adc-00a7b6d33764.PNG) ##### `/patient/{id}` ![get-patient-id](https://user-images.githubusercontent.com/56841909/114302137-08ff0700-9ac8-11eb-8c1b-4fc3759a6207.PNG) ##### `/patient/condition/{condition}` ![get-patients-condition](https://user-images.githubusercontent.com/56841909/114302141-0f8d7e80-9ac8-11eb-9fcf-d716ad7170bc.PNG) ##### `/patient/pesel/{pesel}` ![get-patient-pesel](https://user-images.githubusercontent.com/56841909/114302150-187e5000-9ac8-11eb-8a38-4a6343960b41.PNG) ##### `/doctors` ![get-doctors](https://user-images.githubusercontent.com/56841909/114302160-1f0cc780-9ac8-11eb-8b93-6cb658d9c12a.PNG) ##### `/doctor/{id}` ![get-doctor-id](https://user-images.githubusercontent.com/56841909/114302163-246a1200-9ac8-11eb-8be7-d84309878223.PNG) ##### `/doctor/specialization/{specialization}` ![get-doctor-spec](https://user-images.githubusercontent.com/56841909/114302208-511e2980-9ac8-11eb-8b04-303aeae2b284.PNG) ##### `/doctor/pesel/{pesel}` ![get-doctor-pesel](https://user-images.githubusercontent.com/56841909/114302214-567b7400-9ac8-11eb-9d0a-4075ca08bc01.PNG) ##### `/doctor/{id}/can-threat` ![get-doctor-can-threat](https://user-images.githubusercontent.com/56841909/114371648-014f6900-9b81-11eb-97da-b0c4642e3e2c.PNG) ##### `/doctor-patient-matches` ![get-doctor-patient-matches](https://user-images.githubusercontent.com/56841909/114873448-95c50000-9dfb-11eb-9cff-84fd0fa0b9b0.PNG) <br/><br/><br/> #### metoda `POST`: ##### `/patient` ![post-add-patient](https://user-images.githubusercontent.com/56841909/114302222-63986300-9ac8-11eb-9531-58f665730e97.PNG) ##### `/doctor` ![post-add-doctor](https://user-images.githubusercontent.com/56841909/114302219-5ed3af00-9ac8-11eb-85d1-847022e8eed5.PNG) ### 4. Testy Do mikrousługi zostały dostarczone również testy w postaci skryptu `curl`. Aplikacja przechodzi testy i spełnia swoją funkcjonalność. Testy można odnaleźć pod ścieżką `Projekt/Testy/DoctorsApp`

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully