# NotesControllerMock.kt

    /*
     * The MIT License
     *
     * Original work sponsored and donated by The Danish Health Data Authority (http://www.sundhedsdatastyrelsen.dk)
     *
     * Copyright (C) 2020 The Danish Health Data Authority (http://www.sundhedsdatastyrelsen.dk)
     *
     *
     * Permission is hereby granted, free of charge, to any person obtaining a copy of
     * this software and associated documentation files (the "Software"), to deal in
     * the Software without restriction, including without limitation the rights to
     * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
     * of the Software, and to permit persons to whom the Software is furnished to do
     * so, subject to the following conditions:
     *
     *
     * The above copyright notice and this permission notice shall be included in all
     * copies or substantial portions of the Software.
     *
     *
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     * SOFTWARE.
     */

    package dk.nsp.api.notes

    import dk.nsp.api.util.extensions.asyncIO
    import dk.nsp.models.HealthCarePerformer
    import dk.nsp.models.Note
    import dk.nsp.models.Person
    import dk.nsp.models.PersonName
    import dk.nsp.shared.ResultWrapper
    import dk.nsp.shared.Success
    import kotlinx.coroutines.CoroutineScope
    import kotlinx.coroutines.Deferred
    import java.math.BigDecimal
    import java.time.LocalDateTime

    class NotesControllerMock : INotesController {

        private val healthCarePerformer = HealthCarePerformer(
            person = Person(PersonName(prefixName = "Dr.", firstNames = listOf("Lars"), middleNames = listOf("Middle", "Names"), lastName = "Hepsen")),
            role = "Sygeplejerske",
            healthCareOrganization = null,
            healthCareOrganizationAdress = null,
            healthCareOrganizationPhoneNumber = null
        )

        override fun getNotes(
            scope: CoroutineScope,
            episodeOfCareIdentifier: String
        ): Deferred<ResultWrapper<List<Note>>> =
            scope.asyncIO {
                Success(
                    listOf(
                        Note(
                            "1. Without a doubt there is something very relaxing and pleasurable about cooking and eating grilled fooThere are countless ways you can turn your grilling not only into a Without a doubt there is something very relaxing and pleasurable about cooking and eating grilled fooThere are countless ways you can turn your grilling not only into Without a doubt there is something very relaxing and pleasurable about cooking and eating grilled fooThere are countless ways you can turn your grilling not only into a Without a doubt there.",
                            "Jordemoderundersøgelse",
                            LocalDateTime.now().minusMonths(2),
                            HealthCarePerformer(
                                person = Person(PersonName(prefixName = "Dr.", firstNames = listOf("Test"), middleNames = listOf("Middle", "Names"), lastName = "Testsen")),
                                role = "SuperRole",
                                healthCareOrganization = null,
                                healthCareOrganizationAdress = null,
                                healthCareOrganizationPhoneNumber = null
                            ),
                            "documentId",
                            BigDecimal(1),
                            false
                        ),
                        Note(
                            "2. Her kommer til at stå noget tekst... bla bla bla..",
                            null,
                            LocalDateTime.now().minusMonths(4),
                            healthCarePerformer,
                            "documentId",
                            BigDecimal(1),
                            false
                        ),
                        Note(
                            "3. Her kommer til at stå noget tekst. bla bla bla. Bla bla blaaa. Bla bla blaaa. Bla bla blaaa",
                            null,
                            LocalDateTime.now().minusMonths(5),
                            healthCarePerformer
                        ),
                        Note(
                            "4. Short shorts",
                            null,
                            LocalDateTime.now().minusMonths(1),
                            healthCarePerformer
                        ),
                        Note(
                            "5. Her kommer til at stå noget tekst. bla bla bla. Bla bla blaaa. Bla bla blaaa. Bla bla blaaa",
                            null,
                            LocalDateTime.now().minusMonths(8),
                            healthCarePerformer
                        ),
                        Note(
                            "6. Her kommer til at stå noget tekst. bla bla bla. Bla bla blaaa. Bla bla blaaa. Bla bla blaaa. Bla bla blaaa. Bla bla blaaa",
                            null,
                            LocalDateTime.now().minusMonths(6),
                            healthCarePerformer
                        ),
                        Note(
                            "7. Her kommer til at stå noget tekst. bla bla bla. Bla bla blaaa. Bla bla blaaa. Bla bla blaaa",
                            null,
                            LocalDateTime.now().minusMonths(4),
                            healthCarePerformer
                        ),
                        Note(
                            "8. Shorty shorts",
                            null,
                            LocalDateTime.now().minusMonths(5),
                            healthCarePerformer
                        ),
                        Note(
                            "9. Her kommer til at stå noget tekst. bla bla bla. Bla bla blaaa. Bla bla blaaa. Bla bla blaaa",
                            null,
                            LocalDateTime.now().minusMonths(3),
                            healthCarePerformer
                        ),
                        Note(
                            "10. Her kommer til at stå noget tekst. bla bla bla. Bla bla blaaa. Bla bla blaaa. Bla bla blaaa. Bla bla blaaa. Bla bla blaaa",
                            null,
                            LocalDateTime.now().minusMonths(4),
                            healthCarePerformer
                        ),
                        Note(
                            "11. Her kommer til at stå noget tekst. bla bla bla. Bla bla blaaa. Bla bla blaaa. Bla bla blaaa",
                            null,
                            LocalDateTime.now().minusMonths(8),
                            healthCarePerformer
                        ),
                        Note(
                            "12. Her kommer til at stå noget tekst. bla bla bla. Bla bla blaaa. Bla bla blaaa. Bla bla blaaa. Bla bla blaaa. Bla bla blaaa",
                            null,
                            LocalDateTime.now().minusMonths(4),
                            healthCarePerformer
                        )
                    )
                )
            }
    }