feat(mobile): render clinical manifestation as bullet points
This commit is contained in:
parent
9ddc958a6a
commit
7ead8b1cde
|
|
@ -126,6 +126,22 @@ export function ExtraOrdinaryVesselsDetailRenderer({
|
|||
}, [data, definitions, presentationAttributes]);
|
||||
|
||||
const renderAttributeValue = (key: string, value: unknown, emptyText: string | null) => {
|
||||
if (key === "clinical_manifestation" || key === "clinical_manifestations") {
|
||||
const items = Array.isArray(value)
|
||||
? asStringArray(value)
|
||||
: typeof value === "string"
|
||||
? value
|
||||
.split(/,\s*(?![^()]*\))/)
|
||||
.map((s) => s.trim().replace(/\.$/, ""))
|
||||
.filter(Boolean)
|
||||
.map((s) => s.charAt(0).toUpperCase() + s.slice(1))
|
||||
: [];
|
||||
|
||||
if (items.length > 0) {
|
||||
return <BulletList items={items} />;
|
||||
}
|
||||
}
|
||||
|
||||
if (Array.isArray(value)) {
|
||||
const strings = asStringArray(value);
|
||||
if (strings.length > 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue