diff --git a/assets/navigation.js b/assets/navigation.js index ce01c23..aafc5a3 100644 --- a/assets/navigation.js +++ b/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA6WSX0+DMBTFv0uficqyYeTNqG/LoibGh2UPHVygsbSkXBaJ4bsbNjfaUv7EPbY995fTc+72hyB8IwnJK6hSCuKRgmJGQpLLuOJQ3p7ubzLMOfHIFxMxCZceiTLGYwWChNsL4uAPjh/8WQTbBBMIKqGRAXI5WqyCxrMwnwyzNRNAU5hF1PRj8BSwwyWViJBJodNSQHM+WJrjTmMDpEFTwbLZNTv905xG4Cigvf5/fcfpue2ZDvSozxiHG6u6VjDZnIG7srcz6+raNND81t4qylnCQPWzvzzNCv+jYrEDhnVhoAyZFdfdw72/Wmjm9nUrd322Q5w0I8mxcsCai2aJHeF14GeK9EmK48m1Jdr72F5spHjJC6wflaK1HZzxOBXXpuKc7jn0IH/3U/MpYOu5lJWKnCtmCMaXdS0jyp0JGThbNg59h1wiTFN7un6Pv4DXMPV5BgAA" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA6WTUU/CMBSF/0ufFxUCGPdm1DdC0Gh8IDyU7m5r7NqluyMuhv9uhgLt1rWLPtKe+3F2zu3miyB8IonJGnSlJIlISTEnMSlUUguorn/Or3IsBInIB5cJiWcRYTkXiQZJ4s0ZsZ8Mju8nowhdE1wi6JQyC+RyNJ0vDlEH884xX3IJNINRREPvg2eAF1xaS4ZcSZOWAdrzi5k9vrYcDSDWPRtdjPP7BmiD37aYHbaHrZmdoAwcPbbHf9+C4/TYJbAdmI2dMA43nQ1oBcEFsHD/rP/ECrYfqs0AjW/tuaaCpxx0P/vz1ajwH5REyvC1KcHBxKa0iC51J7ybu9vJfGpYfat5MgJtyULMXWM4caV6IVlST1O7pnUQYrUaD4RX/jxdUPeM908GInXTPcEe1+oCfqRIWy/tL9f7Me59L2al5FNRYnOvNW26hVuXoZpXtRB0J6AH+T0PzWeAredK1Zo518QS+J/xUjEqnAlZuK7MD32BQiGEqT1dv8dvk+aDG9oHAAA=" \ No newline at end of file diff --git a/assets/search.js b/assets/search.js index cb1adf1..50dc00a 100644 --- a/assets/search.js +++ b/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA92c3W+jSBLA/xfmlXHc39hvex8PJ61Wcyft3YMVRYxNEnQOzhqSnSjK/75qaEwVdNlNIDuafWIGV9dH/6qr6DbOa3Q8/F5G681r9P+82EVrLeOoSB+yaB3dZdU/0iotD0/HbRbF0dNxH62j26diW+WHorxCny/uq4d9FEfbfVqWWRmto+gtPilVSuiT3pub6uUxTOEnfOs0EliJo8f0mBVV3+EFdr9zhi15F+Mze78fi3rwaFfaKD5qehbPzP3r8xT/bHTEpN2n5Zfs+JCXpfVrHk8XA6UTHP8zp7jneHtfzhJBf1ZoID8VL53gfJH11f5AUJDr7Sd8Nix4Zggwj/s0sHReDqnV9aMgqP09/XdiKWr/1UwCMdt3WfW3l1+f8t3HRLA46Z9aWFE03xMKDOl0d6Y1Ak11di6y+19e3f+cF1l69+ExA1N/QaIoupPATH3JDxeyoypidixna1AnZT9MTawdbv+vZ2LRzMKfVRRxCAuof7ZgvieULqL2lvmA0L5vRaQixqb+YjhBcO2nqw8l6y+HfLkyTPFT8L887ffp130XvlVSXrW3z26sB7oOxT8fHquXn47H9KWvEH52Xqvq0Niw/34oquxbddKXF1V2vE23WXkFPj6rEmX2V3srQNknJ+gnBD0LTKxLti4dMMBBtW/ALlq4Px+26d43dSi1+1Lnz1CQgf9kD4cqu2hhIHbWRGfhC+7SD4fd0z4rr5rbgTrA0Upv/DPzqADT/KXf0GBC9lwDSDvtpJ8DI2dOOXZpld0cbm++5sfqPtjep/6wC9YXg2Dx49L9ofDmr994Kz7RaFrlWVHd5N5VSliGY6aZL7Nv4XYb4WkGt4eiSrcVWSv8lnujOheqcvc5Lz/nxX12zKts9x6X6kuwK056XheO2ePhWGW7G5vR4b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LqFrd+2oRzD2wK1zTla6za0fXULlRv+ALiIDMEG59SWqx9pshB2GIFoXLd90+/FDK6LoByk5CJYd9vww4Apapy+o2Q7wN5DqOHvPHzDKN1pvrt7c/AKCIOHfjSAAA"; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA92c3XOjOBLA/xfmlXEsCQmRt73de7iqrSvf1X08uFIpEpOEWsf2GZKdVGr+9yuBMN2gxiLgmZp5ItitVnf/Wq0PQ96D4/7PIrhevwd/5LtNcK2iMNilz1lwHTxm5W9pmRb7l+N9FoTBy3EbXAcPL7v7Mt/viiv0/eKpfN4GYXC/TYsiK4LrIPganpRKKdRJ7+1t+XbwU/gJf3RqCXoJg0N6zHZl1+AFNr81hi156+Mr+7gdi6rxaFMaLy4VnsUrs399nmKf8Y4I2lNarLLjc14Uxq55LF30lE4w/FuGuGN483k0iwfdqNBAftm9tYLzedZV+wNBQaY33/DZsODIEGAO29SzdJ53qdH1oyCo7D3dinkCXweBiPZjVv7l7d8v+eYyHixO+qcWVuTN94QCXTp9OlPpgl21/Zxl99+8fPo932Xp48V9Bl39hESRdycBdUm4kB1VEbNjMdsEdVL2w9TEyuDmfi4WdRS+VVHELiyg/tmc+Z5QWo+aj+ILuPZ9KyLlMe7qJ8MJnGu+TS5K1qMcPmbl6qJcVz8ZyhWgx+aatLv4VpgYXyYxk/zk499fttv0btt6adoVV83Hg0chPV373V+fD+XbL8dj+tZVCL8b1ipbAsbTX/e7MvtSnvTluzI7PqT3WXEFvh5UidL0znzkoeyTFXRDgZZ55s+5vs4dCcFGlW2gXzQKf9/fp1tX6FAGd6WGT71QB//MnvdldraHnthgF20PK7yuet5vXrZZcVV/7KkDHIZ12r8yhwoQ5lV3CQITsmMaQNpqJ+3sdTJwLrVJy+x2/3B7lx/LJ+/+PnWbnel90XMWL3Cf9jtn/ro7b8QndpqWebYrb3PnKCV6hm2mdV9kX/z7rYWndXi/35XpfUnWCnfPnVatCWWx+ZwXn/PdU3bMy2z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7cD+F8trSIQCorqU1oc4H/fAWMClCuicV6cHVjAlYRKzbwwaeVuDzI0oTKiPtAF8QOzjLDxk5apsvcxhWW332Xm3cu0fi8TQAVaOeXK7vSGKGgIkppT1bZ5bgB4AVyPmsrQVE97H1NZAR9vB5aAgiGsqogaI83/WGibg9bMtua2AguqaNZaqEQHNSOiQmrfJABegFbCTqARld/2n+e0reEcZlPCzuSKtOD0IAVITJANqlm8DBpBxECA6SOmLHCPDTBCNUWx86AAiD3oV9hIyCYS9j6mCmD1fgIgAka5sMGIqAHWm9iBG8Kmk7T5rey9poY+XThA7dOUKeZpUWAIGKY2q5ui4Ry1N2FwyA+ZYRpcr2++fv0/pvbCrlRPAAA="; \ No newline at end of file diff --git a/functions/Person.v1.get.html b/functions/Person.v1.get.html index e1edde4..56182c4 100644 --- a/functions/Person.v1.get.html +++ b/functions/Person.v1.get.html @@ -2,4 +2,4 @@

Parameters

Returns ((qualifier) => Promise<Nullable<Person>>)

the person or null if no person is found for the qualifier

Throws

Error if the provided context or qualifier is invalid

-
\ No newline at end of file +
\ No newline at end of file diff --git a/functions/Person.v1.getPage.html b/functions/Person.v1.getPage.html new file mode 100644 index 0000000..842b004 --- /dev/null +++ b/functions/Person.v1.getPage.html @@ -0,0 +1,5 @@ +getPage | @medic/cht-datasource
  • Returns an array of people.

    +

    Parameters

    Returns ((personType, limit?, skip?) => Promise<null | Person[]>)

    an array of people

    +
      • (personType, limit?, skip?): Promise<null | Person[]>
      • Parameters

        • personType: Readonly<{
              contactType: string;
          }>
        • limit: number = 100
        • skip: number = 0

        Returns Promise<null | Person[]>

    Throws

    Error if the provided context or personType qualifier is invalid

    +
\ No newline at end of file diff --git a/functions/Person.v1.getWithLineage.html b/functions/Person.v1.getWithLineage.html index 61ca777..ec9c106 100644 --- a/functions/Person.v1.getWithLineage.html +++ b/functions/Person.v1.getWithLineage.html @@ -2,4 +2,4 @@

Parameters

Returns ((qualifier) => Promise<Nullable<PersonWithLineage>>)

the person or null if no person is found for the qualifier

Throws

Error if the provided context or qualifier is invalid

-
\ No newline at end of file +
\ No newline at end of file diff --git a/functions/Place.v1.get.html b/functions/Place.v1.get.html index c8005e7..9fb218b 100644 --- a/functions/Place.v1.get.html +++ b/functions/Place.v1.get.html @@ -2,4 +2,4 @@

Parameters

Returns ((qualifier) => Promise<Nullable<Place>>)

the place or null if no place is found for the qualifier

Throws

Error if the provided context or qualifier is invalid

-
\ No newline at end of file +
\ No newline at end of file diff --git a/functions/Place.v1.getWithLineage.html b/functions/Place.v1.getWithLineage.html index de2cb47..f09f046 100644 --- a/functions/Place.v1.getWithLineage.html +++ b/functions/Place.v1.getWithLineage.html @@ -2,4 +2,4 @@

Parameters

Returns ((qualifier) => Promise<Nullable<PlaceWithLineage>>)

the place or null if no place is found for the qualifier

Throws

Error if the provided context or qualifier is invalid

-
\ No newline at end of file +
\ No newline at end of file diff --git a/functions/Qualifier.byContactType.html b/functions/Qualifier.byContactType.html new file mode 100644 index 0000000..258c523 --- /dev/null +++ b/functions/Qualifier.byContactType.html @@ -0,0 +1,5 @@ +byContactType | @medic/cht-datasource
  • Build the TypeQualifier that categorizes an entity by its type

    +

    Parameters

    • contactType: string

      the type of the entity

      +

    Returns Readonly<{
        contactType: string;
    }>

    the type

    +

    Throws

    Error if the type is invalid

    +
\ No newline at end of file diff --git a/functions/Qualifier.byUuid.html b/functions/Qualifier.byUuid.html index 1ab7bd7..4cf07ec 100644 --- a/functions/Qualifier.byUuid.html +++ b/functions/Qualifier.byUuid.html @@ -2,4 +2,4 @@

Parameters

Returns Readonly<{
    uuid: string;
}>

the qualifier

Throws

Error if the UUID is invalid

-
\ No newline at end of file +
\ No newline at end of file diff --git a/functions/Qualifier.isContactTypeQualifier.html b/functions/Qualifier.isContactTypeQualifier.html new file mode 100644 index 0000000..3aaab04 --- /dev/null +++ b/functions/Qualifier.isContactTypeQualifier.html @@ -0,0 +1,4 @@ +isContactTypeQualifier | @medic/cht-datasource
  • Returns true if the given qualifier is a ContactTypeQualifier otherwise false.

    +

    Parameters

    • contactType: unknown

      the type to check

      +

    Returns contactType is Readonly<{
        contactType: string;
    }>

    true if the given type is a ContactTypeQualifier, otherwise false.

    +
\ No newline at end of file diff --git a/functions/Qualifier.isUuidQualifier.html b/functions/Qualifier.isUuidQualifier.html index 1857ce3..1ea8a76 100644 --- a/functions/Qualifier.isUuidQualifier.html +++ b/functions/Qualifier.isUuidQualifier.html @@ -2,4 +2,4 @@

Parameters

Returns identifier is Readonly<{
    uuid: string;
}>

true if the given identifier is a UuidQualifier, otherwise false

-
\ No newline at end of file +
\ No newline at end of file diff --git a/functions/getDatasource.html b/functions/getDatasource.html index a4ba490..63cf549 100644 --- a/functions/getDatasource.html +++ b/functions/getDatasource.html @@ -1,7 +1,7 @@ -getDatasource | @medic/cht-datasource
  • Returns the source for CHT data.

    +getDatasource | @medic/cht-datasource
    • Returns the source for CHT data.

      Parameters

      Returns {
          v1: {
              hasAnyPermission: ((permissionsGroupList, userRoles, chtPermissionsSettings) => boolean);
              hasPermissions: ((permissions, userRoles, chtPermissionsSettings) => boolean);
              person: {
                  getByUuid: ((uuid) => Promise<Nullable<Person>>);
                  getByUuidWithLineage: ((uuid) => Promise<Nullable<PersonWithLineage>>);
              };
              place: {
                  getByUuid: ((uuid) => Promise<Nullable<Place>>);
                  getByUuidWithLineage: ((uuid) => Promise<Nullable<PlaceWithLineage>>);
              };
          };
      }

      the CHT datasource API

      -
      • v1: {
            hasAnyPermission: ((permissionsGroupList, userRoles, chtPermissionsSettings) => boolean);
            hasPermissions: ((permissions, userRoles, chtPermissionsSettings) => boolean);
            person: {
                getByUuid: ((uuid) => Promise<Nullable<Person>>);
                getByUuidWithLineage: ((uuid) => Promise<Nullable<PersonWithLineage>>);
            };
            place: {
                getByUuid: ((uuid) => Promise<Nullable<Place>>);
                getByUuidWithLineage: ((uuid) => Promise<Nullable<PlaceWithLineage>>);
            };
        }
        • hasAnyPermission: ((permissionsGroupList, userRoles, chtPermissionsSettings) => boolean)
            • (permissionsGroupList, userRoles, chtPermissionsSettings): boolean
            • Verify if the user's role has all the permissions of any of the provided groups.

              +

    Returns {
        v1: {
            hasAnyPermission: ((permissionsGroupList, userRoles, chtPermissionsSettings) => boolean);
            hasPermissions: ((permissions, userRoles, chtPermissionsSettings) => boolean);
            person: {
                getByUuid: ((uuid) => Promise<Nullable<Person>>);
                getByUuidWithLineage: ((uuid) => Promise<Nullable<PersonWithLineage>>);
                getPage: ((personType, limit?, skip?) => Promise<null | Person[]>);
            };
            place: {
                getByUuid: ((uuid) => Promise<Nullable<Place>>);
                getByUuidWithLineage: ((uuid) => Promise<Nullable<PlaceWithLineage>>);
            };
        };
    }

    the CHT datasource API

    +
    • v1: {
          hasAnyPermission: ((permissionsGroupList, userRoles, chtPermissionsSettings) => boolean);
          hasPermissions: ((permissions, userRoles, chtPermissionsSettings) => boolean);
          person: {
              getByUuid: ((uuid) => Promise<Nullable<Person>>);
              getByUuidWithLineage: ((uuid) => Promise<Nullable<PersonWithLineage>>);
              getPage: ((personType, limit?, skip?) => Promise<null | Person[]>);
          };
          place: {
              getByUuid: ((uuid) => Promise<Nullable<Place>>);
              getByUuidWithLineage: ((uuid) => Promise<Nullable<PlaceWithLineage>>);
          };
      }
      • hasAnyPermission: ((permissionsGroupList, userRoles, chtPermissionsSettings) => boolean)
          • (permissionsGroupList, userRoles, chtPermissionsSettings): boolean
          • Verify if the user's role has all the permissions of any of the provided groups.

            Parameters

            • permissionsGroupList: string[][]

              {string[][]} Array of groups of permissions due to the complexity of permission grouping

            • userRoles: string[]

              {string[]} Array of user roles.

            • chtPermissionsSettings: object

              {object} Object of configured permissions in CHT-Core's settings.

              @@ -9,7 +9,7 @@

              Parameters

              • permissions: string | string[]

                {string | string[]} Permission(s) to verify

              • userRoles: string[]

                {string[]} Array of user roles.

              • chtPermissionsSettings: object

                {object} Object of configured permissions in CHT-Core's settings.

                -

              Returns boolean

        • person: {
              getByUuid: ((uuid) => Promise<Nullable<Person>>);
              getByUuidWithLineage: ((uuid) => Promise<Nullable<PersonWithLineage>>);
          }
          • getByUuid: ((uuid) => Promise<Nullable<Person>>)

            Returns a person by their UUID.

            +

    Returns boolean

  • person: {
        getByUuid: ((uuid) => Promise<Nullable<Person>>);
        getByUuidWithLineage: ((uuid) => Promise<Nullable<PersonWithLineage>>);
        getPage: ((personType, limit?, skip?) => Promise<null | Person[]>);
    }
    • getByUuid: ((uuid) => Promise<Nullable<Person>>)

      Returns a person by their UUID.

      Returns

      the person or null if no person is found for the UUID

      Throws

      Error if no UUID is provided

        • (uuid): Promise<Nullable<Person>>
        • Parameters

          • uuid: string

            the UUID of the person to retrieve

            @@ -17,13 +17,18 @@

            Throws

            Error if no UUID is provided

            Returns

            the person or null if no person is found for the UUID

            Throws

            Error if no UUID is provided

        • place: {
              getByUuid: ((uuid) => Promise<Nullable<Place>>);
              getByUuidWithLineage: ((uuid) => Promise<Nullable<PlaceWithLineage>>);
          }
          • getByUuid: ((uuid) => Promise<Nullable<Place>>)

            Returns a place by its UUID.

            +
  • Returns Promise<Nullable<PersonWithLineage>>

  • getPage: ((personType, limit?, skip?) => Promise<null | Person[]>)

    Returns a list of people.

    +

    Returns

    array of Person

    +
  • place: {
        getByUuid: ((uuid) => Promise<Nullable<Place>>);
        getByUuidWithLineage: ((uuid) => Promise<Nullable<PlaceWithLineage>>);
    }
  • \ No newline at end of file +
    \ No newline at end of file diff --git a/functions/getLocalDataContext.html b/functions/getLocalDataContext.html index 625b58d..9828180 100644 --- a/functions/getLocalDataContext.html +++ b/functions/getLocalDataContext.html @@ -4,4 +4,4 @@
  • sourceDatabases: Readonly<{
        medic: Database<Doc>;
    }>

    the PouchDB databases to use as the local datasource

  • Returns DataContext

    the local data context

    Throws

    Error if the provided settings or source databases are invalid

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/functions/getRemoteDataContext.html b/functions/getRemoteDataContext.html index aa5b9e6..71b50cd 100644 --- a/functions/getRemoteDataContext.html +++ b/functions/getRemoteDataContext.html @@ -3,4 +3,4 @@

    Parameters

    Returns DataContext

    the data context

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/interfaces/DataContext.html b/interfaces/DataContext.html index 340f997..2337a42 100644 --- a/interfaces/DataContext.html +++ b/interfaces/DataContext.html @@ -1,8 +1,8 @@ DataContext | @medic/cht-datasource

    Context for interacting with the data. This may represent a local data context where data can be accessed even while offline. Or it may represent a remote data context where all data operations are performed against a remote CHT instance.

    -
    interface DataContext {
        bind: (<T>(fn) => T);
    }

    Properties

    interface DataContext {
        bind: (<T>(fn) => T);
    }

    Properties

    Properties

    bind: (<T>(fn) => T)

    Executes the provided function with this data context as the argument.

    Type declaration

      • <T>(fn): T
      • Type Parameters

        • T

        Parameters

        • fn: ((ctx) => T)

          the function to execute

        Returns T

    Returns

    the result of the function

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/interfaces/Person.v1.Person.html b/interfaces/Person.v1.Person.html index 97298eb..b460b7d 100644 --- a/interfaces/Person.v1.Person.html +++ b/interfaces/Person.v1.Person.html @@ -1,5 +1,5 @@ Person | @medic/cht-datasource

    Immutable data about a person contact.

    -
    interface Person {
        _id: string;
        _rev: string;
        contact_type?: string;
        date_of_birth?: Date;
        name?: string;
        parent?: NormalizedParent;
        patient_id?: string;
        phone?: string;
        reported_date?: Date;
        sex?: string;
        type: string;
    }

    Hierarchy (view full)

    Properties

    _id +
    interface Person {
        _id: string;
        _rev: string;
        contact_type?: string;
        date_of_birth?: Date;
        name?: string;
        parent?: NormalizedParent;
        patient_id?: string;
        phone?: string;
        reported_date?: Date;
        sex?: string;
        type: string;
    }

    Hierarchy (view full)

    Properties

    _id: string
    _rev: string
    contact_type?: string
    date_of_birth?: Date
    name?: string
    parent?: NormalizedParent
    patient_id?: string
    phone?: string
    reported_date?: Date
    sex?: string
    type: string
    \ No newline at end of file +

    Properties

    _id: string
    _rev: string
    contact_type?: string
    date_of_birth?: Date
    name?: string
    parent?: NormalizedParent
    patient_id?: string
    phone?: string
    reported_date?: Date
    sex?: string
    type: string
    \ No newline at end of file diff --git a/interfaces/Person.v1.PersonWithLineage.html b/interfaces/Person.v1.PersonWithLineage.html index c3457f5..eb43e91 100644 --- a/interfaces/Person.v1.PersonWithLineage.html +++ b/interfaces/Person.v1.PersonWithLineage.html @@ -1,5 +1,5 @@ PersonWithLineage | @medic/cht-datasource

    Immutable data about a person contact, including the full records of the parent place lineage.

    -
    interface PersonWithLineage {
        _id: string;
        _rev: string;
        contact_type?: string;
        date_of_birth?: Date;
        name?: string;
        parent?: NormalizedParent | PlaceWithLineage;
        patient_id?: string;
        phone?: string;
        reported_date?: Date;
        sex?: string;
        type: string;
    }

    Hierarchy (view full)

    Properties

    _id +
    interface PersonWithLineage {
        _id: string;
        _rev: string;
        contact_type?: string;
        date_of_birth?: Date;
        name?: string;
        parent?: NormalizedParent | PlaceWithLineage;
        patient_id?: string;
        phone?: string;
        reported_date?: Date;
        sex?: string;
        type: string;
    }

    Hierarchy (view full)

    Properties

    _id: string
    _rev: string
    contact_type?: string
    date_of_birth?: Date
    name?: string
    parent?: NormalizedParent | PlaceWithLineage
    patient_id?: string
    phone?: string
    reported_date?: Date
    sex?: string
    type: string
    \ No newline at end of file +

    Properties

    _id: string
    _rev: string
    contact_type?: string
    date_of_birth?: Date
    name?: string
    parent?: NormalizedParent | PlaceWithLineage
    patient_id?: string
    phone?: string
    reported_date?: Date
    sex?: string
    type: string
    \ No newline at end of file diff --git a/interfaces/Place.v1.Place.html b/interfaces/Place.v1.Place.html index 6ec738c..1fd4d58 100644 --- a/interfaces/Place.v1.Place.html +++ b/interfaces/Place.v1.Place.html @@ -1,5 +1,5 @@ Place | @medic/cht-datasource

    Immutable data about a place contact.

    -
    interface Place {
        _id: string;
        _rev: string;
        contact?: NormalizedParent;
        contact_type?: string;
        name?: string;
        parent?: NormalizedParent;
        place_id?: string;
        reported_date?: Date;
        type: string;
    }

    Hierarchy (view full)

    Properties

    _id +
    interface Place {
        _id: string;
        _rev: string;
        contact?: NormalizedParent;
        contact_type?: string;
        name?: string;
        parent?: NormalizedParent;
        place_id?: string;
        reported_date?: Date;
        type: string;
    }

    Hierarchy (view full)

    Properties

    _id: string
    _rev: string
    contact?: NormalizedParent
    contact_type?: string
    name?: string
    parent?: NormalizedParent
    place_id?: string
    reported_date?: Date
    type: string
    \ No newline at end of file +

    Properties

    _id: string
    _rev: string
    contact?: NormalizedParent
    contact_type?: string
    name?: string
    parent?: NormalizedParent
    place_id?: string
    reported_date?: Date
    type: string
    \ No newline at end of file diff --git a/interfaces/Place.v1.PlaceWithLineage.html b/interfaces/Place.v1.PlaceWithLineage.html index be051c0..5f90275 100644 --- a/interfaces/Place.v1.PlaceWithLineage.html +++ b/interfaces/Place.v1.PlaceWithLineage.html @@ -1,6 +1,6 @@ PlaceWithLineage | @medic/cht-datasource

    Immutable data about a place contact, including the full records of the parent place lineage and the primary contact for the place.

    -
    interface PlaceWithLineage {
        _id: string;
        _rev: string;
        contact?: NormalizedParent | PersonWithLineage;
        contact_type?: string;
        name?: string;
        parent?: NormalizedParent | PlaceWithLineage;
        place_id?: string;
        reported_date?: Date;
        type: string;
    }

    Hierarchy (view full)

    Properties

    _id +
    interface PlaceWithLineage {
        _id: string;
        _rev: string;
        contact?: NormalizedParent | PersonWithLineage;
        contact_type?: string;
        name?: string;
        parent?: NormalizedParent | PlaceWithLineage;
        place_id?: string;
        reported_date?: Date;
        type: string;
    }

    Hierarchy (view full)

    Properties

    _id: string
    _rev: string
    contact?: NormalizedParent | PersonWithLineage
    contact_type?: string
    name?: string
    parent?: NormalizedParent | PlaceWithLineage
    place_id?: string
    reported_date?: Date
    type: string
    \ No newline at end of file +

    Properties

    _id: string
    _rev: string
    contact?: NormalizedParent | PersonWithLineage
    contact_type?: string
    name?: string
    parent?: NormalizedParent | PlaceWithLineage
    place_id?: string
    reported_date?: Date
    type: string
    \ No newline at end of file diff --git a/modules/Person.html b/modules/Person.html index 2a0fab1..3c2db9f 100644 --- a/modules/Person.html +++ b/modules/Person.html @@ -1,2 +1,2 @@ -Person | @medic/cht-datasource

    Index

    Namespaces

    v1 +Person | @medic/cht-datasource

    Index

    Namespaces

    \ No newline at end of file diff --git a/modules/Person.v1.html b/modules/Person.v1.html index 822abc5..61b6033 100644 --- a/modules/Person.v1.html +++ b/modules/Person.v1.html @@ -1,5 +1,6 @@ -v1 | @medic/cht-datasource

    Index

    Interfaces

    Person +v1 | @medic/cht-datasource
    \ No newline at end of file diff --git a/modules/Place.html b/modules/Place.html index 69b0e47..9e8f3e8 100644 --- a/modules/Place.html +++ b/modules/Place.html @@ -1,2 +1,2 @@ -Place | @medic/cht-datasource

    Index

    Namespaces

    v1 +Place | @medic/cht-datasource

    Index

    Namespaces

    \ No newline at end of file diff --git a/modules/Place.v1.html b/modules/Place.v1.html index b242d63..9f3d67b 100644 --- a/modules/Place.v1.html +++ b/modules/Place.v1.html @@ -1,4 +1,4 @@ -v1 | @medic/cht-datasource

    Index

    Interfaces

    Place +v1 | @medic/cht-datasource

    Index

    Interfaces

    Functions

    get getWithLineage diff --git a/modules/Qualifier.html b/modules/Qualifier.html index ab62c26..cbd4ef5 100644 --- a/modules/Qualifier.html +++ b/modules/Qualifier.html @@ -1,4 +1,7 @@ -Qualifier | @medic/cht-datasource

    Index

    Type Aliases

    Functions

    byUuid +Qualifier | @medic/cht-datasource
    \ No newline at end of file diff --git a/types/NonEmptyArray.html b/types/NonEmptyArray.html index d7fe3aa..50eabe6 100644 --- a/types/NonEmptyArray.html +++ b/types/NonEmptyArray.html @@ -1,2 +1,2 @@ NonEmptyArray | @medic/cht-datasource

    Type alias NonEmptyArray<T>

    NonEmptyArray<T>: [T, ...T[]]

    An array that is guaranteed to have at least one element.

    -

    Type Parameters

    • T
    \ No newline at end of file +

    Type Parameters

    • T
    \ No newline at end of file diff --git a/types/Nullable.html b/types/Nullable.html index eaadcfe..3fcdd13 100644 --- a/types/Nullable.html +++ b/types/Nullable.html @@ -1,2 +1,2 @@ Nullable | @medic/cht-datasource

    Type alias Nullable<T>

    Nullable<T>: T | null

    A value that could be null.

    -

    Type Parameters

    • T
    \ No newline at end of file +

    Type Parameters

    • T
    \ No newline at end of file diff --git a/types/Qualifier.ContactTypeQualifier.html b/types/Qualifier.ContactTypeQualifier.html new file mode 100644 index 0000000..a723de3 --- /dev/null +++ b/types/Qualifier.ContactTypeQualifier.html @@ -0,0 +1,2 @@ +ContactTypeQualifier | @medic/cht-datasource
    ContactTypeQualifier: Readonly<{
        contactType: string;
    }>

    A qualifier that identifies an entity based on type

    +

    Type declaration

    • contactType: string
    \ No newline at end of file diff --git a/types/Qualifier.UuidQualifier.html b/types/Qualifier.UuidQualifier.html index b275204..5884eb7 100644 --- a/types/Qualifier.UuidQualifier.html +++ b/types/Qualifier.UuidQualifier.html @@ -1,2 +1,2 @@ UuidQualifier | @medic/cht-datasource
    UuidQualifier: Readonly<{
        uuid: string;
    }>

    A qualifier that identifies an entity by its UUID.

    -

    Type declaration

    • uuid: string
    \ No newline at end of file +

    Type declaration

    • uuid: string
    \ No newline at end of file